Abstracts common C# and Unity objects, including GameObjects, MonoBehaviours and Dictionaries. And additional helper methods to check for equality, print a tree of GameObjects, etc.
npm install il2cpp-bridge-abstractorAbstractedObject is the base class for all abstracted objects.
native is the property that is used to reference the Il2Cpp.Object that the abstraction is linked to, while inside the class. object is the getter for native and is readonly and public.
constructor is the constructor for the class, it takes a native object as a parameter and links the abstraction to it. abstractify is an alias for constructor, and for the sake of consistency, it is recommended to use abstractify instead of constructor.
NativeStruct, otherwise it would be unnecessary.
native and object properties to suit their needs. For example, AbstractedArray overrides native to be an Il2Cpp.Array instead of an Il2Cpp.Object.
constructor and abstractify methods to suit their needs. For example, AbstractedArray overrides constructor to take an Il2Cpp.Array instead of an Il2Cpp.Object.
create method that returns a new instance of the class. If the class can store data, such as AbstractedArray, it should have a static createEmpty method that returns a new instance of the class with no data.
AbstractedObject.
UnityEngine.Vector3, you should create a class called KeyValuePair that has the following methods:
constructor(k: Il2Cpp.Object, v: Il2Cpp.Object) - Creates a new instance of the class with the specified values.
abstractify(nativeObject: Il2Cpp.ValueType) - Same as constructor, but takes the values from the native object.
deabstractify() - Creates a new C# object with the values from the abstraction.
native property, since there's no object to link to (ValueType objects are passed by value, not by reference).
AbstractedObject is the base class for all abstracted objects.
native - The Il2Cpp.Object that this class is abstracting.
object - same as native but readonly and public.
constructor(native: Il2Cpp.Object) - Creates new abstraction object linked to a native object.
abtractify(native: Il2Cpp.Object) - Same as constructor