Skip to content
Adrian Papari edited this page Jul 19, 2015 · 6 revisions

Provide entities with a UUID. This manager is optional.

Add the Uuid Entity manager to your world.

World world = new World(new WorldConfiguration(
		.setManager(new UuidEntityManager()));

UUID:s are lazily assigned to entities upon first retrieval, but can also be manually set:

// setting an explicit UUID during creation
world.createEntity(uuid)

// after an entity has been created
entity.setUuid(UUID newUuid)
// or
world.getManager(UuidEntityManager.class).setUuid(Entity e, UUID newUuid)

You can now query the system when needed.

  • world.getManager(UuidEntityManager.class).getEntity(UUID uuid)
  • world.getManager(UuidEntityManager.class).getUuid(Entity e)
Clone this wiki locally