Method ToNwObject
ToNwObject(Location, NwGameObject?, bool)
Attempts to parse this json structure into a NwObject.
public NwObject? ToNwObject(Location location, NwGameObject? owner = null, bool loadObjectState = true)
Parameters
locationLocationThe location to spawn the parsed object.
ownerNwGameObjectIf this object is an item, the owner of the parsed item.
loadObjectStateboolIf the object should load object state info from the json structure.
Returns
- NwObject
The created object, or null if parsing failed.
ToNwObject<T>(Location, NwGameObject?, bool)
Attempts to parse this json structure into a NwObject.
public T? ToNwObject<T>(Location location, NwGameObject? owner = null, bool loadObjectState = true) where T : NwObject
Parameters
locationLocationThe location to spawn the parsed object.
ownerNwGameObjectIf this object is an item, the owner of the parsed item.
loadObjectStateboolIf the object should load object state info from the json structure.
Returns
- T
The created object, or null if parsing failed.
Type Parameters
T