-
Notifications
You must be signed in to change notification settings - Fork 114
Entity References and Serialization
Adrian Papari edited this page Mar 28, 2017
·
13 revisions
Entity references as shown below can be safely serialized. This feature is only for serialization/Prefabs and the EntityLinkManager. EntityLinkManager can be configured to protect your references from dangling when entities go out of scope.
public class ComponentWithTooManyEntities extends Component {
public Entity entity;
public Bag<Entity> entities = new Bag<>();
// -1 is the preferred convention for "no entity"
@EntityId public int parentId = -1;
@EntityId public IntBag entityIds = new IntBag();
}
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference