Uploaded October 2026 | Updated November 2026, 1 day ago
๐ Learn ALL about C#! cmonkey.co/csharpcourse
โ Get my Problem Solving Course! cmonkey.co/problemsolving
๐ฅ Learn how to make ANY game! cmonkey.co/practicepack
๐ FREE Complete Courses! cmonkey.co/freecourses
โ FREE Game Dev Insights! cmonkey.co/gamedevreportnewsletter
๐ฎ Get my Code Monkey Toolkit! cmonkey.co/toolkit
๐ Join my Game Dev Practice Lab FREE! cmonkey.co/practicelab
๐ด RELATED VIDEOS ๐ด
How to Write High Quality Code that doesn't fall apart. youtube.com/watch?v=m0s3IUrWzVQ
Learn how to write PRO level code with this DEEP DIVE! youtube.com/watch?v=RXf1jsXxWkg
How REAL Developers Build Complex Games! youtube.com/watch?v=4kg2N-t2tWI
Optimization is awesome, but do NOT make this mistake! youtube.com/watch?v=vhflNElicXU
Learn C# FREE Tutorial Course Beginner to Advanced! [12 HOURS] youtube.com/watch?v=qZpMX8Re_2Q
How to Write High Quality Code that doesn't fall apart. youtube.com/watch?v=m0s3IUrWzVQ
Learn Problem Solving (FREE Course, MOST VALUABLE skill) youtube.com/watch?v=Jgw5Z40Q1vc
Escape Tutorial HELL with my Game Dev Practice Lab! youtube.com/watch?v=Ng0VH0SmqRo
๐ฌ Your code compiles and the game works, so why bother refactoring? I use a small shop prototype to show how working code can still be difficult to maintain. Let's clean up confusing names, brittle string IDs, and mixed responsibilities without trying to rewrite everything at once.
TIMESTAMPS
00:00 Intro
05:49 Refactoring in small, testable steps
07:11 Inspecting the shop prototype
08:19 Improving variable names
09:27 Renaming fields without losing references
14:23 Private fields and SerializeField
17:05 Consistent code formatting
17:46 Renaming functions and clarifying responsibilities
21:16 Switching to the Input System
22:58 Replacing PlayerPrefs with a shop inventory
25:02 Grouping related data into classes and lists
27:44 Inventory restocking and references
29:41 Reading and spending inventory items
31:54 Replacing string item IDs with enums
35:17 Giving state machine states meaningful names
38:03 Removing remaining PlayerPrefs and saving
39:01 Separating checkout stats UI from logic
40:59 Updating UI through events
43:09 Fixing initialization order with Awake and Start
43:48 Separating customer order UI
44:35 Modeling customer orders with plain C# classes
48:45 Customer order events and custom event data
50:44 Removing magic numbers from the patience bar
51:54 Polling versus events for UI updates
53:19 Moving audio into its own class
54:57 Separating customer visuals and animator constants
57:18 Further refactoring opportunities
๐ Some Links are Affiliate links which means it costs the same to you and I get a nice commission. Thanks for using them!
If you have any questions post them in the comments and I'll do my best to answer them.
๐ Subscribe for more Unity Tutorials youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1
See you next time!
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 9 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
--------------------------------------------------------------------
- Website: unitycodemonkey.com
- Twitter: twitter.com/UnityCodeMonkey
- Steam: store.steampowered.com/developer/EndlessLoopStudios
๐ Learn ALL about C#! cmonkey.co/csharpcourse
โ Get my Problem Solving Course! cmonkey.co/problemsolving
๐ฅ Learn how to make ANY game! cmonkey.co/practicepack
๐ FREE Complete Courses! cmonkey.co/freecourses
โ FREE Game Dev Insights! cmonkey.co/gamedevreportnewsletter
๐ฎ Get my Code Monkey Toolkit! cmonkey.co/toolkit
๐ Join my Game Dev Practice Lab FREE! cmonkey.co/practicelab
๐ด RELATED VIDEOS ๐ด
How to Write High Quality Code that doesn't fall apart. youtube.com/watch?v=m0s3IUrWzVQ
Learn how to write PRO level code with this DEEP DIVE! youtube.com/watch?v=RXf1jsXxWkg
How REAL Developers Build Complex Games! youtube.com/watch?v=4kg2N-t2tWI
Optimization is awesome, but do NOT make this mistake! youtube.com/watch?v=vhflNElicXU
Learn C# FREE Tutorial Course Beginner to Advanced! [12 HOURS] youtube.com/watch?v=qZpMX8Re_2Q
How to Write High Quality Code that doesn't fall apart. youtube.com/watch?v=m0s3IUrWzVQ
Learn Problem Solving (FREE Course, MOST VALUABLE skill) youtube.com/watch?v=Jgw5Z40Q1vc
Escape Tutorial HELL with my Game Dev Practice Lab! youtube.com/watch?v=Ng0VH0SmqRo
๐ฌ Your code compiles and the game works, so why bother refactoring? I use a small shop prototype to show how working code can still be difficult to maintain. Let's clean up confusing names, brittle string IDs, and mixed responsibilities without trying to rewrite everything at once.
TIMESTAMPS
00:00 Intro
05:49 Refactoring in small, testable steps
07:11 Inspecting the shop prototype
08:19 Improving variable names
09:27 Renaming fields without losing references
14:23 Private fields and SerializeField
17:05 Consistent code formatting
17:46 Renaming functions and clarifying responsibilities
21:16 Switching to the Input System
22:58 Replacing PlayerPrefs with a shop inventory
25:02 Grouping related data into classes and lists
27:44 Inventory restocking and references
29:41 Reading and spending inventory items
31:54 Replacing string item IDs with enums
35:17 Giving state machine states meaningful names
38:03 Removing remaining PlayerPrefs and saving
39:01 Separating checkout stats UI from logic
40:59 Updating UI through events
43:09 Fixing initialization order with Awake and Start
43:48 Separating customer order UI
44:35 Modeling customer orders with plain C# classes
48:45 Customer order events and custom event data
50:44 Removing magic numbers from the patience bar
51:54 Polling versus events for UI updates
53:19 Moving audio into its own class
54:57 Separating customer visuals and animator constants
57:18 Further refactoring opportunities
๐ Some Links are Affiliate links which means it costs the same to you and I get a nice commission. Thanks for using them!
If you have any questions post them in the comments and I'll do my best to answer them.
๐ Subscribe for more Unity Tutorials youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1
See you next time!
--------------------------------------------------------------------
Hello and Welcome!
I'm your Code Monkey and here you will learn everything about Game Development in Unity using C#.
I've been developing games for several years with 9 published games on Steam and now I'm sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
--------------------------------------------------------------------
- Website: unitycodemonkey.com
- Twitter: twitter.com/UnityCodeMonkey
- Steam: store.steampowered.com/developer/EndlessLoopStudios




