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
AIã«è³ªåãã
AIã«è³ªåãã
äœã§ã質åããããææ¡ããã質åã®1ã€ã詊ããŠãã£ãããå§ããŠãã ãã