1. Michael Ludwig
  2. entreri
  3. Issues
Issue #13 duplicate

Make creating data instances easier/convenient

Michael Ludwig
repo owner created an issue

In application code, I'm finding it common for the classes to define fields that store allocated ComponentData instances for an EntitySystem and then reuse them.

Although good for performance, this muddles the class definition and requires more boiler plate code. Sometimes this can be pushed into method local variables, but even then it's not perfect.

It would be nice if there was a way to just "get" an instance for single use without the cost of allocation. One possibility is a method like system.getSharedInstance(type)

Comments (3)

  1. Log in to comment