示例#1
0
 void Awake()
 {
     DontDestroyOnLoad (gameObject);
     if (instance != null) //seperate from the singleton class to allow deletion of gameobject rather than script
         Destroy(gameObject);
     else
         instance = this;
 }
示例#2
0
 void Start()
 {
     // Debug.Log("ComfortManager Start");
     instance     = this;
     settingsData = new ComfortSettingsData();
     Load();
     // SetDefaults();
 }