public static LuaDeepProfilerSetting MakeInstance()
 {
     instance = LuaDeepProfilerSetting.Load();
     return(instance);
 }
        // Token: 0x060000C9 RID: 201 RVA: 0x00006674 File Offset: 0x00004A74
        public static LuaDeepProfilerSetting Load()
        {
            LuaDeepProfilerSetting luaDeepProfilerSetting = new LuaDeepProfilerSetting();

            byte[] datas = null;
#if UNITY_EDITOR
            string text = "Assets/Resources/LuaDeepProfilerSettings.bytes";
            if (!File.Exists(text))
            {
                luaDeepProfilerSetting.Save();
            }
            datas = File.ReadAllBytes(text);
#else
            TextAsset textAsset = null;
            string    path      = Application.persistentDataPath + "/LuaDeepProfilerSettings.bytes";
            if (File.Exists(path))
            {
                datas = File.ReadAllBytes(path);
            }
            else
            {
                textAsset = Resources.Load <TextAsset>("LuaDeepProfilerSettings");
                datas     = textAsset != null ? textAsset.bytes : null;
            }
#endif

            if (datas != null)
            {
                MemoryStream memoryStream = new MemoryStream(datas);
                try
                {
                    BinaryReader binaryReader = new BinaryReader(memoryStream);
                    luaDeepProfilerSetting.m_isDeepMonoProfiler = binaryReader.ReadBoolean();
                    luaDeepProfilerSetting.m_isDeepLuaProfiler  = binaryReader.ReadBoolean();
                    luaDeepProfilerSetting.m_captureLuaGC       = binaryReader.ReadInt32();
                    luaDeepProfilerSetting.m_isInited           = binaryReader.ReadBoolean();
                    luaDeepProfilerSetting.m_isNeedCapture      = binaryReader.ReadBoolean();
                    luaDeepProfilerSetting.m_captureMonoGC      = binaryReader.ReadInt32();
                    luaDeepProfilerSetting.m_captureFrameRate   = binaryReader.ReadInt32();
                    int count = binaryReader.ReadInt32();
                    luaDeepProfilerSetting.m_assMd5 = Encoding.UTF8.GetString(binaryReader.ReadBytes(count));
                    count = binaryReader.ReadInt32();
                    luaDeepProfilerSetting.m_ip             = Encoding.UTF8.GetString(binaryReader.ReadBytes(count));
                    luaDeepProfilerSetting.m_port           = binaryReader.ReadInt32();
                    luaDeepProfilerSetting.m_discardInvalid = binaryReader.ReadBoolean();
                    binaryReader.Close();
                }
                catch
                {
#if UNITY_EDITOR
                    memoryStream.Dispose();
                    File.Delete(text);
                    return(LuaDeepProfilerSetting.Load());
#endif
                }
            }
            else
            {
                luaDeepProfilerSetting.Save();
            }
#if !UNITY_EDITOR
            if (!File.Exists(path))
            {
                File.WriteAllBytes(path, datas);
            }
            if (textAsset != null)
            {
                Resources.UnloadAsset(textAsset);
            }
#endif
            return(luaDeepProfilerSetting);
        }