Okay, My game so working great! ... Up till now!
All I have done is changed two variables from state var, to just var (damage, and fireRate) - these are parts of the machine gun script in the FPS tutorial, I have just modified it slightly to work on a turret.
To The Point:
Like I said, all I have done is changed these two variable types. Now when I place my turret into a prefab and duplicate it around the map, I get a LOAD of errors, here are a few:
!CompareApproximately(Sqr
transform.rotation assign attempt for "Camera Orbi" is not valid. Input rotation is {NaN, NaN, NaN, NaN}.
transform.rotation.assign attempt for "Enemy0(Clone) is not valid. Input rotation is {NaN, NaN, NaN, NaN}.
Now, even when I'm not playing my game, and I'm just in the editor, I get an error for the scene camera (rotation NaN, NaN) and I can't even use that for editing - even when I change back my variables in my script.
What The Heck Is Going On?
How even these two variables caused such a massive melt down? All these variables do is control the turret firing.
Please Help
--- When I create e completely new project, I still get that scene camera error: ---
transform.rotation assign attempt for 'SceneCamera' is not valid. Input rotation is { NaN, NaN, NaN, NaN }.
UnityEditor.WindowLayout:LoadWindowLayout(String)