Strings.cs 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. // Animancer // https://kybernetik.com.au/animancer // Copyright 2018-2024 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 samples.</summary>
  19. public const string SamplesMenuPrefix = MenuPrefix + "Samples/";
  20. /// <summary>The menu path of the <see cref="Editor.Tools.AnimancerToolsWindow"/>.</summary>
  21. public const string AnimancerToolsMenuPath = "Window/Animation/Animancer Tools";
  22. /// <summary>The menu path of the Animancer settings.</summary>
  23. public const string AnimancerSettingsPath = "Edit/Project Settings/Animancer";
  24. /// <summary>
  25. /// The base value for <see cref="CreateAssetMenuAttribute.order"/> to group
  26. /// "Assets/Create/Animancer/..." menu items just under "Avatar Mask".
  27. /// </summary>
  28. public const int AssetMenuOrder = 410;
  29. /************************************************************************************************************************/
  30. /// <summary>The conditional compilation symbol for Editor-Only code.</summary>
  31. public const string UnityEditor = "UNITY_EDITOR";
  32. /// <summary>The conditional compilation symbol for assertions exists in the Unity Editor and Development Builds.</summary>
  33. public const string Assertions = "UNITY_ASSERTIONS";
  34. /************************************************************************************************************************/
  35. /// <summary>4 spaces for indentation.</summary>
  36. public const string Indent = " ";
  37. /// <summary>A prefix for tooltips on Pro-Only features.</summary>
  38. /// <remarks><c>"[Pro-Only] "</c> in Animancer Lite or <c>""</c> in Animancer Pro.</remarks>
  39. public const string ProOnlyTag = "";
  40. /// <summary>The Assembly name of the pre-compiled Animancer Lite DLL.</summary>
  41. public const string LiteAssemblyName = "Kybernetik.Animancer.Lite";
  42. /************************************************************************************************************************/
  43. /// <summary>An error message for when <see cref="AnimancerUtilities.IsFinite(float)"/> fails.</summary>
  44. public const string MustBeFinite = "must not be NaN or Infinity";
  45. /************************************************************************************************************************/
  46. #if UNITY_ASSERTIONS
  47. /// <summary>[Assert-Only] A message for <see cref="OptionalWarning.AnimatorDisabled"/>.</summary>
  48. public const string AnimatorDisabledMessage
  49. = "The " + nameof(Animator) + " is disabled so Animancer won't be able to play animations.";
  50. #endif
  51. /************************************************************************************************************************/
  52. /// <summary>URLs of various documentation pages.</summary>
  53. /// https://kybernetik.com.au/animancer/api/Animancer/DocsURLs
  54. ///
  55. public static class DocsURLs
  56. {
  57. /************************************************************************************************************************/
  58. /// <summary>The URL of the website where the Animancer documentation is hosted.</summary>
  59. public const string Documentation = "https://kybernetik.com.au/animancer";
  60. /// <summary>The URL of the website where the Animancer API documentation is hosted.</summary>
  61. public const string APIDocumentation = Documentation + "/api/" + nameof(Animancer);
  62. /// <summary>The email address which handles support for Animancer.</summary>
  63. public const string DeveloperEmail = "animancer@kybernetik.com.au";
  64. /// <summary>The URL of the file which lists Animancer's latest version.</summary>
  65. public const string LatestVersion = Documentation + "/latest-version.txt";
  66. /************************************************************************************************************************/
  67. public const string OptionalWarning = APIDocumentation + "/" + nameof(Animancer.OptionalWarning);
  68. /************************************************************************************************************************/
  69. #if UNITY_ASSERTIONS
  70. /************************************************************************************************************************/
  71. public const string Docs = Documentation + "/docs/";
  72. public const string AnimancerEvents = Docs + "manual/events/animancer";
  73. public const string EndEvents = Docs + "manual/events/end";
  74. public const string AnimancerEventParameters = AnimancerEvents + "/parameters";
  75. public const string SharedEventSequences = AnimancerEvents + "/shared";
  76. public const string AnimatorControllers = Docs + "manual/animator-controllers";
  77. public const string AnimatorControllersNative = AnimatorControllers + "#native";
  78. public const string Fading = Docs + "manual/blending/fading";
  79. public const string FadeModes = Fading + "/modes";
  80. /************************************************************************************************************************/
  81. #endif
  82. /************************************************************************************************************************/
  83. #if UNITY_EDITOR
  84. /************************************************************************************************************************/
  85. public const string Samples = Docs + "samples";
  86. public const string UnevenGround = Docs + "samples/ik/uneven-ground";
  87. public const string OdinInspector = Docs + "samples/integration/odin-inspector";
  88. public const string AnimancerTools = Docs + "manual/tools";
  89. public const string PackTextures = AnimancerTools + "/pack-textures";
  90. public const string ModifySprites = AnimancerTools + "/modify-sprites";
  91. public const string RenameSprites = AnimancerTools + "/rename-sprites";
  92. public const string GenerateSpriteAnimations = AnimancerTools + "/generate-sprite-animations";
  93. public const string RemapSpriteAnimation = AnimancerTools + "/remap-sprite-animation";
  94. public const string RemapAnimationBindings = AnimancerTools + "/remap-animation-bindings";
  95. public const string Inspector = Docs + "manual/playing/inspector";
  96. public const string States = Docs + "manual/playing/states";
  97. public const string Layers = Docs + "manual/blending/layers";
  98. public const string Parameters = Docs + "manual/parameters";
  99. public const string TransitionPreviews = Docs + "manual/transitions/previews";
  100. public const string TransitionLibraries = Docs + "manual/transitions/libraries";
  101. public const string UpdateModes = Docs + "bugs/update-modes";
  102. public const string VersionName = "v8.0.2";
  103. public const string ChangeLogURL = Docs + "changes/animancer-v8-0";
  104. public const string UpgradeGuideURL = ChangeLogURL + "/upgrade-guide";
  105. public const string Discussions = "https://discussions.unity.com/t/animancer-less-animator-controller-more-animator-control/717489/99999";
  106. public const string Issues = "https://github.com/KybernetikGames/animancer/issues";
  107. /************************************************************************************************************************/
  108. #endif
  109. /************************************************************************************************************************/
  110. }
  111. /************************************************************************************************************************/
  112. /// <summary>Tooltips for various fields.</summary>
  113. /// https://kybernetik.com.au/animancer/api/Animancer/Tooltips
  114. ///
  115. public static class Tooltips
  116. {
  117. /************************************************************************************************************************/
  118. public const string MiddleClickReset =
  119. "\n• Middle Click = reset to default value";
  120. public const string FadeDuration = ProOnlyTag +
  121. "The amount of time the transition will take, e.g:" +
  122. "\n• 0s = Instant" +
  123. "\n• 0.25s = quarter of a second (Default)" +
  124. "\n• 0.25x = quarter of the animation length" +
  125. "\n• " + AnimationTimeAttribute.Tooltip +
  126. MiddleClickReset;
  127. public const string Speed = ProOnlyTag +
  128. "How fast the animation will play, e.g:" +
  129. "\n• 0x = paused" +
  130. "\n• 1x = normal speed" +
  131. "\n• -2x = double speed backwards";
  132. public const string OptionalSpeed = Speed +
  133. "\n• Disabled = continue at current speed" +
  134. MiddleClickReset;
  135. public const string SpeedDisabled =
  136. "Continue at current speed";
  137. public const string NormalizedStartTime = ProOnlyTag +
  138. "• Enabled = use " + nameof(FadeMode) + "." + nameof(FadeMode.FromStart) +
  139. " and restart at this time." +
  140. "\n• Disabled = use " + nameof(FadeMode) + "." + nameof(FadeMode.FixedSpeed) +
  141. " and continue from the current time if already playing." +
  142. "\n• " + AnimationTimeAttribute.Tooltip;
  143. public const string StartTimeDisabled =
  144. "Continue from current time";
  145. public const string EndTime = ProOnlyTag +
  146. "The time when the End Callback will be triggered." +
  147. "\n• " + AnimationTimeAttribute.Tooltip +
  148. "\n\nDisabling the toggle automates the value:" +
  149. "\n• Speed >= 0 ends at 1x" +
  150. "\n• Speed < 0 ends at 0x";
  151. public const string CallbackTime = ProOnlyTag +
  152. "The time when the Event Callback will be triggered." +
  153. "\n• " + AnimationTimeAttribute.Tooltip;
  154. public const string MixerParameterBinding =
  155. "[Optional] The mixer's parameter will be controlled by the Animancer parameter with this name";
  156. /************************************************************************************************************************/
  157. }
  158. /************************************************************************************************************************/
  159. }
  160. }