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

3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
4 years ago
3 years ago
  1. using System;
  2. namespace Photon.Bolt
  3. {
  4. /// <summary>
  5. /// Sets the Unity script execution order
  6. /// </summary>
  7. /// <example>
  8. /// *Example:* Setting the execution order of a manager class using an attribute.
  9. ///
  10. /// ```csharp
  11. /// [BoltExecutionOrder(-5000)]
  12. /// public class SoundManager : MonoBehaviour
  13. /// {
  14. /// void Awake() {
  15. /// ConfigureSoundSettings();
  16. /// }
  17. /// }
  18. /// ```
  19. /// </example>
  20. [AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
  21. public sealed class BoltExecutionOrderAttribute : Attribute
  22. {
  23. readonly int _executionOrder;
  24. public BoltExecutionOrderAttribute(int order)
  25. {
  26. _executionOrder = order;
  27. }
  28. /// <summary>
  29. /// The order of this script in execution (lower is earlier)
  30. /// </summary>
  31. public int executionOrder
  32. {
  33. get { return _executionOrder; }
  34. }
  35. }
  36. }