Search Issue Tracker
By Design
Votes
1
Found in
2017.4
2018.4
2019.3
2019.3.0f5
2020.1
2020.2
Issue ID
1221091
Regression
No
The "Preloaded Assets" from Player Settings do not always get preloaded when entering Play mode in Editor
How to reproduce:
1. Open 'Scene' from "PreloadedAssetsInit.zip"
2. Start Play mode
3. Inspect the text line in Game window
Expected result: Text is "Loaded correctly"
Actual result: Text is "Not loaded"
Reproducible with: 2017.4.37f1, 2018.4.19f1, 2019.3.5f1, 2020.1.0b1, 2020.2.0a2
Notes:
1. The ScriptableObject gets loaded and its OnEnable() called as expected in Editor after selecting it from Project window or opening Player settings window.
2. Need to open project normally to reproduce. Might not reproduce right after project upgrage/downgrade.
Comments (2)
-
v01pe_
Apr 28, 2021 14:23
Hmmm… I feel the same about "by design". If you're here, because you want to get ScriptableObjects enabled in the editor w/o the need to manually load or reference them in some way, here's my workaround: https://forum.unity.com/threads/how-does-preloaded-assets-in-player-settings-work.318259/#post-7086490
-
caardappel-hbs
Feb 12, 2021 17:14
The documentation is completely unclear on this point and should offer an example of how to best manage it in Editor if it is a feature that is used. Closing this as "By Design" is extremely frustrating.
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
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
- Editor crashes on PPtr<Mesh> after adding Text Mesh and Cloth Components to the same GameObject
Resolution Note:
https://docs.unity3d.com/ScriptReference/PlayerSettings.GetPreloadedAssets.html
Per documentation, preloaded assets are only loaded as part of the player startup sequence, not editor play mode as those are different things.