- Home /
What wrong with3.4?
I just delete 3.3 and install 3.4. Now I am having very strange errors:
function OnGUI() {
if (GUI.Button(Rect(10,70,50,30),"Click"))
Debug.Log("Clicked the button with text");
}
And I got below error when run:
MissingMethodException: Method not found: 'GUI.Button'. Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.ProduceExtensionDispatcher () Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.Create () Boo.Lang.Runtime.RuntimeServices.DoCreateMethodDispatcher (System.Object target, System.Type targetType, System.String name, System.Object[] args) Boo.Lang.Runtime.RuntimeServices.CreateMethodDispatcher (System.Object target, System.String name, System.Object[] args) Boo.Lang.Runtime.RuntimeServices+c_AnonStorey12.m_6 () Boo.Lang.Runtime.DynamicDispatching.DispatcherCache.Get (Boo.Lang.Runtime.DynamicDispatching.DispatcherKey key, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type[] cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object[] args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Besides, even I create a test project contain 1 test script just like above. When I click "Run" button, it is 2 times slower than in 3.3.
WHAT WRONG WITH THIS 3.4????
Answer by Waz · Aug 25, 2011 at 11:57 AM
You probably have a script called GUI.js - don't do that. No idea why it worked for you before.
Your other issue with slow transition to Play mode is unrelated (and, IIRC, reported elsewhere, not much we can do about it).
I made a stupid mistake. Its "GUI.js" problem, I just created it for testing. And After I renamed it, it can run and the speed is also back to usual. Thanks for pointing it out so quickly.
Your answer