public static int RegisterStruct(IntPtr isolate, int BaseTypeId, string fullName, V8ConstructorCallback constructor, V8DestructorCallback destructor, long data, int size) { #if PUERTS_GENERAL || (UNITY_WSA && !UNITY_EDITOR) GCHandle.Alloc(constructor); GCHandle.Alloc(destructor); #endif IntPtr fn1 = constructor == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(constructor); IntPtr fn2 = destructor == null ? IntPtr.Zero : Marshal.GetFunctionPointerForDelegate(destructor); return(RegisterStruct(isolate, BaseTypeId, fullName, fn1, fn2, data, size)); }
public static extern int RegisterStruct(IntPtr isolate, int BaseTypeId, string fullName, V8ConstructorCallback constructor, V8DestructorCallback destructor, long data, int size);