Skip to content

Game.UI.Editor.EditorPhotoTool

Assembly:
Game (assembly containing UI editor tools)
Namespace:
Game.UI.Editor

Type:
public class

Base:
EditorTool

Summary:
EditorPhotoTool is a small EditorTool implementation that represents the in-editor "Photo" / cinematic camera tool. It exposes a constant tool identifier and, in its constructor, configures the inherited tool metadata (id, icon) and assigns the tool's UI panel by retrieving the EditorPhotoModePanel system from the provided World.


Fields

  • public const string kToolId
    Constant identifier for the tool. Value: "PhotoTool". Can be used by registration, lookup or tooling code to refer to this specific tool.

Properties

  • This class does not declare its own properties.
    It configures inherited EditorTool members in the constructor:
  • id (set to "PhotoTool")
  • icon (set to "Media/Editor/CinematicCameraOff.svg")
  • panel (set to the EditorPhotoModePanel system obtained from the World)

Constructors

  • public EditorPhotoTool(World world)
    Initializes a new EditorPhotoTool. Calls the EditorTool base constructor with the provided World, then sets:
  • base.id = "PhotoTool"
  • base.icon = "Media/Editor/CinematicCameraOff.svg"
  • base.panel = world.GetOrCreateSystemManaged() This associates the tool with its UI panel system and visual icon.

Methods

  • This class does not declare additional methods beyond the constructor. All runtime behavior is provided by the EditorTool base and the assigned panel system (EditorPhotoModePanel).

Usage Example

// Given an existing Unity.Entities.World 'world'
var photoTool = new EditorPhotoTool(world);

// The tool's id and icon are set by the constructor:
Debug.Log(photoTool.id);   // "PhotoTool"
Debug.Log(photoTool.icon); // "Media/Editor/CinematicCameraOff.svg"

// The panel is retrieved/created via the World:
var panel = world.GetOrCreateSystemManaged<EditorPhotoModePanel>();

Additional notes: - Ensure the Entities package and GetOrCreateSystemManaged are available in your mod environment. - EditorPhotoModePanel must be present/defined; the tool expects that system to provide the photo-mode UI/behavior.