BGEntity.cs -is a table row, containing 1-n field values. The API list is not full.
Main API
| Method/Property | Returns | Description |
|---|---|---|
| Get<type>(string name) | type | Get field value by field's name. Type should correspond to field's type. |
|
||
| Set<type>(string name, type value) | void | Set field value by field's name. value should have the same type as field does. |
|
||
Additional API
| Method/Property | Returns | Description |
|---|---|---|
| Id | BGId | Get entity id |
|
||
| Index | int | Get entity physical position |
|
||
| Name | string | Get table row name. Name is special field of type string. You can also access it by calling entity.Get<string>("name"); |
|
||
| Meta | BGMetaEntity | Get the table, this row belongs to |
|
||
| IsDeleted | bool | was the entity deleted or unloaded |
| Delete() | void | Delete the row. Do not use this method to delete several rows, because it's way too slow for this. Use BGMetaEntity.DeleteEntities instead (make sure you use version >= 1.9.2) |
|
||
| Duplicate | BGEntity | duplicate the entity |
| CopyFieldsValuesFrom | void | copy field values from another entity |
| ClearFieldValue(BGId fieldId) | void | clear field value |