Merge remote-tracking branch 'origin/master' into 1.6
# Conflicts: # .github/workflows/tests.yml # Source/Engine/Content/JsonAsset.cs
This commit is contained in:
@@ -626,7 +626,16 @@ namespace FlaxEditor.SceneGraph.GUI
|
||||
{
|
||||
var item = _dragAssets.Objects[i];
|
||||
var actor = item.OnEditorDrop(this);
|
||||
actor.StaticFlags = spawnParent.StaticFlags;
|
||||
if (spawnParent.GetType() != typeof(Scene))
|
||||
{
|
||||
// Set all Actors static flags to match parents
|
||||
List<Actor> childActors = new List<Actor>();
|
||||
GetActorsTree(childActors, actor);
|
||||
foreach (var child in childActors)
|
||||
{
|
||||
child.StaticFlags = spawnParent.StaticFlags;
|
||||
}
|
||||
}
|
||||
actor.Name = item.ShortName;
|
||||
actor.Transform = spawnParent.Transform;
|
||||
ActorNode.Root.Spawn(actor, spawnParent);
|
||||
@@ -667,6 +676,16 @@ namespace FlaxEditor.SceneGraph.GUI
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private void GetActorsTree(List<Actor> list, Actor a)
|
||||
{
|
||||
list.Add(a);
|
||||
int cnt = a.ChildrenCount;
|
||||
for (int i = 0; i < cnt; i++)
|
||||
{
|
||||
GetActorsTree(list, a.GetChild(i));
|
||||
}
|
||||
}
|
||||
|
||||
private bool ValidateDragActor(ActorNode actorNode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user