![Unity MCP is DEAD! Use this instead!
๐ Get my Code Monkey Toolkit 50% OFF! https://cmonkey.co/toolkit
โ
50+ Tools and Elements to help you make games BETTER and FASTER!
โค๏ธ FREE Updates to owners, forever!
๐ FREE Complete Courses! https://cmonkey.co/freecourses
โ
FREE Game Dev Insights! https://cmonkey.co/gamedevreportnewsletter
๐ Join my Game Dev Practice Lab FREE! https://cmonkey.co/practicelab
๐ด RELATED VIDEOS ๐ด
Getting Started with Unity AI! https://www.youtube.com/watch?v=7s7rmNeo8Wo
I made the MOST PROFITABLE Game as a Test! https://www.youtube.com/watch?v=W_XOZAWJF24
Ive wanted to do this for YEARS! (Code Monkey Toolkit) https://www.youtube.com/watch?v=0AF_y_YiUbM
Learn C# FREE Tutorial Course Beginner to Advanced! [12 HOURS] https://www.youtube.com/watch?v=qZpMX8Re_2Q
How to Write High Quality Code that doesnt fall apart. https://www.youtube.com/watch?v=m0s3IUrWzVQ
Learn Problem Solving (FREE Course, MOST VALUABLE skill) https://www.youtube.com/watch?v=Jgw5Z40Q1vc
Escape Tutorial HELL with my Game Dev Practice Lab! https://www.youtube.com/watch?v=Ng0VH0SmqRo
๐ฌ I show how to connect Codex and Claude Code to Unity using the Unity CLI and Pipeline package. From installing the tools to reusing a health system and generating a warehouse level, heres how agents can work directly in your projectโand where the results still need a human touch.
00:00 Intro
00:44 What is the Unity CLI
02:02 Installing Unity CLI
03:28 Unity Pipeline into Editor
04:20 Unity Codex and Claude Plugins
05:26 Unity Skills GitHub
05:56 Using the Unity CLI
08:40 Code Monkey Toolkit with AI Skills
09:50 Using Unity CLI and AI Agents for Level Design
11:38 Unity MCP deprecated (sort of)
12:30 Unity CLI and AI Agents are awesome!
๐ Some Links are Affiliate links which means it costs the same to you and I get a nice commission. Thanks for using them!
If you have any questions post them in the comments and Ill do my best to answer them.
๐ Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1
See you next time!
Hello and Welcome!
Im your Code Monkey and here you will learn everything about Game Development in Unity using C#.
Ive been developing games for several years with 9 published games on Steam and now Im sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
- Website: https://unitycodemonkey.com/
- Twitter: https://twitter.com/UnityCodeMonkey
- Steam: https://store.steampowered.com/developer/EndlessLoopStudios Unity MCP is DEAD! Use this instead!](https://i.ytimg.com/vi/ppFshgFOgXU/mqdefault.jpg)


![Your Game Worksโฆ Until Someone Else Plays It!
๐ฅ Try Sentry for FREE! https://cmonkey.co/sentry
๐ Use Coupon CODEMONKEY to get $100 of FREE Credits!
โ
Fix your games FASTER and make more MONEY!
Sponsored by Sentry
๐ FREE Complete Courses! https://cmonkey.co/freecourses
โ
FREE Game Dev Insights! https://cmonkey.co/gamedevreportnewsletter
๐ฎ Get my Code Monkey Toolkit! https://cmonkey.co/toolkit
๐ Learn how to make ANY game! https://cmonkey.co/practicepack
๐ด RELATED VIDEOS ๐ด
How to DETECT ERRORS in your game! https://www.youtube.com/watch?v=cos9FbXzdWI
How to Fix NullReferenceException in C#! https://www.youtube.com/watch?v=5irv30-bTJw
Add CHEATS to your Game! (Easy Developer Console, Set Gravity, Spawn Enemies) https://www.youtube.com/watch?v=bOf6CjpuSFs
This Tool FIXES your Unity Project! https://www.youtube.com/watch?v=2gP-2rQ3o_Q
Learn Problem Solving (FREE Course, MOST VALUABLE skill) https://www.youtube.com/watch?v=Jgw5Z40Q1vc
Learn C# FREE Tutorial Course Beginner to Advanced! [12 HOURS] https://www.youtube.com/watch?v=qZpMX8Re_2Q
How to Write High Quality Code that doesnt fall apart. https://www.youtube.com/watch?v=m0s3IUrWzVQ
Learn Problem Solving (FREE Course, MOST VALUABLE skill) https://www.youtube.com/watch?v=Jgw5Z40Q1vc
Escape Tutorial HELL with my Game Dev Practice Lab! https://www.youtube.com/watch?v=Ng0VH0SmqRo
๐ฌ Bugs in your Unity game can be hard to track down when they only happen on a players PC. I show how to use error reports, logs, and screenshots to diagnose a frozen UI, broken saves, and an event bug in a complex game, without waiting for players to email you their logs.
TIMESTAMPS
00:00 Intro
01:40 Frozen UI bug demo
02:13 The manual bug-reporting process
02:53 Diagnosing errors with logs and screenshots
03:38 Fixing a missing prefab reference
05:34 Debugging a save failure on a players PC
07:10 Creating the missing save directory
07:33 Tracking an error in a complex Unity game
08:41 Finding an event subscription bug
๐ Some Links are Affiliate links which means it costs the same to you and I get a nice commission. Thanks for using them!
If you have any questions post them in the comments and Ill do my best to answer them.
๐ Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1
See you next time!
Hello and Welcome!
Im your Code Monkey and here you will learn everything about Game Development in Unity using C#.
Ive been developing games for several years with 9 published games on Steam and now Im sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
- Website: https://unitycodemonkey.com/
- Twitter: https://twitter.com/UnityCodeMonkey
- Steam: https://store.steampowered.com/developer/EndlessLoopStudios Your Game Worksโฆ Until Someone Else Plays It!](https://i.ytimg.com/vi/qWLxYU-jfbc/mqdefault.jpg)
![Learn C# Data Types in 18 Minutes!
โ
Watch the FREE 12 hour C# Course https://www.youtube.com/watch?v=qZpMX8Re_2Q
๐ Get the Premium Course! https://cmonkey.co/csharpcompletecourse
๐ฌ Learn by doing the Interactive Exercises and everything else in the companion project!
๐ FREE Complete Courses! https://cmonkey.co/freecourses
โ
FREE Game Dev Insights! https://cmonkey.co/gamedevreportnewsletter
๐ Weekly Game Mechanic Challenges! https://cmonkey.co/practicelab
๐ฎ Get my Code Monkey Toolkit! https://cmonkey.co/toolkit
๐ด RELATED VIDEOS ๐ด
Learn C# FREE Tutorial Course Beginner to Advanced! [12 HOURS] https://www.youtube.com/watch?v=qZpMX8Re_2Q
How to Write High Quality Code that doesnt fall apart. https://www.youtube.com/watch?v=m0s3IUrWzVQ
Learn Problem Solving (FREE Course, MOST VALUABLE skill) https://www.youtube.com/watch?v=Jgw5Z40Q1vc
Escape Tutorial HELL with my Game Dev Practice Lab! https://www.youtube.com/watch?v=Ng0VH0SmqRo
๐ฌ Lets learn all about C# Data Types
๐ Some Links are Affiliate links which means it costs the same to you and I get a nice commission. Thanks for using them!
If you have any questions post them in the comments and Ill do my best to answer them.
๐ Subscribe for more Unity Tutorials https://www.youtube.com/channel/UCFK6NCbuCIVzA6Yj1G_ZqCg?sub_confirmation=1
See you next time!
Hello and Welcome!
Im your Code Monkey and here you will learn everything about Game Development in Unity using C#.
Ive been developing games for several years with 9 published games on Steam and now Im sharing my knowledge to help you on your own game development journey.
I do Unity Tutorials on just about every topic, Unity Tutorials for Beginners and Unity Tutorials for Advanced users.
- Website: https://unitycodemonkey.com/
- Twitter: https://twitter.com/UnityCodeMonkey
- Steam: https://store.steampowered.com/developer/EndlessLoopStudios Learn C# Data Types in 18 Minutes!](https://i.ytimg.com/vi/q_b66z0xM4o/mqdefault.jpg)

