Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
Zac_

Using Image effects in code

Question

Hey guys, I'm trying to make

 

public VignetteAndChromaticAberration fader;

 

as a variable work, but it doesn't come up..anyone know how to do this?

 

In advance, thankyou very much!

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
Posted (edited)

I assume you are using the Post Processing Stack. If so, you can do it like this:

(Example: Set the chromatic aberration effect's intensity to 0.7)

Please login or register to see this code.

If not, you should use that one instead. ;) 

Edited by UnityGamesRoland

Share this post


Link to post
Share on other sites
  • 0

If you're using post processing stack v2, the way you access and change the effects will differ compared to the previous versions. v2 handle things in a cleaner presentation for modification.

There's even an exact example within the wiki/documentation for what you probably want to do: Please login or register to see this link.

 

You'll have to download v2 from the github, as it's not yet live on the asset store which has an earlier version that isn't handled the same way through code as v2.

Share this post


Link to post
Share on other sites
  • 0

Thanks guys but no luck...damn haha...mhmm, does anyone know if its possible to make it a variable? 

 

Maybe missing one of these?

 

using UnityEngine.????

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×