Quantcast
Channel: Answers by "hoekkii"
Viewing all articles
Browse latest Browse all 26

Answer by hoekkii

$
0
0
Add this on line 3: using UnityStandardAssets.ImageEffects; so the script would look like this: using UnityEngine; using System.Collections; using UnityStandardAssets.ImageEffects; [RequireComponent(typeof(MotionBlur))] public class EnableComponents : MonoBehaviour { private MotionBlur motionBlur = null; public MotionBlur MotionBlur { get { if (motionBlur == null) { motionBlur = GetComponent(); } return motionBlur; } } void Update() { if (Input.GetKeyUp(KeyCode.Space)) { MotionBlur.enabled = !MotionBlur.enabled; } } } And for the trigger, use: "http://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html" and "http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnTriggerExit.html"

Viewing all articles
Browse latest Browse all 26

Trending Articles



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