00:00 Intro: What we’ll build (obstacle + physics + spawning)
00:18 Create/Load Project (Jumping Force 3 – URP)
00:42 Download & Import Session 26 Unity Package (Patreon)
01:15 Load Satvik Layout + Remove Readme Asset
01:41 Import Custom Package + Open Jumping Game Scene
02:17 Choose an Obstacle Asset & Place It in the Scene
03:31 Create MoveLeft Script + Attach to Obstacle
04:10 Create Prefab Folder + Make Obstacle Prefab
04:56 Code MoveLeft (speed + Translate left using deltaTime)
06:23 Attach MoveLeft to Background (fake player movement)
06:44 Problem: Obstacle passes through player (no physics)
06:57 Add BoxCollider & Fit Collider to Obstacle
07:41 Add Rigidbody + Apply Overrides to Prefab
08:22 Fix Player Constraints (unfreeze X for natural collision)
09:00 Create SpawnManager GameObject + Script
10:03 Add Prefab Reference + Spawn Position Variable
11:31 Instantiate One Obstacle (test spawn)
12:19 Remove Scene Obstacle + Assign Prefab in Inspector
13:06 Create SpawnObstacle() Method
14:01 InvokeRepeating Setup (Start Delay + Repeat Rate)
16:02 Test: Obstacles spawn every 2 seconds
16:17 Next Session Tease: Infinite scrolling background
Get free resources for this course from the below patreon link
/ 145923169
In this Session 26 (Junior Programmer Series), we build the core mechanic of an endless runner / jumping game in Unity: moving obstacles + real physics collision + repeated spawning.
You’ll learn how to:
Create a new URP project (Jumping Force 3) or continue from the previous session
Import the Session 26 Unity Package and open the Jumping Game scene
Add a new Obstacle from the Course Library and position it correctly
Write a simple MoveLeft script using Transform.Translate() + Time.deltaTime
Convert the obstacle into a Prefab so we can spawn it anytime
Add Box Collider and Rigidbody for realistic collision
Fix the player’s Rigidbody Constraints so the collision reacts naturally
Create a Spawn Manager and spawn obstacles using Instantiate()
Use InvokeRepeating() with Start Delay and Repeat Rate to spawn obstacles continuously
✅ Result: Obstacles move from right to left and spawn repeatedly at fixed intervals, creating the foundation for an endless runner.
📌 Patreon Resources (Session 26 Package + Satvik Layout):
Check the link in the description and download: “26 Jump Game Spawning Obstacle Starter Unity Package”
🔥 Next Session: We will build infinite scrolling background so the environment keeps looping smoothly.
#Unity #Unity3D #GameDev #EndlessRunner #UnityTutorial #CSharp #Rigidbody #Collider #Prefab #Instantiate #InvokeRepeating #BeginnerGameDev #JuniorProgrammerSeries