Acces position of previously instantied prefab
Hi everyone first post here, i'm still learning so i'll try to be as clear as possible sorry if that's not the case.
I have a drop function that enable gravity on a a game object so it can drop.
after this object dropped i instantiate a new one.
I need to acces the position of the first prefab after he dropped.
the problem is : if i acces the position after the drop function but before instantiating a new one it always give me the position of the object before he dropped and since i'm instantiating a new one just after the object dropped i don't know how to acces the previously instantied prefab in the script.
if i use transform.position it will give me the position of the newly instantied prefab.
is there a way to keep a reference of all the instantiated prefab so that i can acces their value after instantiating new one ?
Your answer
Follow this Question
Related Questions
Accessing variables from prefabs? C Sharp 1 Answer
Attacking an enemy (2D platformer) 0 Answers
All instantiated objects having same location, 0 Answers
problem with prefab's script 1 Answer
How to spawn a prefab at a duplicate objects location 1 Answer