- Home /
Error Help (You can only call GUI functions from inside OnGUI.)
Ok so with my code i keep getting an error. ArgumentException: You can only call GUI functions from inside OnGUI. UnityEngine.GUIUtility.CheckOnGUI () (at C:/buildslave/unity/build/artifacts/EditorGenerated/GUIUtility.cs:229) UnityEngine.GUI.Box (Rect position, UnityEngine.GUIContent content, UnityEngine.GUIStyle style) (at C:/buildslave/unity/build/artifacts/EditorGenerated/GUI.cs:373) UnityEngine.GUI.Box (Rect position, System.String text) (at C:/buildslave/unity/build/artifacts/EditorGenerated/GUI.cs:366)
I keep getting this error and so i need someone to suggest how i can fix this error with my code.Thank you.
ArgumentException: You can only call GUI functions from inside OnGUI. UnityEngine.GUIUtility.CheckOnGUI () (at C:/buildslave/unity/build/artifacts/EditorGenerated/GUIUtility.cs:229) UnityEngine.GUI.Box (Rect position, UnityEngine.GUIContent content, UnityEngine.GUIStyle style) (at C:/buildslave/unity/build/artifacts/EditorGenerated/GUI.cs:373) UnityEngine.GUI.Box (Rect position, System.String text) (at C:/buildslave/unity/build/artifacts/EditorGenerated/GUI.cs:366)
Your answer
Follow this Question
Related Questions
Understanding Vehicle Damage script Variables? 0 Answers
What does that mean? "BCW0008: WARNING: Duplicate namespace: 'UnityEngine'" 1 Answer
NavMeshAgents Walking Into Walls 0 Answers
Enemy Seeking Missiles 0 Answers
Agents in a distributed game 0 Answers