Search Unity

when game start script disabled

Discussion in 'Scripting' started by RankXenon, Jan 27, 2013.

  1. RankXenon

    RankXenon

    Joined:
    Jan 20, 2013
    Posts:
    48
    i made a pause menu script but i want that on the beggining it's disabled and can only be enabled if another script enables it.
     
  2. RankXenon

    RankXenon

    Joined:
    Jan 20, 2013
    Posts:
    48
    I know now the answer to my question >.<

    ill yust create a new script called disableScript

    Code (csharp):
    1. function Start () {
    2.     GetComponent(myscript).enabled = false;
    3. }
    when the game starts it will disable the script called (myscript)
     
    Last edited: Jan 27, 2013