Esempio n. 1
0
    private void Awake()
    {
        channelSettings = Resources.Load <ChannelSettingsSO>("ChannelSettings");
        if (channelSettings == null)
        {
            channelSettings = ScriptableObject.CreateInstance <ChannelSettingsSO>();
            AssetDatabase.CreateAsset(channelSettings, channelSettingsPath);
            AssetDatabase.SaveAssets();
        }

        allState      = channelSettings.DefaultState;
        allPreveState = allState;
    }
Esempio n. 2
0
        static Debugger()
        {
            Enabled  = Debug.isDebugBuild;
            LogLevel = LogLevel.Info;
            Channels = new Dictionary <string, bool>();
            exists   = true;

            DefaultState = true;
            if (Application.platform == RuntimePlatform.OSXEditor || Application.platform == RuntimePlatform.WindowsEditor)
            {
                ChannelSettingsSO channelSettings = Resources.Load <ChannelSettingsSO>("ChannelSettings");
                if (channelSettings != null)
                {
                    DefaultState = channelSettings.DefaultState;
                    foreach (string channelName in channelSettings.ChannelState.Keys.AsEnumerable())
                    {
                        Channels.Add(channelName, channelSettings.ChannelState[channelName]);
                    }
                }
            }
        }