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