mirror of
https://github.com/Alex-Rachel/TEngine.git
synced 2025-08-07 16:45:10 +00:00
Update AssetReference.cs
This commit is contained in:
@@ -220,7 +220,7 @@ namespace TEngine
|
||||
throw new GameFrameworkException($"BindAssetReference Failed => AssetOperationHandle is null!");
|
||||
}
|
||||
|
||||
var ret = go.AddComponent<AssetReference>();
|
||||
var ret = go.GetOrAddComponent<AssetReference>();
|
||||
|
||||
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<AssetReference>();
|
||||
var ret = go.GetOrAddComponent<AssetReference>();
|
||||
|
||||
ret.Bind(operation: null, assetLocation: location, parent: parent);
|
||||
|
||||
|
Reference in New Issue
Block a user