Add Layer and StaticFlags from parent actor after spawnign actor in Prefab Window

This commit is contained in:
Wojciech Figat
2022-10-31 12:20:13 +01:00
parent 00c5f7d5d4
commit 77b98f7081

View File

@@ -333,8 +333,10 @@ namespace FlaxEditor.Windows.Assets
}
if (parentActor != null)
{
// Use the same location
// Match the parent
actor.Transform = parentActor.Transform;
actor.StaticFlags = parentActor.StaticFlags;
actor.Layer = parentActor.Layer;
// Rename actor to identify it easily
actor.Name = StringUtils.IncrementNameNumber(actor.GetType().Name, x => parentActor.GetChild(x) == null);