Skip to content

Game.UI.Editor.EditorBulldozeTool

Assembly:
Assembly-CSharp (typical for Cities: Skylines 2 game code / mods)
{{ This class lives in the main game assembly (commonly Assembly-CSharp.dll in Unity builds). If you build a mod that references game types you may need to reference or match that assembly. }}

Namespace:
Game.UI.Editor

Type:
public class EditorBulldozeTool

Base:
EditorTool

Summary:
This small wrapper class registers and configures the in-editor "Bulldoze" tool. It sets the tool id, icon, shortcut name and connects the tool to the game systems responsible for bulldozing: BulldozeToolSystem and its UI panel (BulldozeToolPanel). The class takes a Unity.Entities.World in its constructor and uses GetOrCreateSystemManaged to obtain the systems.
{{ Use this when you need to add or configure the Bulldoze tool in custom editor tool lists or when constructing editor UI/tool suites programmatically. It does not contain runtime logic itself — the behavior lives in the referenced systems. }}


Fields

  • None
    {{ This class declares no private or public fields. It only configures inherited properties from EditorTool in the constructor. }}

Properties

  • id (inherited from EditorTool)
    {{ Set to "BulldozeTool" in the constructor. This is the identifier used by the UI/tool manager to refer to this tool. }}

  • icon (inherited from EditorTool)
    {{ Set to "Media/Editor/Bulldozer.svg". Path to the icon asset used in tool UI. }}

  • tool (inherited from EditorTool)
    {{ Set to the managed system instance returned by world.GetOrCreateSystemManaged(). This is the actual system that implements bulldoze behavior. }}

  • panel (inherited from EditorTool)
    {{ Set to the managed system instance returned by world.GetOrCreateSystemManaged(). This is the UI panel associated with the tool. }}

  • shortcut (inherited from EditorTool)
    {{ Set to "Bulldozer". This string is used for the tool's shortcut/label registration. }}

Constructors

  • public EditorBulldozeTool(World world)
    {{ The constructor initializes inherited EditorTool properties:
  • id = "BulldozeTool"
  • icon = "Media/Editor/Bulldozer.svg"
  • tool = world.GetOrCreateSystemManaged()
  • panel = world.GetOrCreateSystemManaged()
  • shortcut = "Bulldozer" It requires a Unity.Entities.World instance; the constructor does not perform additional checks. Ensure the provided World is the correct world where editor systems are expected to live (typically the editor or game world used by the mod). }}

Methods

  • None (no additional public or protected methods declared)
    {{ All behavior is delegated to the BulldozeToolSystem and BulldozeToolPanel systems. If you need to customize behavior, extend or patch those systems rather than this thin wrapper. }}

Usage Example

// Typical usage when setting up editor tools:
using Unity.Entities;
using Game.UI.Editor;

// obtain/create the World instance used for editor systems
World world = /* get the appropriate World, e.g. World.DefaultGameObjectInjectionWorld or an editor-specific world */;

// create/register the EditorBulldozeTool
var bulldozeEditorTool = new EditorBulldozeTool(world);

// The base EditorTool registration code (elsewhere) will pick up this instance
// and integrate it into the editor UI/toolset. The actual bulldoze functionality
// is implemented by BulldozeToolSystem and its panel.

{{ If you need the tool to be available in a modded editor environment, make sure the World you pass is the one the game's editor UI uses and that BulldozeToolSystem / BulldozeToolPanel types are present and accessible. }}