Search Issue Tracker
Fixed
Fixed in 5.2.7, 7.0.10, 9.0.2, 10.0.0
Votes
0
Found in [Package]
5.2.4
7.0.8
8.0.4
9.0.0
10.0.0-pre.2
Issue ID
DANB-335
Regression
No
"System.ArgumentException" thrown when opening sprite Prefab with Script
How to reproduce:
1. Open the attached project “IN_19742.zip“
2. Press Example → Load SpriteSkin Prefab
3. Observe the Console
Expected result: no exception in the Console
Actual result: exception in the Console
Reproducible with: 5.2.4 (2020.3.41f1), 7.0.8 (2021.3.12f1), 8.0.4 (2022.1.21f1), 9.0.0 (2022.2.0b13, 2023.1.0a16)
Reproducible on: Windows 10 Pro
Notes:
- Not reproducible without com.unity.collections and com.unity.burst packages
- Reproducible the first time after opening the project
Exception:
System.ArgumentException: Could not load Prefab contents at path Assets/SpriteSkin Prefab/SpriteSkinPrefab.prefab. Prefabs should have exactly 1 root GameObject, 2 was found.
at UnityEditor.PrefabUtility.LoadPrefabContents (System.String assetPath) [0x0009a] in <5e26277f966d4f80afa5d51573eba699>:0
at TestLoadPrefabContents.LoadCheckmarkPrefab () [0x00002] in C:\Users\danielius.pliuskys\Downloads\My Projectdadw\Assets\TestLoadPrefabContents.cs:37
UnityEngine.Debug:Log (object)
TestLoadPrefabContents:LoadCheckmarkPrefab () (at Assets/TestLoadPrefabContents.cs:43)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 10.0.0):
Fixed for 2D Animation 10.0.0
Resolution Note (fix version 9.0.2):
Fixed for 2D Animation 9.0.2
Resolution Note (fix version 5.2.7):
This will be fixed in 2D Animation 5.2.7