Table of Contents

Method ToNwObject

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

ToNwObject<T>(uint)

Converts the specified object ID value into a managed game object.

public static T? ToNwObject<T>(this uint objectId) where T : NwObject

Parameters

objectId uint

The object ID to convert.

Returns

T

The associated object if it exists, otherwise null.

Type Parameters

T

The expected object type.

Exceptions

InvalidCastException

Thrown if the object associated with the object ID is not of type T.

ToNwObject(uint)

Converts the specified object ID value into a managed game object.

public static NwObject? ToNwObject(this uint objectId)

Parameters

objectId uint

The object ID to convert.

Returns

NwObject

The associated object if it exists, otherwise null.