Skip to content

Commit

Permalink
give settings instances names and add them to the settings asset if p…
Browse files Browse the repository at this point in the history
…ossible
  • Loading branch information
hybridherbst committed Dec 31, 2023
1 parent 20d5a38 commit 16c83c3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Runtime/Scripts/GLTFSettings.cs
Expand Up @@ -420,9 +420,14 @@ private static void RegisterPlugins(GLTFSettings settings)
{
var newInstance = CreateInstance(pluginType) as T;
if (!newInstance) continue;


newInstance.name = pluginType.Name;
newInstance.hideFlags = HideFlags.HideInHierarchy | HideFlags.HideInInspector;
newInstance.Enabled = newInstance.EnabledByDefault;

plugins.Add(newInstance);
if (AssetDatabase.Contains(settings))
AssetDatabase.AddObjectToAsset(newInstance, settings);
EditorUtility.SetDirty(settings);
}
}
Expand Down

0 comments on commit 16c83c3

Please sign in to comment.