WHY CAN'T I USE Time.deltaTime?!
Until I made a new cs file, added it to a gameObject and then deleted the new file, everything was fine. Now, I can't even type Time.deltaTime, because that monodevelop won't give me the option to write deltaTime after Time, and it also means that every time that I use it, he gives me an error. I'm building a game, that based on Time.deltaTime, for every step. There is anyone who knows about this error, or maybe even how to fix it? Please Help Me!!
Btw I'm using c#
*EDIT - By using "UnityEngine" before Time.deltaTime, it works. but, still I can't understand why is that happening
I get this error (and you won't believe it) - Time dose on contain a definition for deltaTime. AND YES, I DO USE 'UnityEngine'.
Answer by Siraaaj-Ahmed · Apr 30, 2017 at 04:50 PM
I had the same issue, It was because I had another script with the "Time" class which conflicted with the Global "Time" hence the issue.
Rename your "Time" class (Could be a Time script from a third party plugin too).
Answer by jgodfrey · Apr 25, 2016 at 11:53 PM
I assume the script in question is simply missing the following at the top of the file:
using UnityEngine;
Your answer
Follow this Question
Related Questions
Is this a bug in MonoDevelop? I do NOT see what is wrong 2 Answers
error CS1041: Identifier expected 1 Answer
Start animation with different game object 0 Answers
Why are the texts red on monodevelop? 3 Answers
Select Word in MonoDevelop 2 Answers