Exploring and Editing a 2D Platformer Template
Свайпніть щоб показати меню
Before starting your endless jumper, create a new project with the 2D Platformer Template and see what we can do with the skills we've learned so far.
Creating a New Project
- Open Unity Hub → Projects → New Project;
- Select the 2D Platformer Template;
- Name your project and choose a save location;
- Click Create Project.
The template gives you a fully playable platformer, ready to experiment with!
Playing the Game
- Press Play to test the game;
- Controls:
- Move left/right →
A / D - Jump →
Spacebar
- Move left/right →
Using the Hierarchy & Inspector
- Expand the scene in the Hierarchy to see all objects;
- Select the Player object in the Hierarchy to view it in the Inspector.
Fun ways to experiment:
- Change Transform values → make the player bigger, smaller, or reposition them;
- Adjust Player Controller script variables:
- Gravity Modifier → fall faster or slower
- Max Speed → run faster or slower
- Jump Takeoff Speed → jump higher or lower
- Change the player's colour in the Sprite Renderer.
Creating Your Own Level
- Disable objects you don't want from the Hierarchy to start fresh (grid, enemies, tokens, zones);
- Create new platforms using sprites. Add 2D Box Colliders so the player can land on them;
- Copy, paste, and resize platforms to build your level;
- Add enemies: drag them from the Prefabs folder in the Project tab;
- Add a level end: drag the Victory object outside the “Zones” parent to enable it, then move it into position using F to focus;
- Add hazards: move danger zones to the desired location.
1. What template should you select to explore a ready-made 2D platformer?
2. How do you make a new platform that the player can land on?
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 1. Розділ 4
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Секція 1. Розділ 4