Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Instantiating PostProcessingProfile in runtime bug?

Discussion in 'General Graphics' started by marchall_box, Dec 17, 2020.

  1. marchall_box

    marchall_box

    Joined:
    Mar 28, 2013
    Posts:
    139
    Hello,

    I am instantiating PostProcessingProfile in runtime as below.

    Code (CSharp):
    1. PostProcessProfile newProfile = Instantiate(postProcessVolume.profile);
    then I modify value of
    newProfile
    like below

    Code (CSharp):
    1. newProfile.TryGetSettings(out _dof);
    2. _dof.active = false;
    However it also changes the value of
    postProcessVolume.profile
    aka the source of profile instantiation which I am not interested in modifying.

    Am I doing something wrong here?