Game.Prefabs.ObjectRequirementType
Assembly: Game
Namespace: Game.Prefabs
Type: enum (flags)
Base: System.Enum (underlying type: System.UInt16)
Summary:
A bitmask enum used to express requirements or special handling rules for prefab object selection/placement. It is decorated with [Flags], so multiple values can be combined using bitwise operations. Typical use is to mark that an object is "select only" (cannot be placed directly) or to indicate that explicit selection/placement should be ignored.
Fields
-
SelectOnly = 1
Indicates the object is selectable but not intended for normal explicit placement. Consumers can treat this as "only available for selection" or "not placeable via standard placement UI". -
IgnoreExplicit = 2
Indicates explicit placement or explicit selection should be ignored for this object. Used to skip typical explicit-handling paths when processing prefabs.
Properties
- This enum exposes no properties of its own. Use standard enum/bitmask checks (e.g., HasFlag or bitwise operations) to query values.
Constructors
- Enums do not declare constructors in user code. The underlying runtime provides default construction semantics for enum values.
Methods
- This enum itself declares no methods. Use standard System.Enum and bitwise patterns:
- value.HasFlag(ObjectRequirementType.SelectOnly)
- (value & ObjectRequirementType.IgnoreExplicit) != 0
- Enum.ToString(), casting, etc.
Usage Example
// Combine flags
ObjectRequirementType flags = ObjectRequirementType.SelectOnly | ObjectRequirementType.IgnoreExplicit;
// Check flags
if ((flags & ObjectRequirementType.SelectOnly) != 0)
{
// Treat as selectable-only
}
if (flags.HasFlag(ObjectRequirementType.IgnoreExplicit))
{
// Skip explicit placement handling
}
// Clearing a flag
flags &= ~ObjectRequirementType.IgnoreExplicit;