Strings.cs 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. // Animancer // https://kybernetik.com.au/animancer // Copyright 2022 Kybernetik //
  2. using Animancer.Units;
  3. using UnityEngine;
  4. namespace Animancer
  5. {
  6. /// <summary>Various string constants used throughout <see cref="Animancer"/>.</summary>
  7. /// https://kybernetik.com.au/animancer/api/Animancer/Strings
  8. ///
  9. public static class Strings
  10. {
  11. /************************************************************************************************************************/
  12. /// <summary>The name of this product.</summary>
  13. public const string ProductName = nameof(Animancer);
  14. /// <summary>The standard prefix for <see cref="AddComponentMenu"/>.</summary>
  15. public const string MenuPrefix = ProductName + "/";
  16. /// <summary>The standard prefix for the asset creation menu (for <see cref="UnityEditor.MenuItem"/>).</summary>
  17. public const string CreateMenuPrefix = "Assets/Create/" + MenuPrefix;
  18. /// <summary>The standard prefix for <see cref="AddComponentMenu"/> for the examples.</summary>
  19. public const string ExamplesMenuPrefix = MenuPrefix + "Examples/";
  20. /// <summary>The menu path of the <see cref="Editor.Tools.AnimancerToolsWindow"/>.</summary>
  21. public const string AnimancerToolsMenuPath = "Window/Animation/Animancer Tools";
  22. /// <summary>
  23. /// The base value for <see cref="CreateAssetMenuAttribute.order"/> to group
  24. /// "Assets/Create/Animancer/..." menu items just under "Avatar Mask".
  25. /// </summary>
  26. public const int AssetMenuOrder = 410;
  27. /************************************************************************************************************************/
  28. /// <summary>The conditional compilation symbol for Editor-Only code.</summary>
  29. public const string UnityEditor = "UNITY_EDITOR";
  30. /// <summary>The conditional compilation symbol for assertions.</summary>
  31. public const string Assertions = "UNITY_ASSERTIONS";
  32. /************************************************************************************************************************/
  33. /// <summary>4 spaces for indentation.</summary>
  34. public const string Indent = " ";
  35. /// <summary>A prefix for tooltips on Pro-Only features.</summary>
  36. /// <remarks><c>"[Pro-Only] "</c> in Animancer Lite or <c>""</c> in Animancer Pro.</remarks>
  37. public const string ProOnlyTag = "";
  38. /************************************************************************************************************************/
  39. /// <summary>An error message for when <see cref="AnimancerUtilities.IsFinite(float)"/> fails.</summary>
  40. public const string MustBeFinite = "must not be NaN or Infinity";
  41. /************************************************************************************************************************/
  42. /// <summary>URLs of various documentation pages.</summary>
  43. /// https://kybernetik.com.au/animancer/api/Animancer/DocsURLs
  44. ///
  45. public static class DocsURLs
  46. {
  47. /************************************************************************************************************************/
  48. /// <summary>The URL of the website where the Animancer documentation is hosted.</summary>
  49. public const string Documentation = "https://kybernetik.com.au/animancer";
  50. /// <summary>The URL of the website where the Animancer API documentation is hosted.</summary>
  51. public const string APIDocumentation = Documentation + "/api/" + nameof(Animancer);
  52. /// <summary>The URL of the website where the Animancer API documentation is hosted.</summary>
  53. public const string ExampleAPIDocumentation = APIDocumentation + ".Examples.";
  54. /// <summary>The email address which handles support for Animancer.</summary>
  55. public const string DeveloperEmail = "animancer@kybernetik.com.au";
  56. /************************************************************************************************************************/
  57. public const string OptionalWarning = APIDocumentation + "/" + nameof(Animancer.OptionalWarning);
  58. /************************************************************************************************************************/
  59. #if UNITY_ASSERTIONS
  60. /************************************************************************************************************************/
  61. public const string Docs = Documentation + "/docs/";
  62. public const string AnimancerEvents = Docs + "manual/events/animancer";
  63. public const string ClearAutomatically = AnimancerEvents + "/behaviour#clear-automatically";
  64. public const string SharedEventSequences = AnimancerEvents + "/shared";
  65. public const string AnimatorControllers = Docs + "manual/animator-controllers";
  66. public const string AnimatorControllersNative = AnimatorControllers + "#native";
  67. /************************************************************************************************************************/
  68. #endif
  69. /************************************************************************************************************************/
  70. #if UNITY_EDITOR
  71. /************************************************************************************************************************/
  72. public const string KeepChildrenConnected = APIDocumentation + "/" + nameof(AnimancerPlayable) + "/FEFD6C35";
  73. public const string Examples = Docs + "examples";
  74. public const string UnevenGround = Docs + "examples/ik/uneven-ground";
  75. public const string OdinInspector = Docs + "examples/integration/odin-inspector";
  76. public const string AnimancerTools = Docs + "manual/tools";
  77. public const string PackTextures = AnimancerTools + "/pack-textures";
  78. public const string ModifySprites = AnimancerTools + "/modify-sprites";
  79. public const string RenameSprites = AnimancerTools + "/rename-sprites";
  80. public const string GenerateSpriteAnimations = AnimancerTools + "/generate-sprite-animations";
  81. public const string RemapSpriteAnimation = AnimancerTools + "/remap-sprite-animation";
  82. public const string RemapAnimationBindings = AnimancerTools + "/remap-animation-bindings";
  83. public const string Inspector = Docs + "manual/playing/inspector";
  84. public const string States = Docs + "manual/playing/states";
  85. public const string Fading = Docs + "manual/blending/fading";
  86. public const string Layers = Docs + "manual/blending/layers";
  87. public const string EndEvents = Docs + "manual/events/end";
  88. public const string TransitionPreviews = Docs + "manual/transitions/previews";
  89. public const string UpdateModes = Docs + "bugs/update-modes";
  90. public const string ChangeLogPrefix = Docs + "changes/animancer-";
  91. public const string Forum = "https://forum.unity.com/threads/566452";
  92. public const string Issues = "https://github.com/KybernetikGames/animancer/issues";
  93. /************************************************************************************************************************/
  94. #endif
  95. /************************************************************************************************************************/
  96. }
  97. /************************************************************************************************************************/
  98. /// <summary>Tooltips for various fields.</summary>
  99. /// https://kybernetik.com.au/animancer/api/Animancer/Tooltips
  100. ///
  101. public static class Tooltips
  102. {
  103. /************************************************************************************************************************/
  104. public const string MiddleClickReset =
  105. "\n• Middle Click = reset to default value";
  106. public const string FadeDuration = ProOnlyTag +
  107. "The amount of time the transition will take, e.g:" +
  108. "\n• 0s = Instant" +
  109. "\n• 0.25s = quarter of a second (Default)" +
  110. "\n• 0.25x = quarter of the animation length" +
  111. "\n• " + AnimationTimeAttribute.Tooltip +
  112. MiddleClickReset;
  113. public const string Speed = ProOnlyTag +
  114. "How fast the animation will play, e.g:" +
  115. "\n• 0x = paused" +
  116. "\n• 1x = normal speed" +
  117. "\n• -2x = double speed backwards";
  118. public const string OptionalSpeed = Speed +
  119. "\n• Disabled = keep previous speed" +
  120. MiddleClickReset;
  121. public const string NormalizedStartTime = ProOnlyTag +
  122. "• Enabled = always start at this time." +
  123. "\n• Disabled = continue from the current time." +
  124. "\n• " + AnimationTimeAttribute.Tooltip;
  125. public const string EndTime = ProOnlyTag +
  126. "The time when the End Callback will be triggered." +
  127. "\n• " + AnimationTimeAttribute.Tooltip +
  128. "\n\nDisabling the toggle automates the value:" +
  129. "\n• Speed >= 0 ends at 1x" +
  130. "\n• Speed < 0 ends at 0x";
  131. public const string CallbackTime = ProOnlyTag +
  132. "The time when the Event Callback will be triggered." +
  133. "\n• " + AnimationTimeAttribute.Tooltip;
  134. /************************************************************************************************************************/
  135. }
  136. /************************************************************************************************************************/
  137. }
  138. }