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:
@@ -227,7 +227,7 @@ namespace FlaxEditor.Modules
|
||||
|
||||
// When applying changes to prefab from actor in level ignore it's root transformation (see ActorEditor.ProcessDiff)
|
||||
var originalTransform = instance.LocalTransform;
|
||||
if (instance.IsPrefabRoot && instance.Scene != null)
|
||||
if (instance.IsPrefabRoot && instance.HasScene)
|
||||
instance.LocalTransform = prefab.GetDefaultInstance().Transform;
|
||||
|
||||
// Call backend
|
||||
|
||||
Reference in New Issue
Block a user