Version: 2018.3 (switch to 2019.1)
LanguageEnglish
  • C#

UnsafeUtility.PinGCObjectAndGetAddress

public static void* PinGCObjectAndGetAddress(object target, out ulong gcHandle);

Description

Keeps a strong GC reference to the object and pins it. The object is guranteed to not move its memory location in a moving GC. Returns the address of the memory location of the object.

See Also: UnsafeUtility.ReleaseGCObject.

对文档有任何疑问,请移步至开发者社区提问,我们将尽快为您解答