Hi, I have a first person player in my game. On the player’s camera there is a motion blur script which is disabled. I want when my player Enters a trigger effect enables.
I was looking on google and trying to figure it out but everything was wrong.
Plss help me out with code (C#)!
this code doesn’t woork:
using UnityEngine;
using System.Collections;
public class EnableComponents : MonoBehaviour
{
private Script blur;
void Start ()
{
blur= GetComponent<MotionBlur>();
}
void Update ()
{
if(Input.GetKeyUp(KeyCode.Space))
{
blur.enabled = !blur.enabled;
}
}
}