private void OnDisable() { allVolumes[index] = allVolumes[allVolumes.Length - 1]; FogVolumeComponent lastComp = MUnsafeUtility.GetObject <FogVolumeComponent>(allVolumes[index].light); lastComp.index = index; allVolumes.RemoveLast(); }
private void OnDisable() { *container = allVolumes[allVolumes.Length - 1]; FogVolumeComponent lastComp = MUnsafeUtility.GetObject <FogVolumeComponent>(container->light); lastComp.container = container; allVolumes.RemoveLast(); }