How do I change the Technique at runtime in the Anti-aliasing script from Standard Assets?

I have a Dropdown in my menu that I want to use to change what kind of Anti-aliasing algorithm the game uses at runtime. Unfortunately, every time I try to directly access the public enum AAMode in Antialiasing.cs from a script attached to my camera, it gives me the error:

I have a number 0 through 6, gotten from Dropdown.value which I want to map to the settings. I have tried casting my int to an enum using (AAMode)myInt-- it doesn’t make any difference. There seems to be something preventing Unity from recognizing that the Antialiasing script contains an enum. Yes, I am using UnityStandardAssets.ImageEffects;

No idea why this isn’t working. This is a really essential feature for PC games. In fact, menus in general need to be supported a lot better than they are, just to keep pace with what the game-buying public expects from PC releases.

I’m an idiot.

The AAMode is the class. The name of the instance of the class is mode.

aa.mode = AAMode.FXAA2; works fine.

My bad.

I was actually wanting to make the exact same thing and im just wondering how you managed to make a script that is able to switch from FXAA to SMAA and vice versa. Thanks