BGField API

BGField.cs -is a table field, which has its own type. The API list is not full.

Strictly speaking, each type has its own field. For example, BGFieldInt.cs - is a field of type int, etc. However, you do not have to know anything about these classes, all you need to know is field's type

Main API

Method/Property Returns Description
this[int entityIndex] T Get/Set value by entity index. This is the fastest method to get entity value. T means generic is used, so for int field- T meas int value, for long T means long etc.
//get entity value by it's index (first entity)
var entityValue = field[0];
//set value
field[0] = entityValue;
this[BGId entityId] T Get/Set value by entity id. This is much slower method, than getting value by entity Index. T means generic is used, so for int field- T meas int value, for long T means long etc.
//get entity value by it's id
var entityValue = field[new BGId("HThOdRCxlEGU1aefSG+Nbw")];
//set value
field[new BGId("HThOdRCxlEGU1aefSG+Nbw")] = entityValue;

Additional API