Hello there.
I am trying to get the correct instance of a script<Soldier> referenced in a projectile from multiple instances of the same enemy
the way i did this is to instantiate the projectile as a child and on its awake method, call getcomponentfromparent<Soldier>
i need to alter the parents localscale without affecting the projectile, to do so i call transform.setparent(null) a couple seconds after this projectile is instantiated so that i may freely affect the parent localscale...
getting correct instance of script from multiple
I am trying to get the correct instance of a script<Soldier> referenced in a projectile from multiple instances of the same enemy
the way i did this is to instantiate the projectile as a child and on its awake method, call getcomponentfromparent<Soldier>
i need to alter the parents localscale without affecting the projectile, to do so i call transform.setparent(null) a couple seconds after this projectile is instantiated so that i may freely affect the parent localscale...
getting correct instance of script from multiple