Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
        void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
            }
            else if (Instance != null && Instance != this)
            {
                Destroy(gameObject);
                return;
            }

            DontDestroyOnLoad(gameObject);
            Elephant.Init();
        }
Ejemplo n.º 3
0
        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
        }