Method GetOrLoad
GetOrLoad<T>(string, AssetTier)
Synchronous load. GONE — it throws on every platform, on purpose.
It is wrong twice over: WaitForCompletion throws where there is no JIT (WebGL), and where it does
work it is the thing that forces every consumer to be prefetched up front, which is what the tier
taxonomy was invented to paper over.
It throws on DESKTOP TOO deliberately. A door that only fails on one platform is worse than no door: the editor would keep working while the browser broke, and the miss would be found in a WebGL build instead of in the editor. Same code path, same failure, both platforms.
Replace with Get<T>(string) (must already be resident), GetOrLoadAsync<T>(string, AssetTier, CancellationToken) (the caller can await), or WhenResident<T>(string, Action<T>) (the caller cannot wait and must not block).
[Obsolete("Synchronous loading is gone on every platform. Use Get<T> for resident content, GetOrLoadAsync<T> to acquire, or WhenResident<T> to defer.")]
public static T GetOrLoad<T>(string address, AssetTier tier = AssetTier.Definition) where T : Object
Parameters
Returns
- T
Type Parameters
T