Merge branch 'Better-Actor-Toolbox' of https://github.com/Tryibion/FlaxEngine into Tryibion-Better-Actor-Toolbox

This commit is contained in:
Wojtek Figat
2022-11-23 19:02:26 +01:00
41 changed files with 186 additions and 99 deletions

View File

@@ -0,0 +1,42 @@
using System;
namespace FlaxEngine
{
/// <summary>
/// This attribute is used to show actors that can be created in the actor tab of the toolbox.
/// </summary>
[Serializable]
[AttributeUsage(AttributeTargets.Class)]
public class ActorToolboxAttribute : Attribute
{
/// <summary>
/// The path to be used in the tool box
/// </summary>
public string Group;
/// <summary>
/// The name to be used for the actor in the tool box. Will default to actor name if now used.
/// </summary>
public string Name;
/// <summary>
/// Initializes a new instance of the <see cref="ActorToolboxAttribute"/> class.
/// </summary>
/// <param name="group">The group to use to create the tab</param>
public ActorToolboxAttribute(string group)
{
Group = group;
}
/// <summary>
/// Initializes a new instance of the <see cref="ActorToolboxAttribute"/> class.
/// </summary>
/// <param name="group">The group used to creat the tab</param>
/// <param name="name">The name to use rather than default</param>
public ActorToolboxAttribute(string group, string name)
: this(group)
{
Name = name;
}
}
}