No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Deprecated.cs 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Reflection;
  5. namespace UnityEngine.Rendering
  6. {
  7. /// <summary>
  8. /// Exposes settings for shader variants
  9. /// </summary>
  10. [Obsolete("Use GraphicsSettings.GetRenderPipelineSettings<ShaderStrippingSetting>(). #from(23.3)")]
  11. public interface IShaderVariantSettings
  12. {
  13. /// <summary>
  14. /// Specifies the level of the logging for shader variants
  15. /// </summary>
  16. ShaderVariantLogLevel shaderVariantLogLevel { get; set; }
  17. /// <summary>
  18. /// Specifies if the stripping of the shaders variants needs to be exported
  19. /// </summary>
  20. bool exportShaderVariants { get; set; }
  21. /// <summary>
  22. /// Controls whether debug display shaders for Rendering Debugger are available in Player builds.
  23. /// </summary>
  24. bool stripDebugVariants { get => false; set { } }
  25. }
  26. public abstract partial class VolumeDebugSettings<T>
  27. {
  28. static List<Type> s_ComponentTypes;
  29. /// <summary>List of Volume component types.</summary>
  30. [Obsolete("Please use volumeComponentsPathAndType instead, and get the second element of the tuple", false)]
  31. public static List<Type> componentTypes
  32. {
  33. get
  34. {
  35. if (s_ComponentTypes == null)
  36. {
  37. s_ComponentTypes = VolumeManager.instance.baseComponentTypeArray
  38. .Where(t => !t.IsDefined(typeof(HideInInspector), false))
  39. .Where(t => !t.IsDefined(typeof(ObsoleteAttribute), false))
  40. .OrderBy(t => ComponentDisplayName(t))
  41. .ToList();
  42. }
  43. return s_ComponentTypes;
  44. }
  45. }
  46. /// <summary>Returns the name of a component from its VolumeComponentMenuForRenderPipeline.</summary>
  47. /// <param name="component">A volume component.</param>
  48. /// <returns>The component display name.</returns>
  49. [Obsolete("Please use componentPathAndType instead, and get the first element of the tuple", false)]
  50. public static string ComponentDisplayName(Type component)
  51. {
  52. if (component.GetCustomAttribute(typeof(VolumeComponentMenuForRenderPipeline), false) is VolumeComponentMenuForRenderPipeline volumeComponentMenuForRenderPipeline)
  53. return volumeComponentMenuForRenderPipeline.menu;
  54. if (component.GetCustomAttribute(typeof(VolumeComponentMenu), false) is VolumeComponentMenuForRenderPipeline volumeComponentMenu)
  55. return volumeComponentMenu.menu;
  56. return component.Name;
  57. }
  58. /// <summary>
  59. /// The list of the additional camera datas
  60. /// </summary>
  61. [Obsolete("Cameras are auto registered/unregistered, use property cameras", false)]
  62. protected static List<T> additionalCameraDatas { get; private set; } = new List<T>();
  63. /// <summary>
  64. /// Register the camera for the Volume Debug.
  65. /// </summary>
  66. /// <param name="additionalCamera">The AdditionalCameraData of the camera to be registered.</param>
  67. [Obsolete("Cameras are auto registered/unregistered", false)]
  68. public static void RegisterCamera(T additionalCamera)
  69. {
  70. if (!additionalCameraDatas.Contains(additionalCamera))
  71. additionalCameraDatas.Add(additionalCamera);
  72. }
  73. /// <summary>
  74. /// Unregister the camera for the Volume Debug.
  75. /// </summary>
  76. /// <param name="additionalCamera">The AdditionalCameraData of the camera to be registered.</param>
  77. [Obsolete("Cameras are auto registered/unregistered", false)]
  78. public static void UnRegisterCamera(T additionalCamera)
  79. {
  80. if (additionalCameraDatas.Contains(additionalCamera))
  81. additionalCameraDatas.Remove(additionalCamera);
  82. }
  83. }
  84. public sealed partial class DebugManager
  85. {
  86. /// <summary>
  87. /// Toggle the debug window.
  88. /// </summary>
  89. /// <param name="open">State of the debug window.</param>
  90. [Obsolete("Use DebugManager.instance.displayEditorUI property instead. #from(23.1)")]
  91. public void ToggleEditorUI(bool open) => editorUIState.open = open;
  92. }
  93. /// <summary>
  94. /// A marker to adjust probes in an area of the scene.
  95. /// </summary>
  96. [Obsolete("ProbeTouchupVolume has been deprecated (UnityUpgradable) -> ProbeAdjustmentVolume", false)]
  97. public class ProbeTouchupVolume : ProbeAdjustmentVolume
  98. {
  99. }
  100. }