Table of Contents

Method ToNwObjectSafe

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

ToNwObjectSafe<T>(uint)

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

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

Parameters

objectId uint

The object ID to convert.

Returns

T

The associated object if it exists and is of type T, otherwise null.

Type Parameters

T

The expected object type.