unsafe public bool Refreeze(out FragmentId mergedId, out FragmentId[] absorbedFragments)
        {
            if (!FrozenWorld_RefitRefreeze_Init())
            {
                checkError();
                mergedId          = GetMostSignificantFragmentId();
                absorbedFragments = new FragmentId[0];
                return(false);
            }
            checkError();

            FrozenWorld_RefitRefreeze_Prepare();
            checkError();

            int bufSize = FrozenWorld_RefitRefreeze_GetNumAdjustedFragments();

            checkError();

            FrozenWorld_FragmentId *buf = stackalloc FrozenWorld_FragmentId[bufSize];

            int numAffected = FrozenWorld_RefitRefreeze_GetAdjustedFragmentIds(bufSize, buf);

            checkError();

            absorbedFragments = new FragmentId[numAffected];
            for (int i = 0; i < numAffected; ++i)
            {
                absorbedFragments[i] = (FragmentId)buf[i];
            }

            FrozenWorld_FragmentId mergedFragmentId;

            FrozenWorld_RefitRefreeze_GetMergedFragmentId(&mergedFragmentId);
            checkError();
            mergedId = (FragmentId)mergedFragmentId;

            return(true);
        }
 [DllImport("FrozenWorldPlugin")] public static extern void FrozenWorld_RefitRefreeze_GetMergedFragmentId(FrozenWorld_FragmentId *mergedFragmentIdOut);
 [DllImport("FrozenWorldPlugin")] public static extern int FrozenWorld_RefitRefreeze_GetAdjustedFragmentIds(int adjustedFragmentIdsBufferSize, FrozenWorld_FragmentId *adjustedFragmentIdsOut);
 [DllImport("FrozenWorldPlugin")] public static extern void FrozenWorld_GetMostSignificantFragmentId(FrozenWorld_Snapshot snapshot, FrozenWorld_FragmentId *fragmentIdOut);