Nessuna descrizione
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.

Light2DPoint.cs 2.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. using System;
  2. namespace UnityEngine.Rendering.Universal
  3. {
  4. public sealed partial class Light2D
  5. {
  6. [SerializeField] float m_PointLightInnerAngle = 360.0f;
  7. [SerializeField] float m_PointLightOuterAngle = 360.0f;
  8. [SerializeField] float m_PointLightInnerRadius = 0.0f;
  9. [SerializeField] float m_PointLightOuterRadius = 1.0f;
  10. /// <summary>
  11. /// The inner angle of the point light shape. The bigger the angle, the wider the gap.
  12. /// The gap between the innner and outer angle will determine the size of the light's penumbra.
  13. /// </summary>
  14. public float pointLightInnerAngle
  15. {
  16. get => m_PointLightInnerAngle;
  17. set => m_PointLightInnerAngle = value;
  18. }
  19. /// <summary>
  20. /// The angle that determins the shape of the inner light area.
  21. /// The gap between the innner and outer angle will determine the size of the light's penumbra.
  22. /// </summary>
  23. public float pointLightOuterAngle
  24. {
  25. get => m_PointLightOuterAngle;
  26. set => m_PointLightOuterAngle = value;
  27. }
  28. /// <summary>
  29. /// The radius of the inner light area that has full brightness.
  30. /// The gap between the inner and outer radius will determine the size of the light's penumbra.
  31. /// </summary>
  32. public float pointLightInnerRadius
  33. {
  34. get => m_PointLightInnerRadius;
  35. set => m_PointLightInnerRadius = value;
  36. }
  37. /// <summary>
  38. /// The outer radius that determines the size of the light.
  39. /// The gap between the inner and outer radius will determine the size of the light's penumbra.
  40. /// </summary>
  41. public float pointLightOuterRadius
  42. {
  43. get => m_PointLightOuterRadius;
  44. set => m_PointLightOuterRadius = value;
  45. }
  46. /// <summary>
  47. /// The point light distance.
  48. /// This is obsolete and has been changed to normalMapDistance.
  49. /// </summary>
  50. [Obsolete("pointLightDistance has been changed to normalMapDistance", true)]
  51. public float pointLightDistance => m_NormalMapDistance;
  52. /// <summary>
  53. /// The quality of the point light.
  54. /// This is obsolete and has been changed to normalMapQuality.
  55. /// </summary>
  56. [Obsolete("pointLightQuality has been changed to normalMapQuality", true)]
  57. public NormalMapQuality pointLightQuality => m_NormalMapQuality;
  58. internal bool isPointLight => m_LightType == LightType.Point;
  59. }
  60. }