Search Unity

Cant hold transform and camera on prefab?

Discussion in 'Scripting' started by ecloev, Oct 13, 2015.

  1. ecloev

    ecloev

    Joined:
    Oct 1, 2015
    Posts:
    101
    Hello,
    So as soon as I move my Enemy to prefabs. The main camera and target are deleted off the scripts in inspector
    and the enemies won't chase or look at me? Why wont it hold these values?
     
  2. ecloev

    ecloev

    Joined:
    Oct 1, 2015
    Posts:
    101
    @lordofduct Also this :(
    When the enemies spawn the target and camera values get erased and they just sit there haha!
     
  3. lordofduct

    lordofduct

    Joined:
    Oct 3, 2011
    Posts:
    8,531
    You already had a thread open, no reason to open a new thread to deal with something related to the same topic.
     
  4. ecloev

    ecloev

    Joined:
    Oct 1, 2015
    Posts:
    101
    Well yes; however, this is referring to the prefab not holding the values of the target(player), and main_camera?
    Do you know why this is and how I can get it to stay?