Question by
TheRedPower · Apr 30, 2017 at 05:57 PM ·
prefabscomponentsreferencing
How do i get a component from an unreferenced object.
The deal is: I spawn enemies using Instantiate from a prefab, then i need to give them a reference to the player's transform (the player is an object which is always present, as i have only one scene and i just teleport the player around when levels are over.), and i don't know why the prefab of the enemies isn't accepting the player's transform reference, it only accepts a prefab reference, but in that case the enemies will follow the static transform of the player prefab.
Comment