Search Unity

[URP] changing motion blur quality through runtime.

Discussion in 'Universal Render Pipeline' started by Helper0, Feb 8, 2021.

  1. Helper0

    Helper0

    Joined:
    Feb 8, 2021
    Posts:
    9
    Is there any ways to change the motion blur quality real time through runtime?

    I alredy tried and its not work. Also theres still no one discuss about this.
    If theres someone who know about this please let discuss it in here! Because your answer will help other people there. Thanks!!
     
  2. sachagdm

    sachagdm

    Joined:
    Dec 28, 2018
    Posts:
    2
    Get a reference to your volume and make a MotionBlur field, in awake you can get the motion blur component with volume.profile.TryGet<T>(out);

    Code (CSharp):
    1.  
    2. Volume volume;
    3. MotionBlur motionBlur;
    4.  
    5. Awake()
    6. {
    7. MotionBlur tmpBlur;
    8. if (volume.profile.TryGet<MotionBlur>(out tmpBlur))
    9.     motionBlur = tmpBlur;
    10. }
    11.  
     
    manbearpigman likes this.