Add Actor.HasScene and Script.HasScene
Useful in managed code to check the existence of the scene in hot paths by avoiding expensive marshalling of the Scene object.
This commit is contained in:
@@ -89,7 +89,7 @@ namespace FlaxEditor.Content
|
||||
// Cleanup it after usage
|
||||
Object.Destroy(actor, 20.0f);
|
||||
}
|
||||
else if (actor.Scene != null)
|
||||
else if (actor.HasScene)
|
||||
{
|
||||
// Create prefab with identity transform so the actor instance on a level will have it customized
|
||||
resetTransform = true;
|
||||
|
||||
Reference in New Issue
Block a user