- Home /
How can you access and change the values of the Vignette and chromatic abberation script progromatically?
I am trying to access the Vignette and chromatic aberration script on my camera, however, when I try to, it gives me this error:
The type or namespace name "VignetteAndChromaticAberration" could not be found. Are you missing a using directive or an assembly reference?
How can I make this script work?
using UnityEngine;
using System.Collections;
public class Choking : MonoBehaviour {
// Use this for initialization
void Start () {
gameObject.GetComponent<VignetteAndChromaticAberration>().Vignetting=5;
}
// Update is called once per frame
void Update () {
}
}
Answer by Melloe · Aug 15, 2015 at 08:55 PM
Just had this issue myself, add " using UnityStandardAssets.ImageEffects; " at the top of your script and you will be able to reference it.
O$$anonymous$$G it works. You just save my day. For further users: check the names inside original script, to get exact names, its different of those in interface you see.
Your answer
Follow this Question
Related Questions
Errors! Nooooooooooo! :( 2 Answers
Shader looks different in game than in scene view 0 Answers
Image effect or shader that renders alpha? 0 Answers