Exemple #1
0
        public static string ReadFromFile(string filename)
        {
            try
            {
                var path = Path.Combine(Application.persistentDataPath, filename);
                return(File.ReadAllText(path));
            }
            catch (Exception e)
            {
                ElephantCore.Log(e.Message);
            }

            return(null);
        }
        void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
            }
            else if (Instance != null && Instance != this)
            {
                Destroy(gameObject);
                return;
            }

            DontDestroyOnLoad(gameObject);
            Elephant.Init();
        }
        void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
            }
            else if (Instance != null && Instance != this)
            {
                Destroy(gameObject);
                return;
            }

            DontDestroyOnLoad(gameObject);
#if !UNITY_EDITOR && UNITY_ANDROID
            ElephantAndroid.Init();
#endif
        }