@@ -33,6 +33,15 @@ namespace FlaxEngine
|
||||
Asset = asset;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the deserialized native object instance of the given type. Returns null if asset is not loaded or loaded object has different type.
|
||||
/// </summary>
|
||||
/// <returns>The asset instance object or null.</returns>
|
||||
public U GetInstance<U>()
|
||||
{
|
||||
return Asset ? Asset.GetInstance<U>() : default(U);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Implicit cast operator.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user