inflearn logo

[Unity 6] Tower Defense Refactoring and Expansion - 4 New Tower Types and Map Creation Automation

This hands-on course focuses on building a code structure that is easy to modify and extend, based on a completed 2D tower defense game. Tower functionality that was previously concentrated in a single class is separated by responsibility, while object pooling, event-driven UI, and ScriptableObject-based data separation are introduced step by step. The course also examines issues that can arise when multiple systems work together, such as stacking buffs and slow effects, enemies being returned more than once, and waves starting multiple times. Using the improved structure, you will add area-of-effect, poison, chain-attack, and stun towers, as well as create an editor tool that automatically generates movement path data for the map. By modifying the code yourself and checking the results, you will learn the criteria for grouping common functionality and the reasons for dividing responsibilities.

(5.0) 2 reviews

23 learners

Level Basic

Course period Unlimited

C#
C#
Unity
Unity
scriptable-object
scriptable-object
unity2d
unity2d
Unity6
Unity6
C#
C#
Unity
Unity
scriptable-object
scriptable-object
unity2d
unity2d
Unity6
Unity6

News

1 articles

  • unitynote님의 프로필 이미지

    Hello everyone, this is Dr. Go.


    After creating a tower defense game,
    do you want to improve the code into a structure that supports maintainability and extensibility?


    [Unity 6] Tower Defense Refactoring and Expansion - Automating the Creation of 4 New Towers and Maps In this course,
    based on the tower defense project created in the beginner course,
    you will analyze the existing code and separate classes according to their roles,
    then use inheritance, polymorphism, and ScriptableObjects
    to carry out a step-by-step refactoring into a structure that remains easy to manage even as the project grows.


    Rather than simply organizing the existing code,
    we will use the new structure to create four additional types of towers
    and also explore how the refactored structure can be used when expanding functionality.


    We also improve upon the previous approach, which required manually configuring the paths towers can move along and map information, by directly implementing
    a feature that analyzes the map information placed in the scene and automatically generates the necessary data
    Map Data Auto Bake feature.


    Through this,

    • Separation of responsibilities by class and improved code structure

    • Designing a Tower Structure Using Inheritance and Polymorphism

    • Data separation using ScriptableObject

    • An extensible structure that makes it easy to add new tower features

    • Creating 4 New Types of Towers

    • A Bake system that automatically generates map data

    You can experience these step by step within a single project.


    We recommend this course for those who want to go beyond implementing basic features
    and learn by modifying the project themselves “How should I write code that remains maintainable even when the game grows?”
    “How should I design a structure that makes it easy to add new features?”
    .


    📌 Tower Defense Refactoring Course Link
    https://inf.run/bR9tt


    If you have completed the basic features of the game in the introductory course,
    in this refactoring course, we will develop that project
    into a structure that is easier to manage and expand.


    I hope my course helps with your Unity game development studies.
    Thank you for always seeking out and watching my courses.
    This was Dr. Ko.

    0

$30.80