Game.Prefabs.NetNodeStateInfo
Assembly: Game (in-game assembly)
Namespace: Game.Prefabs
Type: class
Base: System.Object
Summary:
Serializable data container used by the game's prefab system to describe state conditions for a net node. It contains sets of piece-requirement rules that define when this node state applies (require all, any, or none) and which piece-state changes should be applied when the conditions match. Typically used by net prefabs to drive node/edge matching logic and to set node piece states during placement or updates.
Fields
-
public NetPieceRequirements[] m_RequireAll
Array of NetPieceRequirements that must all be satisfied for this state to be considered a match. If null or empty, there is no "require all" constraint. -
public NetPieceRequirements[] m_RequireAny
Array of NetPieceRequirements where at least one must be satisfied for this state to be considered a match. If null or empty, there is no "require any" constraint. -
public NetPieceRequirements[] m_RequireNone
Array of NetPieceRequirements that must all NOT be satisfied for this state to be considered a match. If null or empty, there is no "require none" constraint. -
public NetPieceRequirements[] m_SetState
Array of NetPieceRequirements (used here to describe target piece state changes) that will be applied when this state is selected. Typically describes which pieces on the node should be enabled/disabled or set to particular states. -
public NetEdgeMatchType m_MatchType
Enum value indicating how edge matching is performed for this state (for example: match by exact piece, direction, or other game-defined criteria). See NetEdgeMatchType for available values and semantics.
Properties
- None (this class exposes public fields and is primarily used as a serialized data container).
Constructors
public NetNodeStateInfo()
Default constructor. Instances are usually deserialized from prefab data; when constructed manually, fields default to null and should be assigned as needed.
Methods
- None (no methods are defined on this type; behavior is driven by the data consumers in the prefab/net matching systems).
Usage Example
// Create and configure a NetNodeStateInfo instance manually.
var stateInfo = new Game.Prefabs.NetNodeStateInfo
{
m_MatchType = NetEdgeMatchType.Exact, // example enum value; replace with actual value names
m_RequireAll = new[]
{
// examples — create NetPieceRequirements instances appropriate to the API
new NetPieceRequirements { /* configure requirement */ }
},
m_RequireAny = null,
m_RequireNone = new[]
{
// pieces that must NOT be present/active
new NetPieceRequirements { /* configure requirement */ }
},
m_SetState = new[]
{
// pieces/state to apply when this node state matches
new NetPieceRequirements { /* configure state change */ }
}
};
Notes: - This class is marked [Serializable] and intended to be populated by the game's prefab serialization system. When creating instances in code, ensure fields are set to valid NetPieceRequirements objects consistent with the net/piece API. - Refer to NetPieceRequirements and NetEdgeMatchType documentation/source for details on configuring requirements and match semantics.