knah / Il2CppAssemblyUnhollower

A tool to generate Managed->IL2CPP proxy assemblies
GNU Lesser General Public License v3.0
503 stars 87 forks source link

Add API for checking if an object was collected #30

Closed notpeelz closed 3 years ago

notpeelz commented 3 years ago

It would be nice to have a property/method to check if an object was garbage collected in the Il2CPP context. Currently, the only way of checking if an object was collected is to force Unhollower to throw an exception by accessing Il2CppObjectBase.Pointer.

I was thinking something like Il2CppObjectBase.IsCollected { get; }.

knah commented 3 years ago

Implemented in #37