Table of Contents

Method ToNwObject

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

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

location Location

The location to spawn the parsed object.

owner NwGameObject

If this object is an item, the owner of the parsed item.

loadObjectState bool

If 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

location Location

The location to spawn the parsed object.

owner NwGameObject

If this object is an item, the owner of the parsed item.

loadObjectState bool

If the object should load object state info from the json structure.

Returns

T

The created object, or null if parsing failed.

Type Parameters

T