SampleSettings.cs 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using UnityEngine;
  2. namespace Samples
  3. {
  4. /// <summary>
  5. /// Simple sample settings showing how to create custom configuration data for your package.
  6. /// </summary>
  7. // Uncomment below line to have the settings appear in unified settings.
  8. //[XRConfigurationData("Sample Settings", SampleConstants.k_SettingsKey)]
  9. [System.Serializable]
  10. public class SampleSettings : ScriptableObject
  11. {
  12. #if !UNITY_EDITOR
  13. /// <summary>Static instance that will hold the runtime asset instance we created in our build process.</summary>
  14. /// <see cref="SampleBuildProcessor"/>
  15. public static SampleSettings s_RuntimeInstance = null;
  16. #endif
  17. /// <summary>Requirement settings enumeration</summary>
  18. public enum Requirement
  19. {
  20. /// <summary>Required</summary>
  21. Required,
  22. /// <summary>Optional</summary>
  23. Optional,
  24. /// <summary>None</summary>
  25. None
  26. }
  27. [SerializeField, Tooltip("Changes item requirement.")]
  28. Requirement m_RequiresItem;
  29. /// <summary>Whether or not the item is required.</summary>
  30. public Requirement requiresItem
  31. {
  32. get { return m_RequiresItem; }
  33. set { m_RequiresItem = value; }
  34. }
  35. [SerializeField, Tooltip("Some toggle for runtime.")]
  36. bool m_RuntimeToggle = true;
  37. /// <summary>Where we toggled?</summary>
  38. public bool runtimeToggle
  39. {
  40. get { return m_RuntimeToggle; }
  41. set { m_RuntimeToggle = value; }
  42. }
  43. void Awake()
  44. {
  45. #if !UNITY_EDITOR
  46. s_RuntimeInstance = this;
  47. #endif
  48. }
  49. }
  50. }