Typed class for working with il2cpp properties. More...
#include <Property.hpp>
Public Member Functions | |
constexpr | Property ()=default |
Create empty property. | |
template<typename OtherType> | |
Property (const Property< OtherType > &other) | |
Copy property. | |
Property (const IL2CPP::PropertyInfo *info) | |
Create property from il2cpp property. | |
Property (const PropertyBase &other) | |
Convert base property to typed property. | |
Property< T > & | operator[] (void *instance) |
Operator for setting instance. | |
Property< T > & | operator[] (IL2CPP::Il2CppObject *instance) |
Operator for setting instance. | |
Property< T > & | operator[] (UnityEngine::Object *instance) |
Operator for setting instance. | |
T | Get () const |
Call getter. | |
operator T () const | |
Operator to call getter. | |
T | operator() () const |
Operator to call getter. | |
void | Set (T value) |
Call setter. | |
Property< T > & | operator= (T value) |
Operator to call setter. | |
Property< T > & | operator= (const PropertyBase &other) |
Convert base property to typed property. | |
![]() | |
constexpr | PropertyBase () noexcept=default |
Create empty property base. | |
PropertyBase (const PropertyBase &other)=default | |
Copy property. | |
PropertyBase (const IL2CPP::PropertyInfo *info) | |
Create property from il2cpp property. | |
PropertyBase & | SetInstance (IL2CPP::Il2CppObject *val) |
Set property instance if it's non-static. | |
BNM::Class | GetType () const |
Get property type. | |
BNM::Class | GetParentClass () const |
Get class that contains this property. | |
PropertyBase & | operator[] (void *instance) |
Operator for setting instance. | |
PropertyBase & | operator[] (IL2CPP::Il2CppObject *instance) |
Operator for setting instance. | |
PropertyBase & | operator[] (UnityEngine::Object *instance) |
Operator for setting instance. | |
bool | IsValid () const noexcept |
Check if property is valid. | |
std::string | str () const |
Get full property name. | |
template<typename NewRet> | |
Property< NewRet > & | cast () const |
Cast event to be able to get and set it. | |
Additional Inherited Members | |
![]() | |
IL2CPP::PropertyInfo * | _data {} |
MethodBase | _getter {} |
MethodBase | _setter {} |
uint8_t | _hasGetter: 1 = false |
uint8_t | _hasSetter: 1 = false |
Typed class for working with il2cpp properties.
This class provides API for getting and setting properties.
T | Type of property |
|
inline |
Copy property.
other | Other property |
OtherType | Type of other property |
|
inline |
Create property from il2cpp property.
info | Il2cpp property |
|
inline |
Convert base property to typed property.
other | Base property |
|
inline |
Call getter.
|
inline |
Convert base property to typed property.
other | Base property |
|
inline |
|
inline |
|
inline |
|
inline |
Call setter.
value | New property value |