Без опису
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

DisallowMultipleRendererFeature.cs 931B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. /// <summary>
  5. /// <para>Prevents <c>ScriptableRendererFeatures</c> of same type to be added more than once to a Scriptable Renderer.</para>
  6. /// </summary>
  7. [AttributeUsage(AttributeTargets.Class)]
  8. public class DisallowMultipleRendererFeature : Attribute
  9. {
  10. /// <summary>
  11. /// Set the custom title for renderer feature.
  12. /// </summary>
  13. public string customTitle { private set; get; }
  14. /// <summary>
  15. /// Constructor for the attribute to prevent <c>ScriptableRendererFeatures</c> of same type to be added more than once to a Scriptable Renderer.
  16. /// </summary>
  17. /// <param name="customTitle">Sets the custom title for renderer feature.</param>
  18. public DisallowMultipleRendererFeature(string customTitle = null)
  19. {
  20. this.customTitle = customTitle;
  21. }
  22. }
  23. }