Skip to content

Playing within editor

Nako Sung edited this page Dec 15, 2015 · 10 revisions

To play with editor you must have an access to editor world.

Get the World

let editorWorld = Root.GetEngine().GetEditorWorld()

Creating an actor

let actor = new StaticMeshActor(editorWorld)
let cubeMesh = StaticMesh.Load('/Engine/BasicShapes/Cube')
actor.RootComponent.SetWorldLocation({Z:123})
actor.StaticMeshComponent.StaticMesh = cubeMesh

Warning

Editor context is not being cleaned up before map load. So every references to actors belonging to previous map should be cleaned up before map load triggered.

Clone this wiki locally