private static void Postfix(PlayerManager __instance, ref MeshLocationCategory __result) { GameObject gameObject = __instance.GetObjectToPlace(); if (__result != MeshLocationCategory.Valid && Input.GetKey(KeyCode.L)) { BetterPlacing.RestoreLastValidTransform(gameObject); __result = MeshLocationCategory.Valid; } if (__result == MeshLocationCategory.Valid) { BetterPlacing.StoreValidTransform(gameObject); if (Input.GetKey(KeyCode.P)) { BetterPlacing.SnapToPositionBelow(gameObject); } } if (Input.GetKey(KeyCode.R)) { BetterPlacing.SnapToRotationBelow(gameObject); } float yAngle = GetRotation(); if (yAngle != 0) { BetterPlacing.Rotate(gameObject, yAngle); } }