Search Issue Tracker
Fixed
Fixed in 2023.2.15f1, 6000.0.0b11
Votes
0
Found in
2023.2.8f1
2023.3.0b7
6000.0.0b11
Issue ID
UUM-61722
Regression
No
“UnityException: CreateScriptableObjectInstanceFromType can only be called from the main thread" errors are thrown when the VisualTreeAsset layout has text and it is assigned to uiDocument.visualTreeAsset property
Reproduction steps:
1. Open the attached “Project” project
2. Open the “Assets/Scenes/BootstrapScene.unity” Scene
3. Enter the Play Mode
4. Observe the Console Window
Expected result: No error is thrown
Actual result: Two “UnityException: CreateScriptableObjectInstanceFromType can only be called from the main thread" errors are thrown
Reproducible with: 2023.2.8f1
Could not test with: 2021.3.34f1 (“error CS0246” and two “error CS0115” compilation errors), 2022.3.19f1 (“error CS0246: The type or namespace name 'UxmlAttributeConverter<>' could not be found” compilation error), 2023.3.0b4 (“error CS0101: The namespace '<global namespace>' already contains a definition for 'IronSource'“ compilation error)
Reproducible on: macOS Sonoma 14.1.2 (Intel), Windows 10 (user’s)
Not reproducible on: No other environment tested
Note: The errors are thrown when exciting the Play Mode as well
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
- Game controller input doesn't work on VisionOS 2.0
- WebCamTexture does not set the requested resolution when used in WebGL
- Editor default Stylesheet/Matching Selector buttons in Debugger don't do anything
- Graphics.DrawMeshNow stops rendering Render Texture after a few frames when viewed in the Player
- New selector in Matching Selectors displays as on line -1 in debugger
Resolution Note (fix version 6000.0.0b11):
Fixed exception "CreateScriptableObjectInstanceFromType can only be called from the main"
Resolution Note (fix version 2023.2.15f1):
Fixed exception "CreateScriptableObjectInstanceFromType can only be called from the main"