Class CountryDataCollection
Collection for managing multiple countries with performance optimization Implements structure-of-arrays for hot data
public class CountryDataCollection
- Inheritance
-
objectCountryDataCollection
Constructors
CountryDataCollection(int, Allocator)
public CountryDataCollection(int capacity, Allocator allocator = Allocator.Persistent)
Parameters
capacityintallocatorAllocator
Properties
Count
public int Count { get; }
Property Value
- int
IsCreated
public bool IsCreated { get; }
Property Value
- bool
Methods
AddCountry(CountryData)
public void AddCountry(CountryData country)
Parameters
countryCountryData
Dispose()
public void Dispose()
GetCountryByHash(ushort)
public CountryData GetCountryByHash(ushort tagHash)
Parameters
tagHashushort
Returns
GetCountryByIndex(int)
public CountryData GetCountryByIndex(int index)
Parameters
indexint
Returns
GetCountryByTag(string)
public CountryData GetCountryByTag(string tag)
Parameters
tagstring
Returns
GetHotDataSlice()
public NativeSlice<CountryHotData> GetHotDataSlice()
Returns
GetMemoryUsage()
Get total memory usage of the collection
public long GetMemoryUsage()
Returns
- long