Skip to content

Game Entities and Unity Game Objects

Christian Oeing edited this page Jan 15, 2017 · 2 revisions

Usually, you’ll want to use Unity as your level editor. You can create a connection between your Unity game objects and your game logic by adding an EntityConfigurationBehaviour. This script will create a game entity using the selected blueprint and configuration.

At runtime, you can access the id of the entity created by the script with the EntityConfigurationBehaviour.EntityId property. We will take a look at a code example for this in a minute. Furthermore, you might have noticed the EntityGameObjectMap script attached to the Game prefab. This behavior provides an indexer to access Unity game objects associated with given entity ids.

The inspector shows the entity id as well.

![](http://slashgames.org/framework/images/EntityConfiguration (Runtime).png)

Clone this wiki locally