Sudden errors for GUI.DrawTexture

Hi, this morning I suddenly got errors when trying to compile scripts. Everything was working the previous day.

I’m using Unity 5.2.4. So when I try to compile for instance something like this I get “Best overload method match for 'UnityEngine.GUI.DrawTexture(UnityEnginge.Rect, UnityEngine.Texture) ’ has some invalid arguments” and “Argument 2 cannot convert ‘Texture’ expression to type ‘UnityEngine.Texture’”

using UnityEngine;
  using UnityEngine.Collections;
 
  public class MainUI : MonoBehaviour
  {
  public Texture sampleTex;
 
  void OnGUI ()
  {
  GUI.DrawTexture(new Rect(0, 0, 100, 100), sampleTex);
  }
  }

This happened to all of my scripts and got 344 of these errors in total. But why all of the sudden when it work yesterday. Any help will be greatly appreciated.

Thanks
–Andre

False alarm everyone, I just had a class named Texture.

1 Like