Skip to content

Systems

Summary

This page outlines the twelve core systems that make up the 2.5D Beat 'Em Up Template.

Overview

Some systems are made entirely out of code files while others have both code and non-code elements. See each system's dedicated page for more information.

  • Ability
    everything and anything units can do
  • Action
    control what a unit knows how to do
  • Animation
    bring objects in the scene to life
  • Audio
    play dynamic background music and sound effects
  • Command
    determine when in-game actions should be performed
  • Environment
    build immersive and responsive worlds
  • Game
    change the game's state and direct its flow
  • Hitbox
    transfer data between two bodies through collision detection
  • Input
    switch between different control schemes
  • Player
    manage both human and AI players
  • UI
    design custom menus and transitions
  • Unit
    create, customize and manage the lifetime of in-game units
  • Utilities
    general-purpose tools that can be used anywhere, in any game, when needed

Scripting folder

All of the code files for each system are located at BeatEmUpTemplate/Assets/Scripting.

scripting.png

Each folder is further divided by script type:

Folder Name
Description
CSharp Contains scripts that are not meant to be attached to GameObjects in the scene. Many of them represent static event classes that are meant to be invoked, or are abstract classes representing concepts like Players or Teams.
Enums Contains groups of related constants that are meant to be used by other scripts. All classes in these folders use the enum keyword in their declaration.
Interfaces Contain collections of method signatures and properties that can be implemented by other scripts. All classes in these folder use the interface keyword in their declaration.

Interfaces act like a contract; when a class implements an interface, an instance of that class can also be treated as an instance of that interface. This functionality means that two unrelated classes can be treated in the same way through an interface that they both implement.
MonoBehaviours Contain scripts that are meant to be attached to GameObjects in the scene as components. All classes in these folders inherit from Unity's MonoBehaviour class. Many of them represent managers, controllers, and responders specific to scenes or prefabs.
PropertyAttributes Contains custom attributes for script variables. All classes in this folder derive from Unity's base PropertyAttribute class.
PropertyDrawers Contains custom drawers to control how script variables with custom PropertyAttributes appear in the Inspector. All classes in this folder derive from Unity's base PropertyDrawer class.
ScriptableObjects Contains centralized data that can be conveniently accessed from scenes and assets within a project. All classes in this folder derive from Unity's base ScriptableObject class.

ScriptableObjects are stored on disk and live independently of GameObjects and class instances. They are used as data containers to save large amounts of data, reducing a project’s memory usage by not duplicating values.
StateMachineBehaviours Contains components that can be added to a state machine state. All classes in this folder derive from Unity's base StateMachineBehaviour class. See the Animation page for more information.
Structs Contains user-defined data types that combine fields of different types underneath a single type. All classes in this folder use the struct keyword in their declaration.
VisualElements Contains objects that are part of the UIElements visual tree. All classes in this folder derive from Unity's base VisualElement class. See the UI page for more information.