OptionalDependencyAttribute.cs 702 B

123456789101112131415161718192021222324
  1. 
  2. using System;
  3. using System.Diagnostics;
  4. //Used in this project:
  5. //[assembly: CurvedUI.OptionalDependency("TMPro.TextMeshProUGUI", "CURVEDUI_TMP")]
  6. //[assembly: CurvedUI.OptionalDependency("Valve.VR.InteractionSystem.Player", "CURVEDUI_STEAMVR_INT")]
  7. namespace CurvedUI
  8. {
  9. [Conditional("UNITY_CCU")]
  10. [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
  11. public class OptionalDependencyAttribute : Attribute
  12. {
  13. public string dependentClass;
  14. public string define;
  15. public OptionalDependencyAttribute(string dependentClass, string define)
  16. {
  17. this.dependentClass = dependentClass;
  18. this.define = define;
  19. }
  20. }
  21. }