Fix missing game scripts types when starting editor from IDE with -skipCompile arg
This commit is contained in:
@@ -270,6 +270,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
{
|
||||
ScriptsBuilder.ScriptsReload += OnScriptsReload;
|
||||
ScriptsBuilder.ScriptsReloadEnd += OnScriptsReloadEnd;
|
||||
ScriptsBuilder.ScriptsLoaded += OnScriptsLoaded;
|
||||
Editor.Options.OptionsChanged += OnOptionsChanged;
|
||||
|
||||
// Add default code editors (in-build)
|
||||
@@ -340,6 +341,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
|
||||
ScriptsBuilder.ScriptsReload -= OnScriptsReload;
|
||||
ScriptsBuilder.ScriptsReloadEnd -= OnScriptsReloadEnd;
|
||||
ScriptsBuilder.ScriptsLoaded -= OnScriptsLoaded;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -375,6 +377,12 @@ namespace FlaxEditor.Modules.SourceCodeEditing
|
||||
OnTypesChanged();
|
||||
}
|
||||
|
||||
private void OnScriptsLoaded()
|
||||
{
|
||||
// Clear any state with engine-only types
|
||||
ClearTypes();
|
||||
}
|
||||
|
||||
private static bool IsTypeValidScriptingType(ScriptType t)
|
||||
{
|
||||
return !t.IsGenericType && !t.IsAbstract && !t.HasAttribute(typeof(HideInEditorAttribute), false);
|
||||
|
||||
Reference in New Issue
Block a user