ObjectPooling Probelm, maybe a different approach ?
Options
S_Oliver
✭✭✭
Hello there,
I wanna use ObjectPooling for reusing GameObjects.
So i made this https://pastebin.com/uZSWg8Jx.
And Unity give me this Error :
The Problem part is from line 54 to 73.
Its like Instantiate a GameObject with a PhotonView, looking for the GameObject with the viewID but dont find the GameObject, but the viewID is there.
@jeanfabre @JohnTube
any Idea ?
I wanna use ObjectPooling for reusing GameObjects.
So i made this https://pastebin.com/uZSWg8Jx.
And Unity give me this Error :
The Problem part is from line 54 to 73.
Its like Instantiate a GameObject with a PhotonView, looking for the GameObject with the viewID but dont find the GameObject, but the viewID is there.
@jeanfabre @JohnTube
any Idea ?
0
Comments
-
Ok, i made some changes
private Dictionary<Transform, Stack<GameObject>> pools = new Dictionary<Transform, Stack<GameObject>>();
toprivate Dictionary<int, Stack<GameObject>> pools = new Dictionary<int, Stack<GameObject>>();
Creating uniqe ID for every pool works fine, now the Hierarchy is a bit messedUp but thats Ok for now.0