Table of Contents

Class CountryDataCollection

Namespace
Core.Data
Assembly
Core.dll

Collection for managing multiple countries with performance optimization Implements structure-of-arrays for hot data

public class CountryDataCollection
Inheritance
object
CountryDataCollection

Constructors

CountryDataCollection(int, Allocator)

public CountryDataCollection(int capacity, Allocator allocator = Allocator.Persistent)

Parameters

capacity int
allocator Allocator

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

country CountryData

Dispose()

public void Dispose()

GetCountryByHash(ushort)

public CountryData GetCountryByHash(ushort tagHash)

Parameters

tagHash ushort

Returns

CountryData

GetCountryByIndex(int)

public CountryData GetCountryByIndex(int index)

Parameters

index int

Returns

CountryData

GetCountryByTag(string)

public CountryData GetCountryByTag(string tag)

Parameters

tag string

Returns

CountryData

GetHotDataSlice()

public NativeSlice<CountryHotData> GetHotDataSlice()

Returns

NativeSlice<CountryHotData>

GetMemoryUsage()

Get total memory usage of the collection

public long GetMemoryUsage()

Returns

long