diff --git a/Assets/YooAsset/Runtime/YooAssetsExtension.cs b/Assets/YooAsset/Runtime/YooAssetsExtension.cs index 5d3d9fd..4abf39f 100644 --- a/Assets/YooAsset/Runtime/YooAssetsExtension.cs +++ b/Assets/YooAsset/Runtime/YooAssetsExtension.cs @@ -15,7 +15,12 @@ namespace YooAsset /// </summary> public static bool IsInitialized { - get { return _mainPackage.IsInitialized; } + get + { + if (_mainPackage == null) + return false; + return _mainPackage.IsInitialized; + } } /// <summary>