Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Bug Can't add scripts to execution order

Discussion in 'UI Toolkit' started by b4gn0, Nov 17, 2020.

  1. b4gn0

    b4gn0

    Joined:
    Jul 26, 2019
    Posts:
    119
    Unity 2020.2.0b11
    UI Toolkit 1.0.0-preview.12

    upload_2020-11-17_18-25-3.png

    Clicking the plus sign on the down arrow doesn't open the script list, but instead adds the first script of the list (in this case, Unity.Analytics):

    ArgumentException: An item with the same key has already been added. Key: Packages/com.unity.analytics/Unity.Analytics.Tracker.dll.meta
    System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <9577ac7a62ef43179789031239ba8798>:0)
    UnityEditor.ScriptExecutionOrderInspector.ShowScriptPopup (UnityEngine.Rect r) (at <8aef0719dcf04fbdbbbfd39d73f62749>:0)
    UnityEditor.ScriptExecutionOrderInspector.OnInspectorGUI () (at <8aef0719dcf04fbdbbbfd39d73f62749>:0)
    UnityEditor.AssetSettingsProvider.OnGUI (System.String searchContext) (at <8aef0719dcf04fbdbbbfd39d73f62749>:0)
    UnityEditor.SettingsWindow.DrawControls () (at <8aef0719dcf04fbdbbbfd39d73f62749>:0)
    UnityEditor.SettingsWindow.DrawSettingsPanel () (at <8aef0719dcf04fbdbbbfd39d73f62749>:0)
    UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/IMGUIContainer.cs:366)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/IMGUIContainer.cs:676)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/IMGUIContainer.cs:648)
    UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/IMGUIContainer.cs:641)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUIRaw (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/IMGUIContainer.cs:607)
    UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus, System.Boolean verifyBounds) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/IMGUIContainer.cs:596)
    UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/IMGUIContainer.cs:529)
    UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/IEventDispatchingStrategy.cs:113)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToRegularTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/MouseEventDispatchingStrategy.cs:35)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.SendEventToTarget (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/MouseEventDispatchingStrategy.cs:26)
    UnityEngine.UIElements.MouseEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel iPanel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Events/MouseEventDispatchingStrategy.cs:19)
    UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:373)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:336)
    UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:299)
    UnityEngine.UIElements.EventDispatcher.OpenGate () (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:264)
    UnityEngine.UIElements.EventDispatcherGate.Dispose () (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:75)
    UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:364)
    UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/EventDispatcher.cs:216)
    UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/Panel.cs:411)
    UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/UIElementsUtility.cs:466)
    UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/UIElementsUtility.cs:209)
    UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/UIElementsUtility.cs:74)
    UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at Library/PackageCache/com.unity.ui@1.0.0-preview.12/Core/UIElementsUtility.cs:28)
    UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <a8eb1be68acb4659af00824c7808e2c0>:0)
     
    CloudyVR and xCasparev like this.
  2. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    733
    Hello, are you sure this happens because of the UI Toolkit package?
     
  3. b4gn0

    b4gn0

    Joined:
    Jul 26, 2019
    Posts:
    119
    Yes, this is 2020.2.0b11 without UI Toolkit added:

    upload_2020-11-18_9-38-39.png
     
  4. b4gn0

    b4gn0

    Joined:
    Jul 26, 2019
    Posts:
    119
    Case 1293477
     
  5. CxydaInno

    CxydaInno

    Joined:
    Sep 5, 2017
    Posts:
    14
    hmm hey guys ! I have the same issue but i do NOT have UITK added. Using Unity 2020.2.f1

    But for me it does not add anything when i click the "+" button. It only logs the error:
    (Started to happen after I upgraded from Unity2019.4 to 2020.2.f1)

    List of installed packages:
    EDIT: Workaround: Uninstalling Analytics 3.5.3. "fixes" it!

    Best Cxyda
     
    Last edited: Dec 21, 2020
    xCasparev and PraetorBlue like this.
  6. POiD96

    POiD96

    Joined:
    Aug 16, 2016
    Posts:
    4
    Same issue experienced in 2020.2.1f1. Removing Analytics 3.5.3 also solved it.
     
    PraetorBlue likes this.
  7. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
    Chiming in that I had the same issue and was able to workaround the same way - by removing Analytics 3.5.3 from the project. I do think I will eventually want to add the Analytics package to my project so it would be nice to see this bug fixed!

    Unity 2020.2.1f1 here as well.

    Additionally, removing the package caused this warning to appear endlessly until Editor restart:
    https://forum.unity.com/threads/rem...rchasing-issues-warnings.586759/#post-5393196
     
    Last edited: Jan 19, 2021
  8. spiritworld

    spiritworld

    Joined:
    Nov 26, 2014
    Posts:
    29
    Workaround: drag and drop your scripts.

    I have Unity 2020.2.0f1
     
    Laiken, caiovini980 and Cenda like this.
  9. caiovini980

    caiovini980

    Joined:
    Apr 6, 2020
    Posts:
    8
    Thanks! Exactly what I was looking for.