Method ToNwObject
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
objectIduintThe object ID to convert.
Returns
- T
The associated object if it exists, otherwise null.
Type Parameters
TThe 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
objectIduintThe object ID to convert.
Returns
- NwObject
The associated object if it exists, otherwise null.