Commit Graph

9 Commits (ffdce2ef7f7befe017b9ee53e17aef279ec6cbde)

Author SHA1 Message Date
AMZN-koppersr 7613797810
Merge pull request #1126 from aws-lumberyard-dev/SpawnableEntityIdMapping
Spawnable entity id mapping
5 years ago
AMZN-koppersr 40d90c49a3 Disabled writing UserSettings.xml in Spawnable tests. 5 years ago
AMZN-koppersr 1e7ac60949 Reintroduced spawning multiple instances of the same entity
The following was changed:
- The remapper in AZ::IdUtils now has an additional argument to tell it what to do when it encounters the same source entity id. The original behavior of ignoring the new entity id and returning the first occurrence is the default. The alternative behavior is to store the last known entity id and return that instead.
- Split the optional arguments for SpawnAllEntities and SpawnEntities.
- SpawnEntities now has an option to continue with the entity mapping from a previous spawn call or to start with a fresh mapping. The latter is the default as the former will come at a performance cost since the mapping table has to be reconstructed.
- Entities spawned using SpawnEntities and ReloadEntities now also get the correct entity mapping applied.
- Added several new unit tests to cover most of the new functionality.
- Fixed some places where the older API version was still called.
5 years ago
AMZN-koppersr 8c541b5205 Moved default values to object in the Spawnable Entities Interface 5 years ago
AMZN-koppersr 1bf8c599e3 External Serialize Context for spawning
This change makes it possible to provide a Serialize Context for spawning entities from spawnables. This also removes the need for the Serialize Context to be retrieved multiple times per frame.
5 years ago
AMZN-koppersr c946d57928 Addressed PR feedback. 5 years ago
AMZN-koppersr e0948a26bc Fixed early ticket delete crash
This commit fixes a crash that could happen when a spawnable ticket was deleted before all requests in the queue had completed. Because of this crash the requests now only hold on to the payload of the ticket but not the ticket itself. As a side effect, callbacks can no longer provide the ticket itself so instead a unique id for the ticket is returned.
5 years ago
AMZN-koppersr 76827ff95e Added support for a priority lane for entity spawning
It's now possible to have high and normal priority calls on the spawnable entities manager. This allows for events like (de)spawning and retrieving information to be executed before already queued requests, though requests cannot be reordered on the same ticket. High priority calls are executed twice per frame, while normal priority calls are called only once.
5 years ago
AMZN-koppersr a807c0b4d8 Additional list function added to Spawnables.
A new list function was added to the SpawnableEntitiesInterface that list entities together with the id of the entity in the spawnable that was used to create it.
This change also include the setup for testing the SpawnableEntitiesManager plus a few tests to cover the newly added functionality.
5 years ago