コード例 #1
0
ファイル: Utils.cs プロジェクト: YinYangGames/Development
        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);
        }
コード例 #2
0
        void Awake()
        {
            if (Instance == null)
            {
                Instance = this;
            }
            else if (Instance != null && Instance != this)
            {
                Destroy(gameObject);
                return;
            }

            DontDestroyOnLoad(gameObject);
            Elephant.Init();
        }
コード例 #3
0
ファイル: ElephantCore.cs プロジェクト: safakkazan/DrawFlight
        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
        }