Search Unity

Question me no understand this error : MissingReferenceException: The variable player of Enemie doesn't exist

Discussion in '2D' started by Brizzz123, Jun 16, 2020.

  1. Brizzz123

    Brizzz123

    Joined:
    Apr 11, 2020
    Posts:
    3
    i tried making a script to spawn a enemie using prefabs and instantiate gameobject and it has a "player" variable so that the enemie can follow the player and i cant add the player to the variable when it is public upload_2020-6-16_20-40-15.png
    or can i maybe preset the transform variable like you can with ints or bools
    public int sda;
    and preseting is doing
    public int sda = 5;
    so maybe if you can do that with transform variables pls tell me pleaaaase
     

    Attached Files: