Table of Contents

Struct NativeProvinceData

Namespace
Core.Systems
Assembly
Core.dll

Read-only native province data for Burst jobs. Use this struct in IJob implementations for parallel algorithms.

public struct NativeProvinceData

Fields

activeProvinceIds

public NativeList<ushort> activeProvinceIds

Field Value

NativeList<ushort>

idToIndex

public NativeHashMap<ushort, int> idToIndex

Field Value

NativeHashMap<ushort, int>

provinceCount

public int provinceCount

Field Value

int

provinceStates

public NativeArray<ProvinceState> provinceStates

Field Value

NativeArray<ProvinceState>

Properties

IsCreated

public bool IsCreated { get; }

Property Value

bool

Methods

GetProvinceIdAtIndex(int)

Get province ID at array index. Use in Burst jobs.

public ushort GetProvinceIdAtIndex(int index)

Parameters

index int

Returns

ushort

GetProvinceOwner(ushort)

Get province owner by province ID. Use in Burst jobs. Returns 0 (unowned) if province not found.

public ushort GetProvinceOwner(ushort provinceId)

Parameters

provinceId ushort

Returns

ushort