void placeBlockAtHitPoint(RaycastHit hit) { if (SnapFactors == null) { throw new UnityException("SnapFactors should not be null"); } if (OffsetFactors == null) { throw new UnityException("OffsetFactors should not be null"); } Vector3 pointRounded = blockUtilities.CalculateRoundedPoint(hit, SnapFactors, OffsetFactors); GameObject newBlock = InstantiateBlock(pointRounded); blocksService.WriteBlockToDatabase(newBlock, currentBlockType); }