Quantcast
Channel: Questions in topic: "package"
Viewing all articles
Browse latest Browse all 690

How to modify variables from scripts in standard package?

$
0
0
Hi, I have a main camera attached with lots of Image Effects, enabled from standard packages, such as CameraMotionBlur, SSAO, and Depth of Field to say a few. My problem is, I cannot get the script objects (Ex.: GetComponent(DepthOfFieldScatter)), therefore I cannot modify their variables nor turning on/off the scripts. However, it is completely fine with SSAOEffect. The fact that I found is, SSAOEffect script is a child of MonoBehaviour, while others' parent class is PostEffectsBase. If I have scripts or attach a script from the package with MonoBehaviour, yes it can be accessed normally. Any idea? Thanks. EDIT: It might be very helpful if anyone who follow this thread could try on their own if they're willing to: - Use Unity Pro/Pro trial 4.x (4.3 to be exact) - Create a new project and add Image Effects (Pro only) package. - Add SSAOEffect (Add Component -> Image Effects -> Rendering -> Screen Space Ambient Occlusion)) and add DepthOfFieldScatter (Add Component -> Image Effects -> Camera -> Depth of Field (Lens Blur, Scatter, DX11)) to main camera. - Try to access both scripts in your own behavior script.

Viewing all articles
Browse latest Browse all 690

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>