Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | List of all members
JsonApiStruct Interface Reference

Inherits Managed.

Inherited by AnimExportProfileChannelsRequest, AnimExportProfileChannelsResponse, AnimExportProfilesRequest, AnimExportProfilesResponse, AnimExportTrackExportRequest, AnimExportTrackExportResponse, BanListPageParams, CheckEmatRequest, CheckEmatResponse, CheckGUIDRequest, CheckGUIDResponse, DSConfig, DSGameConfig, DSGameProperties, DSMod, ExportEmatRequest, ExportEmatResponse, ExportTerrainRequest, ExportTerrainResponse, FBXReportToolRequest, FBXReportToolResponse, GamematInfoRequest, GamematInfoResponse, GetPortalMatRequest, GetPortalMatResponse, GetRoomsIds, LayerPresetsRequest, LayerPresetsResponse, LoadedProjectsRequest, LoadedProjectsResponse, MaterialPreviewGetMapping, MaterialPreviewRequest, MaterialPropertiesRequest, MaterialPropertiesResponse, MaterialValidatorRequest, MaterialValidatorResponse, OpenXOBRequest, OpenXOBResponse, PageParams, PrefabImporterRequest, PrefabImporterResponse, RegisterResourceRequest, RegisterResourceResponse, RoomFilterBase, SavePoint, TextureRequest, TextureResponse, TextureValidationRequest, TextureValidationResponse, TextureValidatorRequest, TextureValidatorResponse, ValidateFBXUtilsReq, and ValidateFBXUtilsRes.

Public Member Functions

void JsonApiStruct ()
 
void ~JsonApiStruct ()
 
void OnExpand ()
 Event when expand (unpack) process starts.
 
void OnPack ()
 Event when pack starts - you will pack your stuff here.
 
void OnSuccess (int errorCode)
 Event called when pending store operation is finished - callback from JsonApiHandle before handle release.
 
void OnError (int errorCode)
 Event called when pending store operation is finished - callback from JsonApiHandle before handle release.
 
void OnObject (string name)
 Called when parsing object.
 
void OnStartArray (string name)
 Called when parsing array.
 
void OnEndArray (int itemCount)
 Called when array end, returns count of items.
 
void OnItemObject (int index, string name)
 Called when parsing object.
 
proto native void RegV (string name)
 Register script variable for auto-feature.
 
proto native void UnregV (string name)
 Unregister script variable for auto-feature.
 
proto native void RegAll ()
 Register all variable present on object for auto-feature (it is not recursive!)
 
proto native void Push (JsonApiStruct obj)
 Push object to parse (only during parse operation)
 
proto native void StartObject (string name)
 Start object at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto native void EndObject ()
 End object at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto native void StoreObject (string name, JsonApiStruct obj)
 Add scripted object to hierarchy (calls through hierarchy)
 
proto native void StoreFloat (string name, float value)
 Add float value to hierarchy.
 
proto native void StoreInteger (string name, int value)
 Add integer value to hierarchy.
 
proto native void StoreBoolean (string name, bool value)
 Add boolean value to hierarchy.
 
proto native void StoreString (string name, string value)
 Add string value to hierarchy.
 
proto native void StoreVector (string name, vector value)
 Add vector value to hierarchy.
 
proto native void StartArray (string name)
 Start array at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto native void EndArray ()
 End array at hierarchy - !!! Be cautious and doublecheck results when using this !!!
 
proto native void ItemObject (JsonApiStruct obj)
 Add scripted unnamed/ array object.
 
proto native void ItemFloat (float value)
 Add unnamed/ array float value.
 
proto native void ItemInteger (int value)
 Add unnamed/ array integer value.
 
proto native void ItemBoolean (bool value)
 Add unnamed/ array boolean value.
 
proto native void ItemString (string value)
 Add unnamed/ array string value.
 
proto native void ItemVector (vector value)
 Add unnamed/ array vector value.
 
proto native void ItemArray ()
 Start an array inside an array.
 
proto native void SetDone ()
 Call this when you've done packing or unpacking (interrupt operation)
 
proto native void SetFail ()
 Call this when you've done packing or unpacking + want to generate error - prevent to send invalid data etc.
 
proto native void Pack ()
 Start object packing now - for use at main thread only!
 
proto native void ExpandFromRAW (string data)
 Start object unpacking from RAW string data.
 
proto native string AsString ()
 Get packed JSON as string (!only if you called Pack() first, it may return null)
 
proto native bool HasData ()
 Return true if there are present JSON data which can be expanded on script object (typically you check this after load of file)
 
proto native bool PackToFile (string FileName)
 Pack() and save JSON to file.
 
proto native bool SaveToFile (string FileName)
 Save JSON to file (only If something was loaded or recieved previously!)
 
proto native bool LoadFromFile (string FileName)
 Load JSON from file and Expand.
 
- Public Member Functions inherited from Managed
proto external ref Managed Clone ()
 Return shallow copy of object, or null if it is not allowed (not public constructor)
 

Constructor & Destructor Documentation

◆ JsonApiStruct()

void JsonApiStruct.JsonApiStruct ( )

◆ ~JsonApiStruct()

void JsonApiStruct.~JsonApiStruct ( )

