public void SetBoundaries(LevelBoundaries levelBoundaries) { if (levelBoundaries != null) { _bounds = levelBoundaries.levelBounds; _innerBounds = new Rect(_bounds.x + smoothEdge, _bounds.y + smoothEdge, _bounds.width - 2 * smoothEdge, _bounds.height - 2 * smoothEdge); _checkForBounds = true; ApplyBounds(); } else { _checkForBounds = false; } }