© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2024
C. HardmanGame Programming with Unity and C#https://doi.org/10.1007/978-1-4842-9720-9_17

17. Walls and Goals

Casey Hardman1  
(1)
West Palm Beach, FL, USA
 

Now that we have some obstacles taking shape and our player movement working nicely, we can start thinking about setting up levels and a win condition for them: touching a goal object.

To block out our levels, we’ll use simple cubes based off a prefab, with variations on their scale and position to stretch them out however we need to make our level. It might look a bit shoddy, but again, we’re focused on learning to program and piece together our games first and foremost.

Walls

Create a cube and name it “Wall” ...

Get Game Programming with Unity and C#: A Complete Beginner’s Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.