Added EditorFlags: Hide entities in hierarchy and editor scene

- Also some Style changes
This commit is contained in:
Simon Lübeß
2024-03-10 12:21:20 +01:00
parent 5ca5404f72
commit 8d92822845
15 changed files with 242 additions and 40 deletions
+14
View File
@@ -7,6 +7,7 @@ using GlitchyEngine.Core;
using GlitchyEngine.Extensions;
using GlitchyEngine.Physics;
using System.Diagnostics.CodeAnalysis;
using GlitchyEngine.Editor;
namespace GlitchyEngine;
@@ -23,6 +24,19 @@ public class Entity : EngineObject
get => ScriptGlue.Entity_GetName(_uuid);
set => ScriptGlue.Entity_SetName(_uuid, value);
}
/// <summary>
/// Gets or sets the <see cref="EditorFlags"/> of the <see cref="Entity"/>, which specify how the <see cref="Entity"/> is displayed and interacted with in the editor.
/// </summary>
public EditorFlags EditorFlags
{
get
{
ScriptGlue.Entity_GetEditorFlags(_uuid, out EditorFlags flags);
return flags;
}
set => ScriptGlue.Entity_SetEditorFlags(_uuid, value);
}
/// <summary>
/// Only to be called by the engine. Don't call this constructor yourself, it will not result in a valid <see cref="Entity"/>.