Files
glitchy-engine-beef/ScriptCore/Editor/ShowInEditorAttribute.cs
T
Simon Lübeß e69e1b5526 Show Buttons in entity editor
- ScriptEngine: Added HasCustomAttribute- extension method
- ScriptEngine: Added Application class
2023-12-12 13:38:29 +01:00

23 lines
804 B
C#

using System;
namespace GlitchyEngine.Editor;
// TODO: Maybe rename, definitely move into different namespace
/* Why?
* - this attribute also means that the Field is being serialized
* - Editor-Namespace wont be available for distribution builds of the game
*/
/// <summary>
/// Specifies that the field should be visible in the editor, regardless of it's code visibility (private, protected, etc...)
/// If this attribute is specified, the field will also be serialized.
/// </summary>
[AttributeUsage(AttributeTargets.Field)]
public sealed class ShowInEditorAttribute : Attribute
{
/// <summary>
/// The label with which the field will be shown in the editor.
/// If not specified, the fields name will be used.
/// </summary>
public string DisplayName { get; set; } = null;
}