Files
sbox-public/engine/Sandbox.System/Attributes/InspectorAttributes.cs
s&box team 71f266059a Open source release
This commit imports the C# engine code and game files, excluding C++ source code.

[Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
2025-11-24 09:05:18 +00:00

34 lines
855 B
C#

namespace Sandbox;
/// <summary>
/// When added to a method - the inspector will show a button for it.
/// </summary>
[AttributeUsage( AttributeTargets.Method )]
public class ButtonAttribute : System.Attribute
{
public string Icon { get; set; }
public string Title { get; set; }
//public string Group { get; set; }
//public Color Color { get; set; } = Color.White;
public ButtonAttribute( string value = "", string icon = "" )
{
Title = value;
Icon = icon;
}
}
/// <summary>
/// When added to a property on a Component, we'll try to make that component value non null.
/// We will first look on the GameObject for the component type. If it's not found, we'll create one.
/// </summary>
[AttributeUsage( AttributeTargets.Property )]
public class RequireComponentAttribute : System.Attribute
{
public RequireComponentAttribute()
{
}
}