TreeUtils.AddDataEntitiesToEntity(Entity,IReadOnlyList_DataEntity_).md

February 25, 2024 ยท View on GitHub

Friflo.Engine.ECS

Friflo.Engine.ECS.Utils.TreeUtils

TreeUtils.AddDataEntitiesToEntity(Entity, IReadOnlyList) Method

Add the given dataEntities to the specified targetEntity.
The pid and the children of the given dataEntities are replaced with the pids of the newly created Entity's.

public static Friflo.Engine.ECS.Utils.AddDataEntitiesResult AddDataEntitiesToEntity(Friflo.Engine.ECS.Entity targetEntity, System.Collections.Generic.IReadOnlyList<Friflo.Engine.ECS.Serialize.DataEntity> dataEntities);

Parameters

targetEntity Entity

dataEntities System.Collections.Generic.IReadOnlyList<DataEntity>

Returns

AddDataEntitiesResult

Remarks

The order of items in dataEntities is not relevant.