Search Issue Tracker
Fixed
Fixed in 2023.2.15f1, 2023.3.0b11
Votes
0
Found in
2023.2.8f1
2023.3.0b7
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
- “[Worker0] Could not generate preview image“ error when opening macOS native plugin in the Inspector with Architecture to build for set to ARM 64-bit
- [iOS] Application.absoluteURL is empty on Awake/Start when opening via deep link with Splash Screen disabled
- Crash on MemoryManager::Deallocate when rapidly calling Addressables.LoadAssetAsync
- Crash on physx::shdfnd::atomicIncrement when adjusting values on a character controller component after entering Play mode in Prefab edit mode
- [Rendering Debugger] [NewInputSystem] Debug Overlays in Play mode throws InvalidOperationException when using New Input System
Resolution Note (fix version 2023.3.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"