MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / AddChild

Method AddChild

Source/Engine/Level/Actor.cs:124–132  ·  view source on GitHub ↗

Creates a new child actor of the given type. Type of the actor. The child actor.

(Type type)

Source from the content-addressed store, hash-verified

122 /// <param name="type">Type of the actor.</param>
123 /// <returns>The child actor.</returns>
124 public Actor AddChild(Type type)
125 {
126 if (type.IsAbstract)
127 return null;
128
129 var result = (Actor)New(type);
130 result.SetParent(this, false, false);
131 return result;
132 }
133
134 /// <summary>
135 /// Creates a new child actor of the given type.

Callers 1

TestChildrenMethod · 0.45

Calls 2

NewFunction · 0.50
SetParentMethod · 0.45

Tested by 1

TestChildrenMethod · 0.36