Search Unity

How to hold a deactivated GameObject in a prefab

Discussion in 'Scripting' started by besuser, Apr 4, 2008.

  1. besuser

    besuser

    Joined:
    Oct 9, 2007
    Posts:
    292
    Is it possible? I'd like to have a prefab composed of a hierarchy of GameObjects with some of them not active by default.

    Thanks very much!
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    You can create a script that, in Awake(), deactivates the GO.
     
  3. besuser

    besuser

    Joined:
    Oct 9, 2007
    Posts:
    292
    That's what I ended up doin' in the end.
    If anyone knows a better way, don't hesitate to chime in =).

    Thanks for the response!