Question by
vwerner · Sep 23, 2017 at 02:08 AM ·
script.disable1st person
Disable an added script from First Person Character
I added 2 scripts to the First Person Character camera to simulate blurred image in my game (Camera Motion Blur and Motion Blur). But I only want that these scripts keep enable for an specific time which I am using IEnumerator to control. How can I access these scripts to disable after the time pass by? Thanks in advance!!!
Comment
if (timeHasCome)
{
Camera.main.gameObject.GetComponent<WhateverItIsCalled>().enabled = false;
}
or Destroy(Camera.main.gameObject.GetComponent<WhateverItIsCalled>());
Your answer
Follow this Question
Related Questions
How do I disable enemy ai the script after enemy ai dies 1 Answer
Identical Lines of Code Will Either Disable, or Wont Disable a Script. Need Help. 0 Answers
What is wrong with my script? 1 Answer
Disable a script for a few seconds 2 Answers
How to enable and disable a script on an game object by pressing a keyboard button? 1 Answer