_assetref setunsafe (unstable buggy)
This commit is contained in:
@@ -217,6 +217,17 @@ public:
|
||||
{
|
||||
OnSet(asset);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the asset reference without binding the events.
|
||||
/// This should only be used cautiously in cases where the reference needs to be held for a short time (for example in while marshalling managed types).
|
||||
/// </summary>
|
||||
/// <param name="asset">The asset.</param>
|
||||
void SetUnsafe(T* asset)
|
||||
{
|
||||
ASSERT(_asset == nullptr || asset == nullptr);
|
||||
_asset = asset;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
|
||||
Reference in New Issue
Block a user