Example #1
0
        internal static void InitializeInEditor()
        {
            var settings = ScriptableObject.CreateInstance <MLAgentsSettings>();

            if (EditorBuildSettings.TryGetConfigObject(EditorBuildSettingsConfigKey,
                                                       out MLAgentsSettings settingsAsset))
            {
                if (settingsAsset != null)
                {
                    settings = settingsAsset;
                }
            }
            Settings = settings;
        }
Example #2
0
 internal static void Destroy()
 {
     s_Settings       = null;
     OnSettingsChange = null;
 }
Example #3
0
 internal static void InitializeInPlayer()
 {
     Settings = Resources.FindObjectsOfTypeAll <MLAgentsSettings>().FirstOrDefault() ?? ScriptableObject.CreateInstance <MLAgentsSettings>();
 }