Im having problems with global name spaces in Unity With C#
I have the following code in two separate files
FILE: MyUtil.cs
using ....
using ....
public class MyUtil : Photon.PunBehaviour
{
public static IEnumerator DoStuff(string link)
{
WWW sss=new WWW(link);
yield return sss;
}
}
FILE: TestClass.cs
using ....
using ....
namespace NewNameSpace {
public class TestClass : MonoBehaviour
{
public void useIt()
{
StartCoroutine(global::MyUtil.DoStuff("www.link.com")); <<< error here
}
}
}
Im getting error on the StartCoroutine line saying that MyUtil class itself is not found in the global namespace.
I want to call MyUtil.DoStuff from useIt method, but it wont compile.
Anybody knows why?
Thanks
global::, have you tried?util.csin your assets folder or is it a file on your hard drive? Can you edit your question with a screenshot of the assets folder with these two files?