Hi, I am having problem with prefabs

i have made array of checkpoints and i made it as prefab under empty gameobject but i need to asssign checkpoints prefab to enemy which is also a prefab but enemy prefab is not acceptting checkpoins array prefab,
any help wOuld be appreciated.

@HellsHand here are the picures and code.alt text

The problem is that prefabs can’t store references to any objects in the scene as it is only a “blueprint” of the object. So basically you cannot use any public variables in a prefab (without referencing it in script at least). What you have to do is reference it through scripting.

    private Transform[] checkPoints;

    void Start()
        checkPoints = GameObject.Find("Checkpoints").GetComponentsInChildren<Transform>(); // gets the transform component in each checkpoint that is stored in the empty game object