mirror of https://github.com/tuyoogame/YooAsset
fix #404
parent
5f4e1d0b2f
commit
4b0c52d2dd
|
@ -22,7 +22,7 @@ namespace YooAsset
|
||||||
private readonly bool _actived;
|
private readonly bool _actived;
|
||||||
private ESteps _steps = ESteps.None;
|
private ESteps _steps = ESteps.None;
|
||||||
|
|
||||||
#if UNITY_2022_3_OR_NEWER
|
#if UNITY_2023_3_OR_NEWER
|
||||||
private AsyncInstantiateOperation _instantiateAsync;
|
private AsyncInstantiateOperation _instantiateAsync;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ namespace YooAsset
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_2022_3_OR_NEWER
|
#if UNITY_2023_3_OR_NEWER
|
||||||
//TODO
|
//TODO
|
||||||
// BUG环境:Windows平台,Unity2022.3.41f1版本,编辑器模式。
|
// BUG环境:Windows平台,Unity2022.3.41f1版本,编辑器模式。
|
||||||
// BUG描述:异步实例化Prefab预制体,有概率丢失Mono脚本里序列化的数组里某个成员!
|
// BUG描述:异步实例化Prefab预制体,有概率丢失Mono脚本里序列化的数组里某个成员!
|
||||||
|
@ -95,7 +95,7 @@ namespace YooAsset
|
||||||
Status = EOperationStatus.Succeed;
|
Status = EOperationStatus.Succeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_2022_3_OR_NEWER
|
#if UNITY_2023_3_OR_NEWER
|
||||||
if (_steps == ESteps.CloneAsync)
|
if (_steps == ESteps.CloneAsync)
|
||||||
{
|
{
|
||||||
if (_instantiateAsync == null)
|
if (_instantiateAsync == null)
|
||||||
|
@ -157,7 +157,7 @@ namespace YooAsset
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Cancel()
|
public void Cancel()
|
||||||
{
|
{
|
||||||
#if UNITY_2022_3_OR_NEWER
|
#if UNITY_2023_3_OR_NEWER
|
||||||
if (_instantiateAsync != null && _instantiateAsync.isDone == false)
|
if (_instantiateAsync != null && _instantiateAsync.isDone == false)
|
||||||
_instantiateAsync.Cancel();
|
_instantiateAsync.Cancel();
|
||||||
#endif
|
#endif
|
||||||
|
@ -189,10 +189,10 @@ namespace YooAsset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if UNITY_2022_3_OR_NEWER
|
#if UNITY_2023_3_OR_NEWER
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 异步实例化
|
/// 异步实例化
|
||||||
/// 注意:Unity2022.3及以上版本生效
|
/// 注意:Unity2022.3.20f1及以上版本生效
|
||||||
/// https://docs.unity3d.com/2022.3/Documentation/ScriptReference/Object.InstantiateAsync.html
|
/// https://docs.unity3d.com/2022.3/Documentation/ScriptReference/Object.InstantiateAsync.html
|
||||||
/// </summary>
|
/// </summary>
|
||||||
internal static AsyncInstantiateOperation InstantiateAsyncInternal(UnityEngine.Object assetObject, bool setPositionAndRotation, Vector3 position, Quaternion rotation, Transform parent, bool worldPositionStays)
|
internal static AsyncInstantiateOperation InstantiateAsyncInternal(UnityEngine.Object assetObject, bool setPositionAndRotation, Vector3 position, Quaternion rotation, Transform parent, bool worldPositionStays)
|
||||||
|
|
Loading…
Reference in New Issue