Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
3
Question by Zszen-John · Mar 29, 2016 at 07:28 AM · erroreditorscenecolorpicker

InvalidOperationException: Operation is not valid due to the current state of the object System

  1. create a GameObject and set a public param named color.

  2. go to Scene and editor the color param with color picker.

  3. then throw this error. While it I don't run the game.

How can I fix it ? Or software error? In ver.5.3.4f1

I don't understand. And I don't run the game.

 InvalidOperationException: Operation is not valid due to the current state of the object
 System.Collections.Generic.Stack`1[System.Boolean].Pop ()
 UnityEditor.EditorGUI.EndDisabledGroup () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:211)
 UnityEditor.EditorGUI+DisabledGroupScope.CloseScope () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:197)
 UnityEngine.GUI+Scope.Dispose ()
 UnityEditor.Editor.OptimizedInspectorGUIImplementation (Rect contentRect) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:234)
 UnityEditor.GenericInspector.OnOptimizedInspectorGUI (Rect contentRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GenericInspector.cs:33)
 UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1211)
 UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1028)
 UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:352)
 System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
 

dev code is simple:

 using UnityEngine;
 using System.Collections;
 
 public class Test : MonoBehaviour {
 
     public Color color;
     // Use this for initialization
     void Start () {
     
     }
     
     // Update is called once per frame
     void Update () {
     
     }
 }
 

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by colorpillar · Apr 16, 2016 at 06:11 PM

Hello, this should be similar to this: http://answers.unity3d.com/questions/852155/invalidoperationexception-operation-is-not-valid-d-1.html

Reset your Unity layout to default and restart Unity and hopefully the problem will go away.

On my end (mac) it started after I added a Color member to a custom MonoBehaviour. From then on whenever I clicked on any colour selection panel the error popped up. For example in the Main Camera. I did have a browser-based video stream playing in full-screen on a second monitor and once I got the Color selector panel back it appeared on that monitor. Maybe that's related.

I have not overridden OnGUI or any other editor-related functionality. Restart of Unity+Mac did not help. Suggestions on the web include try/catching the Exception in OnGUI and ignoring it but that is not satisfactory.

This was my error:

InvalidOperationException: Operation is not valid due to the current state of the object System.Collections.Generic.Stack`1[System.Boolean].Pop () UnityEditor.EditorGUI.EndDisabledGroup () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:211) UnityEditor.EditorGUI+DisabledGroupScope.CloseScope () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorGUI.cs:197) UnityEngine.GUI+Scope.Dispose () UnityEditor.Editor.OptimizedInspectorGUIImplementation (Rect contentRect) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:234) UnityEditor.GenericInspector.OnOptimizedInspectorGUI (Rect contentRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/GenericInspector.cs:33) UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean rebuildOptimizedGUIBlock, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1211) UnityEditor.InspectorWindow.DrawEditors (UnityEditor.Editor[] editors) (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1028) UnityEditor.InspectorWindow.OnGUI () (at /Users/builduser/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:352) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image DDeathlonger · Nov 20, 2017 at 06:24 AM 0
Share

Didn't change anything for me...

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

68 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

My map turns blue red and green always! 0 Answers

Unity editor CTD 0 Answers

[SOLVED] Copying assembly from 'Temp/....dll' to 'Library/...' failed (project stucked) 0 Answers

Any easy way to rearrange scene names 1 Answer

Unity Error CS0234: SceneMangement 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges