Closed HaraldCsaszar closed 2 years ago
I still have this error for some reason
I am going to try:
string[] assets = AssetDatabase.FindAssets("SpineEditorUtilities t:script a:all");
SpineEditorUtilities.ConfirmInitialization is called on a worker thread. This is the problem.
This issue is being caused by RenderStaticPreview being overridden in UnityEditor.Editor for the custom inspectors. I'll stop commenting and submit a pull request after I fix it.
Originally reported on the following issue ticket by @ianmccleary: "[unity] Unity scoped package registry #1676" https://github.com/EsotericSoftware/spine-runtimes/issues/1676#issuecomment-1151741056_ Split off to this separate issue ticket.
Original text below: Hello, I'm importing the spine runtimes through UPM in Unity 2020 LTS. It often runs into an "Index out of bounds of the array" error at this line (176)
https://github.com/EsotericSoftware/spine-runtimes/blob/0c286734a7274b63ac07c9f494a2260b6e188819/spine-unity/Assets/Spine/Editor/spine-unity/Editor/Utility/SpineEditorUtilities.cs#L175-L176
I believe this happens because the FindAssets call is not properly looking in the Packages folder. I fixed it locally by adding a folder arg to FindAssets in line 175 and 179:
This forces Unity to search in both the Packages and Assets folder. However, I have not tested if this works if the package is imported in the traditional way and lives in the Asset folder. I apologize, as I don't have the bandwidth to properly test this fix myself. Could this be looked into further?