Class NativeObject
- Namespace
- CounterStrikeSharp.API
- Assembly
- CounterStrikeSharp.API.dll
public abstract class NativeObject
- Inheritance
-
objectNativeObject
- Derived
Constructors
NativeObject(nint)
protected NativeObject(nint pointer)
Parameters
pointer
nint
Properties
Handle
public nint Handle { get; }
Property Value
Methods
As<T>()
Returns a new instance of the specified type using the pointer from the passed in object.
public T As<T>() where T : NativeObject
Returns
- T
Type Parameters
T
Remarks
Useful for creating a new instance of a class that inherits from NativeObject. e.g.
var weaponServices = playerWeaponServices.As<CCSPlayer_WeaponServices>();