Table of Contents

Method ToNwObject

Namespace
Anvil.API
Assembly
NWN.Anvil.dll

ToNwObject<T>(Guid)

Attempts to resolve a living active game object from the specified UUID.

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

Parameters

objectId Guid

The UUID of the object.

Returns

T

The game object with the given UUID, otherwise returns null if it does not exist.

Type Parameters

T

The expected object type.

Exceptions

InvalidCastException

Object is not type T. See ToNwObjectSafe<T>(Guid) if null should be returned in this case.

ToNwObject(Guid)

Attempts to resolve a living active game object from the specified UUID.

public static NwObject? ToNwObject(this Guid objectId)

Parameters

objectId Guid

The UUID of the object.

Returns

NwObject

The game object with the given UUID, otherwise returns null if it does not exist.