Exemple #1
0
        void Awake()
        {
            if (_singleton != null)
            {
                Debug.LogError(
                    string.Format("Created multiple NativePluginLoader objects. Destroying duplicate created on GameObject [{0}]",
                                  this.gameObject.name));
                Destroy(this);
                return;
            }

            _singleton = this;
            DontDestroyOnLoad(this.gameObject);
            _path = Application.dataPath + "/Plugins/";
            LoadAll();
        }
Exemple #2
0
 void OnDestroy()
 {
     UnloadAll();
     _singleton = null;
 }