Unity 2022.2 Sprite Skin and PSB import not working properly?

,

I’m trying to find some info on this. Ever since I updated from 2022.1 to 2022.2, PSBs have been difficult to click on in the editor.

Along with this, I am unable to rename bones in the Skinning Editor and the console spits out the following error whenever I try to do so. The problem seems to happen on a new project with a PSB dropped into it. Any help or info on this issue is appreciated.

ArgumentOutOfRangeException: startIndex cannot be larger than length of string.
Parameter name: startIndex
System.String.Substring (System.Int32 startIndex, System.Int32 length) (at <8f06425e63004caf99a79845675f751e>:0)
UnityEngine.TextEditingUtilities.DeleteSelection () (at <3859f4a893614f508581f22c26c521c2>:0)
UnityEngine.TextEditingUtilities.ReplaceSelection (System.String replace) (at <3859f4a893614f508581f22c26c521c2>:0)
UnityEngine.TextEditingUtilities.Insert (System.Char c) (at <3859f4a893614f508581f22c26c521c2>:0)
UnityEngine.UIElements.KeyboardTextEditorEventHandler.OnKeyDown (UnityEngine.UIElements.KeyDownEvent evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.KeyboardTextEditorEventHandler.ExecuteDefaultActionAtTarget (UnityEngine.UIElements.EventBase evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.TextEditingManipulator.ExecuteDefaultActionAtTarget (UnityEngine.UIElements.EventBase evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.TextElement.ExecuteDefaultActionAtTarget (UnityEngine.UIElements.EventBase evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtCurrentTargetAndPhase (UnityEngine.UIElements.EventBase evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.CallbackEventHandler.UnityEngine.UIElements.IEventHandler.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.EventDispatchUtilities.HandleEventAcrossPropagationPath (UnityEngine.UIElements.EventBase evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.EventDispatchUtilities.PropagateEvent (UnityEngine.UIElements.EventBase evt) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.KeyboardEventDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <469e18a818964f39910fa06bef052d82>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <3859f4a893614f508581f22c26c521c2>:0)

We are aware of this issue, but haven’t been able to find a good way to reproduce it.
Would you mind filing a bug report so that we can get another data point for this issue?
Once done, please post the bug ID in this thread, so that we can link the cases up.
Thanks!

Thanks, I believe that this is the bug report ID? “IN-25907”

Could it be that this has something to do with the editor layout? I noticed that when I try to reset it to default, the default always ends up being my own arrangement of the windows. Is there any additional trouble shooting I can go through there to manually reset the editor?

A few months ago, we updated the default inspector UI system from IMGUI to UI Toolkit. It seems like this bug snuck in during the change. I just spoke with the UI Toolkit team, and they have traced down the issue and are working on a fix for Unity 2022.2 and Unity 2023.1.
You can follow the progress here:

1 Like

Ok thanks for your help, I’ll keep an eye on this

1 Like

So I’ve found a bit of a work around for renaming bones in the skinning editor. The problem seems to only happen when clicking the name and immediately trying to type in a new name. If you do so, the console outputs the argument out-of-range exception error.

However, clicking the bone name and then using the arrow keys to shift the cursor around will allow you to rename it normally. It adds an extra step to the process but seems to work until an official fix is out.

It’s also worth noting that I did what the issue tracker says: “Note: To fix the bug you can check IMGUI in A new Project Setting added: Editor > Inspector > Use IMGUI Default Inspector to fallback to using IMGUI for default inspectors”

This didn’t outright fix it and I’m not sure if it had anything to do with getting the arrow keys to bypass the issue.

Thank you for sharing!
A fix for this issue has landed in Unity 2023.1.0a25, and the fix for Unity 2022.2 is pending. I’ve tried the 2023.1 version, and it seems to be all good there.

1 Like

Hello,
I’ve updated to 2022.2 and while the issue with clicking PSBs in the editor is corrected, I am still unable to rename bones properly. Additionally, some PSBs are missings chunks of the sprites that are showing up normally in older versions of the engine, as well as within photoshop. Are there any other known issues with PSBs or do I have an isolated case with this? Reimporting the PSB seems to have no effect on anything and I even tried things like resizing it and tweaking all of the import settings.

Hello,

Please file a bug report for this issue, so I can forward the issue to the UI Elements team.

We fixed a few PSD Importer issues in PSD Importer 8.0.2. Please make sure that you are using that version.
If the issues are still present in that version, do file an additional bug report, so we can take a closer look.
Thank you

I was missing the 8.0.2 update and that took care of the sprite issues. I’ve gone ahead and submit a bug report for the bone renaming issue as well.

Thanks for the help!

1 Like

I’m happy to hear that some of your issues got resolved.
Thanks for the bug report!