Example #1
0
 private void Awake()
 {
     // get data from the GameObject that we created in Customisation (DontDestroyOnLoad())
     if (GameObject.Find("ButtonHandler") != null)
     {
         CreateCharacters handler = GameObject.Find("ButtonHandler").GetComponent <CreateCharacters>();
         partIndexPlayer1 = handler.partIndexPlayer1;
         partIndexPlayer2 = handler.partIndexPlayer2;
     }
 }
        private void Awake()
        {
            // Get the data from a GameObject that we carried over (via don't destroy)
            if (GameObject.Find("ButtonHandler") != null)
            {
                CreateCharacters handler = GameObject.Find("ButtonHandler").GetComponent <CreateCharacters>();

                partIndexPlayer1 = handler.partIndexPlayer1;
                partIndexPlayer2 = handler.partIndexPlayer2;
            }
        }