public void Awake()
    {
        Debug.Log(SystemInfo.deviceUniqueIdentifier);
        instance = this;
        GUIManagement.LoadGUISetupSingular("Title");
        SoundManager.soundEffectSource = GetComponent <AudioSource>();
        SoundManager.musicSource       = SoundManager.soundEffectSource;

        if (PlayerPrefs.HasKey("HighScore"))
        {
            highestScore = PlayerPrefs.GetInt("HighScore");
        }
        if (currentPlayer == null)
        {
            if (PlayerPrefs.HasKey("Customization"))
            {
                currentPlayer = SerializationManagement.XMLToObject <PlayerCustomizationSettings>(PlayerPrefs.GetString("Customization"));
            }
            else
            {
                currentPlayer = new PlayerCustomizationSettings();
            }
            currentPlayer.numberOfTimesOpened += 1;
            if (currentPlayer.numberOfTimesOpened == 4)
            {
                GUIManagement.LoadGUISetupSingular("RateMe");
            }
        }
        if (currentPlayer.activeColor == Color.clear)
        {
            currentPlayer.activeColor = new Color32(0, 255, 0, 255);
        }
        DrawPlayerCube();
        Leaderboard.Initialize();
    }
 /// <summary>
 /// Creates a deep copy of the configuration.
 /// </summary>
 /// <returns>A new <see cref="IMSConfiguration"/> object that has fields with the same values, but different objects.</returns>
 public object Clone()
 {
     return(SerializationManagement.ByteArrayToObject(SerializationManagement.ObjectToByteArray(this)));
 }
 public void OnApplicationPause(bool useless)
 {
     PlayerPrefs.SetString("Customization", SerializationManagement.ObjectToXML(currentPlayer));
 }