Seven is the number.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
855 B

using System;
namespace Photon.Bolt
{
/// <summary>
/// Sets the Unity script execution order
/// </summary>
/// <example>
/// *Example:* Setting the execution order of a manager class using an attribute.
///
/// ```csharp
/// [BoltExecutionOrder(-5000)]
/// public class SoundManager : MonoBehaviour
/// {
/// void Awake() {
/// ConfigureSoundSettings();
/// }
/// }
/// ```
/// </example>
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
public sealed class BoltExecutionOrderAttribute : Attribute
{
readonly int _executionOrder;
public BoltExecutionOrderAttribute(int order)
{
_executionOrder = order;
}
/// <summary>
/// The order of this script in execution (lower is earlier)
/// </summary>
public int executionOrder
{
get { return _executionOrder; }
}
}
}