Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug DepthOfField active vs IsActive()

Discussion in 'High Definition Render Pipeline' started by Rowlan, Mar 28, 2021.

  1. Rowlan

    Rowlan

    Joined:
    Aug 4, 2016
    Posts:
    4,383
    I'm trying to toggle the active state of the DepthOfField script. For that purpose I'm saving the original value. However I noticed that there's a difference between
    active
    and
    IsActive()
    .

    Code (CSharp):
    1. public sealed class DepthOfField : VolumeComponentWithQuality, IPostProcessComponent
    2. {
    3.   ...
    4.   public bool IsActive();
    5.   ...
    6. }
    which is a subclass of VolumeComponent

    Code (CSharp):
    1. public class VolumeComponent : ScriptableObject
    2. {
    3.   public bool active;
    4.   ...
    5. }
    What's supposed to be the difference?