Member Function Documentation

◆ AsString()

proto native string JsonApiStruct.AsString ( )

Get packed JSON as string (!only if you called Pack() first, it may return null)

◆ EndArray()

proto native void JsonApiStruct.EndArray ( )

End array at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ EndObject()

proto native void JsonApiStruct.EndObject ( )

End object at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ ExpandFromRAW()

proto native void JsonApiStruct.ExpandFromRAW ( string  data)

Start object unpacking from RAW string data.

◆ HasData()

proto native bool JsonApiStruct.HasData ( )

Return true if there are present JSON data which can be expanded on script object (typically you check this after load of file)

◆ ItemArray()

proto native void JsonApiStruct.ItemArray ( )

Start an array inside an array.

◆ ItemBoolean()

proto native void JsonApiStruct.ItemBoolean ( bool  value)

Add unnamed/ array boolean value.

◆ ItemFloat()

proto native void JsonApiStruct.ItemFloat ( float  value)

Add unnamed/ array float value.

◆ ItemInteger()

proto native void JsonApiStruct.ItemInteger ( int  value)

Add unnamed/ array integer value.

◆ ItemObject()

proto native void JsonApiStruct.ItemObject ( JsonApiStruct  obj)

Add scripted unnamed/ array object.

◆ ItemString()

proto native void JsonApiStruct.ItemString ( string  value)

Add unnamed/ array string value.

◆ ItemVector()

proto native void JsonApiStruct.ItemVector ( vector  value)

Add unnamed/ array vector value.

◆ LoadFromFile()

proto native bool JsonApiStruct.LoadFromFile ( string  FileName)

Load JSON from file and Expand.

◆ OnEndArray()

void JsonApiStruct.OnEndArray ( int  itemCount)

Called when array end, returns count of items.

◆ OnError()

void JsonApiStruct.OnError ( int  errorCode)

Event called when pending store operation is finished - callback from JsonApiHandle before handle release.

◆ OnExpand()

void JsonApiStruct.OnExpand ( )

Event when expand (unpack) process starts.

Implemented in DSGameConfig, and DSGameProperties.

◆ OnItemObject()

void JsonApiStruct.OnItemObject ( int  index,
string  name 
)

Called when parsing object.

◆ OnObject()

void JsonApiStruct.OnObject ( string  name)

Called when parsing object.

◆ OnPack()

void JsonApiStruct.OnPack ( )

Event when pack starts - you will pack your stuff here.

Implemented in DSGameConfig, DSGameProperties, AnimExportProfilesResponse, and AnimExportProfileChannelsResponse.

◆ OnStartArray()

void JsonApiStruct.OnStartArray ( string  name)

Called when parsing array.

◆ OnSuccess()

void JsonApiStruct.OnSuccess ( int  errorCode)

Event called when pending store operation is finished - callback from JsonApiHandle before handle release.

◆ Pack()

proto native void JsonApiStruct.Pack ( )

Start object packing now - for use at main thread only!

◆ PackToFile()

proto native bool JsonApiStruct.PackToFile ( string  FileName)

Pack() and save JSON to file.

◆ Push()

proto native void JsonApiStruct.Push ( JsonApiStruct  obj)

Push object to parse (only during parse operation)

◆ RegAll()

proto native void JsonApiStruct.RegAll ( )

Register all variable present on object for auto-feature (it is not recursive!)

◆ RegV()

proto native void JsonApiStruct.RegV ( string  name)

Register script variable for auto-feature.

◆ SaveToFile()

proto native bool JsonApiStruct.SaveToFile ( string  FileName)

Save JSON to file (only If something was loaded or recieved previously!)

◆ SetDone()

proto native void JsonApiStruct.SetDone ( )

Call this when you've done packing or unpacking (interrupt operation)

◆ SetFail()

proto native void JsonApiStruct.SetFail ( )

Call this when you've done packing or unpacking + want to generate error - prevent to send invalid data etc.

◆ StartArray()

proto native void JsonApiStruct.StartArray ( string  name)

Start array at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ StartObject()

proto native void JsonApiStruct.StartObject ( string  name)

Start object at hierarchy - !!! Be cautious and doublecheck results when using this !!!

◆ StoreBoolean()

proto native void JsonApiStruct.StoreBoolean ( string  name,
bool  value 
)

Add boolean value to hierarchy.

◆ StoreFloat()

proto native void JsonApiStruct.StoreFloat ( string  name,
float  value 
)

Add float value to hierarchy.

◆ StoreInteger()

proto native void JsonApiStruct.StoreInteger ( string  name,
int  value 
)

Add integer value to hierarchy.

◆ StoreObject()

proto native void JsonApiStruct.StoreObject ( string  name,
JsonApiStruct  obj 
)

Add scripted object to hierarchy (calls through hierarchy)

◆ StoreString()

proto native void JsonApiStruct.StoreString ( string  name,
string  value 
)

Add string value to hierarchy.

◆ StoreVector()

proto native void JsonApiStruct.StoreVector ( string  name,
vector  value 
)

Add vector value to hierarchy.

◆ UnregV()

proto native void JsonApiStruct.UnregV ( string  name)

Unregister script variable for auto-feature.


The documentation for this interface was generated from the following file: