Class base for working with il2cpp fields. More...
#include <FieldBase.hpp>
Public Member Functions | |
| constexpr | FieldBase ()=default |
| Create empty field base. | |
| FieldBase (const FieldBase &other)=default | |
| Copy field. | |
| FieldBase (IL2CPP::FieldInfo *info) | |
| Create event from il2cpp field. | |
| FieldBase & | SetInstance (IL2CPP::Il2CppObject *val) |
| Set field instance if it's non-static. | |
| IL2CPP::FieldInfo * | GetInfo () const |
| Get FieldInfo. | |
| BNM_PTR | GetOffset () const |
| Get field offset. | |
| void * | GetFieldPointer () const |
| Get field pointer. | |
| BNM::Class | GetType () const |
| Get field type. | |
| BNM::Class | GetParentClass () const |
| Get class that contains this field. | |
| FieldBase & | operator[] (void *instance) |
| Operator for setting instance. | |
| FieldBase & | operator[] (IL2CPP::Il2CppObject *instance) |
| Operator for setting instance. | |
| FieldBase & | operator[] (UnityEngine::Object *instance) |
| Operator for setting instance. | |
| bool | IsValid () const noexcept |
| Check if field is valid. | |
| std::string | str () const |
| Get full field name. | |
| template<typename NewType> | |
| Field< NewType > & | cast () const |
| Cast field to be able to get and set it with specified type. | |
Class base for working with il2cpp fields.
This class provides fields and some basic functions to allow to get and set fields.
|
inlinedefault |
Copy field.
| other | Other field |
| BNM::FieldBase::FieldBase | ( | IL2CPP::FieldInfo * | info | ) |
Create event from il2cpp field.
| info | Il2cpp field |
|
nodiscard |
|
inlinenodiscard |
Get FieldInfo.
|
inlinenodiscard |
Get field offset.
|
nodiscard |
Get class that contains this field.
|
nodiscard |
Get field type.
|
inlinenodiscardnoexcept |
Check if field is valid.
|
inline |
|
inline |
|
inline |
| FieldBase & BNM::FieldBase::SetInstance | ( | IL2CPP::Il2CppObject * | val | ) |
Set field instance if it's non-static.
| instance | Instance |
|
inlinenodiscard |
Get full field name.
Returns string with full field name: ClassFullName.(field name)