I’m trying to call the function FindObjectsOfType () from within a class that doesn’t derive from Object.
class TestClass {
function DoSomething ()
{
var allTex = Object.FindObjectsOfType (Texture2D);
}
}
This gives me the following error: MissingMethodException: Method not found: ‘System.Object.FindObjectsOfType’.
But FindObjectsOfType is a static function and a member of Object. Anyone know what I’m doing wrong?
Thanks