Skip to content

Game.Prefabs.PathfindPrefab

Assembly:
{{ Assembly not specified in the source file. This class is defined in the game's codebase (likely the main Game assembly). }}

Namespace:
Game.Prefabs

Type:
public class

Base:
PrefabBase

Summary:
{{ PathfindPrefab is a minimal prefab class used to represent pathfinding-related prefabs in the game. It directly inherits from PrefabBase and does not add any members or behavior itself. The class is decorated with a ComponentMenu attribute to place it under the "Pathfind/" menu in the Unity editor (or the game's equivalent editor UI). Modders can extend this class to add initialization, components, or custom behavior related to pathfinding assets. }}


Fields

  • None declared in this class.
    {{ The class has no fields defined. Any state or data must be provided by adding fields or by relying on members of PrefabBase. }}

Properties

  • None declared in this class.
    {{ No properties are defined; properties from PrefabBase remain available. }}

Constructors

  • public PathfindPrefab()
    {{ The default parameterless constructor is implicitly provided. No custom construction logic is present. If you need initialization, override lifecycle methods such as OnCreate (if provided by PrefabBase). }}

Methods

  • None declared in this class.
    {{ There are no method overrides or additions. To perform initialization or cleanup, override the appropriate virtual methods from PrefabBase (for example OnCreate/OnDestroy or similar lifecycle methods provided by the base class). }}

Attributes

  • [ComponentMenu("Pathfind/", new Type[] { })]
    {{ This attribute places the prefab type under the "Pathfind/" category in the component/prefab menu used by the game's editor tooling. The second parameter is an empty Type array; this attribute usage follows Unity-style ComponentMenu conventions. }}

Usage Example

using System;
using UnityEngine; // if needed by your mod

[ComponentMenu("Pathfind/")]
public class PathfindPrefab : PrefabBase
{
    // Add custom initialization
    protected override void OnCreate()
    {
        base.OnCreate();
        // Your initialization code here (registering pathfinding resources, adding components, etc.)
    }
}

{{ Tips for modders: - Extend PathfindPrefab to add custom components or data used by your pathfinding systems. - Place the script under an appropriate folder (e.g., Game/Prefabs) consistent with the project's structure. - Use the ComponentMenu attribute to keep your prefab organized in the editor menu. - Inspect PrefabBase to discover available lifecycle hooks (OnCreate, OnDestroy, serialization callbacks, etc.) you can override. - If you need this prefab to be discoverable by the game's prefab collections, ensure you register it or follow the game's prefab registration conventions. }}