Photon Quantum 2.1.1

Public Attributes | List of all members
Quantum.Core.FrameBase.EntitiesConfig Class Reference

Global entities configuration More...

Public Attributes

CommitCommandsModes CommitCommandsMode = CommitCommandsModes.OnFrameSimulationBegin
 When "remove component" and "destroy entity" commands should be committed, effectively cleaning and freeing the data from components' buffers. More...
 
ComponentBufferConfig[] ComponentTypeConfiguration
 Allows overriding config values on a per-component level More...
 
int DefaultComponentBlockCapacity = 128
 Default value for how many components are stored together in a continuous block of memory More...
 
int DefaultEntityCapacity = 1024
 The starting capacity of internal entity and component buffers More...
 

Detailed Description

Global entities configuration

Member Data Documentation

◆ CommitCommandsMode

CommitCommandsModes Quantum.Core.FrameBase.EntitiesConfig.CommitCommandsMode = CommitCommandsModes.OnFrameSimulationBegin

When "remove component" and "destroy entity" commands should be committed, effectively cleaning and freeing the data from components' buffers.

Both commands still take immediate effect from a semantic perspective, e.g.: checking if the entity exists will return false as soon as the "destroy entity" method is called.

Commiting commands on CommitCommandsModes.OnFrameSimulationBegin will ensure that performing Physics Queries is safe, even after the frame simulation ends (from Unity), but might result in a larger total amount of memory reserved in case many entities are destroyed AND created in the same frame (analogous for "component removal").

◆ DefaultEntityCapacity

int Quantum.Core.FrameBase.EntitiesConfig.DefaultEntityCapacity = 1024

The starting capacity of internal entity and component buffers

◆ DefaultComponentBlockCapacity

int Quantum.Core.FrameBase.EntitiesConfig.DefaultComponentBlockCapacity = 128

Default value for how many components are stored together in a continuous block of memory

◆ ComponentTypeConfiguration

ComponentBufferConfig [] Quantum.Core.FrameBase.EntitiesConfig.ComponentTypeConfiguration

Allows overriding config values on a per-component level