Game.Prefabs.PolicyTogglePrefab
Assembly: Assembly-CSharp.dll
Namespace: Game.Prefabs
Type: class
Base: PolicyPrefab
Summary:
PolicyTogglePrefab is a thin marker/asset class used to represent a toggleable policy prefab within the game's policy system and editor. It does not declare any members of its own — it simply inherits behavior and data from PolicyPrefab and exists primarily to categorize prefabs that represent policy toggles. The class is decorated with a ComponentMenu attribute ([ComponentMenu("Policies/", new Type[] { })]) so it appears under "Policies/" in the component/prefab creation menus.
Fields
- (none declared in this class)
This class does not introduce any private or public fields. Any storage or state is provided by its base class, PolicyPrefab, or other inherited types.
Properties
- (none declared in this class)
No new properties are defined here. Use the properties exposed by PolicyPrefab for prefab configuration.
Constructors
public PolicyTogglePrefab()
Default, parameterless constructor provided by the compiler. There is no custom construction logic in this derived class.
Methods
- (none declared in this class)
This class does not add or override methods. All runtime behavior should come from PolicyPrefab or other base types. To customize behavior, derive from PolicyTogglePrefab and implement or override lifecycle methods (e.g., Awake, Start, OnEnable) as appropriate.
Usage Example
// The class itself is empty; typically you either use it as-is to
// mark a prefab as a policy toggle or subclass it to add custom behavior.
using Game.Prefabs;
public class MyCustomPolicyToggle : PolicyTogglePrefab
{
// Add custom initialization or behavior here.
// For example, add a MonoBehaviour lifecycle method:
private void Awake()
{
// Custom setup
}
}
// In the Unity editor, PolicyTogglePrefab (and subclasses) appear under
// the "Policies/" ComponentMenu because of the ComponentMenu attribute.
Additional notes: - See PolicyPrefab for the fields, properties and methods you can configure or override. - The ComponentMenu attribute places this prefab type under "Policies/" in prefab/component menus to help organize policy-related prefabs.