diff --git a/Assets/TEngine/Runtime/GameFramework/Resource/AssetReference.cs b/Assets/TEngine/Runtime/GameFramework/Resource/AssetReference.cs index c681ca99..db35e6f3 100644 --- a/Assets/TEngine/Runtime/GameFramework/Resource/AssetReference.cs +++ b/Assets/TEngine/Runtime/GameFramework/Resource/AssetReference.cs @@ -220,7 +220,7 @@ namespace TEngine throw new GameFrameworkException($"BindAssetReference Failed => AssetOperationHandle is null!"); } - var ret = go.AddComponent(); + var ret = go.GetOrAddComponent(); ret.Bind(operation: handle, assetLocation: location, parent: parent); @@ -242,7 +242,7 @@ namespace TEngine throw new GameFrameworkException($"BindAssetReference Failed => GameObject is null!"); } - var ret = go.AddComponent(); + var ret = go.GetOrAddComponent(); ret.Bind(operation: null, assetLocation: location, parent: parent);