BNM 2.5.0
 
Loading...
Searching...
No Matches
BNM::DelegateBase Struct Reference

Wrapper of Il2CppDelegate. More...

#include <Delegates.hpp>

Public Member Functions

IL2CPP::Il2CppObject * GetInstance () const
 Get instance of delegate.
 
BNM::MethodBase GetMethod () const
 Get method of delegate.
 
DelegateBaseCreate (BNM::MethodBase method)
 Create delegate from method.
 
bool IsValid () const noexcept
 Check if delegate is valid.
 
 operator bool () const noexcept
 Check if delegate is valid.
 
template<typename NewRet>
Delegate< NewRet > & cast () const
 Cast delegate to be able to invoke it.
 

Detailed Description

Wrapper of Il2CppDelegate.

Member Function Documentation

◆ Create()

DelegateBase * BNM::DelegateBase::Create ( BNM::MethodBase method)

Create delegate from method.

Parameters
methodMethod that will be used in new delegate
Returns
New DelegateBase

◆ GetInstance()

IL2CPP::Il2CppObject * BNM::DelegateBase::GetInstance ( ) const
inline

Get instance of delegate.

Returns
Instance if delegate isn't null, otherwise null.

◆ GetMethod()

BNM::MethodBase BNM::DelegateBase::GetMethod ( ) const
inline

Get method of delegate.

Returns
MethodBase if delegate isn't null, otherwise empty MethodBase.