Skip to content

Game.PolicyVisibility

Assembly:
Namespace: Game.Prefabs

Type: enum

Base: System.Enum

Summary:
Represents whether a policy prefab should be visible in the game's policy list UI. Typically used by prefab definitions to indicate that a policy exists but should not be shown to players in the policy selection list (for internal or programmatic use).


Fields

  • Default
    The policy is treated normally and will appear in the policy list UI. Underlying value: 0.

  • HideFromPolicyList
    The policy should be hidden from the policy list UI. Underlying value: 1. Use this for policies that are applied/managed internally or via code rather than by player interaction.

Properties

  • (none)
    This is a simple enum type and does not define properties. It uses the standard System.Enum functionality (e.g., ToString(), HasFlag for flag enums—this enum is not a flags type).

Constructors

  • (none)
    Enums do not define explicit constructors in C#. Instances are created by casting or assigning the enum values listed above.

Methods

  • (none defined)
    Standard System.Enum methods are available (ToString, GetTypeCode, etc.). There are no custom methods on this enum.

Usage Example

// Check whether a prefab's visibility indicates it should be hidden from the policy list
if (prefab.policyVisibility == Game.Prefabs.PolicyVisibility.HideFromPolicyList)
{
    // Skip adding this policy to UI, or handle it differently
    return;
}

// Normal policy handling
AddPolicyToUI(prefab);

{{ Additional notes: - Underlying type: int (default). - Values are stable (Default = 0, HideFromPolicyList = 1); be cautious adding values later to maintain compatibility with saved data. - Used in prefab definitions and policy-handling code to filter UI presentation of policies. }}