Skip to content

Game.Prefabs.NetObjectPlacement

Assembly:
(unspecified — part of the game's assembly; not provided in source)

Namespace: Game.Prefabs

Type: public enum

Base: System.Enum

Summary:
NetObjectPlacement is an enumeration that describes allowed or intended placement locations for network-related prefabs (net objects) relative to network nodes and segment geometry. Modders use these values to indicate where a net object (props, markers, crossing indicators, course points, etc.) may be placed: on nodes, at segment ends, in the middle of segments, and in special contexts such as fixed segments or waterway crossings. Several values explicitly exclude waterway-crossing locations, which is useful for preventing placement where boats/ships cross.


Fields

  • Node
    Placement attached to a network node (junction).

  • EdgeEndsOrNode
    Placement allowed at either the segment ends (endpoints) or directly on the node.

  • EdgeMiddle
    Placement located in the middle of a network segment.

  • EdgeEnds
    Placement at the ends of a network segment (both ends).

  • CourseStart
    Placement used to mark the start of a course/route (e.g., route/course markers).

  • CourseEnd
    Placement used to mark the end of a course/route.

  • NodeBeforeFixedSegment
    Node placement positioned immediately before a fixed segment (relative ordering around fixed segments).

  • NodeBetweenFixedSegment
    Node placement positioned between fixed segments.

  • NodeAfterFixedSegment
    Node placement positioned immediately after a fixed segment.

  • EdgeMiddleFixedSegment
    Edge-middle placement for segments designated as fixed segments.

  • EdgeEndsFixedSegment
    Placement at the ends of a fixed segment.

  • EdgeStartFixedSegment
    Placement at the start of a fixed segment.

  • EdgeEndFixedSegment
    Placement at the end of a fixed segment.

  • EdgeEndsOrNodeFixedSegment
    Allowed at segment ends or node when the segment is a fixed segment.

  • EdgeStartOrNodeFixedSegment
    Allowed at the segment start or the node when part of a fixed segment.

  • EdgeEndOrNodeFixedSegment
    Allowed at the segment end or the node when part of a fixed segment.

  • WaterwayCrossingNode
    Node that represents a waterway crossing (nodes at waterways that allow crossings).

  • NotWaterwayCrossingNode
    Node placement explicitly excluding waterway crossing nodes.

  • NotWaterwayCrossingEdgeMiddle
    Edge-middle placement that excludes locations where a waterway crossing occurs.

  • NotWaterwayCrossingEdgeEndsOrNode
    Edge end or node placement that excludes waterway crossing locations.

(These enum members are simple named constants; their integer values are the default sequential values defined by the compiler, starting at 0 for the first member.)

Properties

  • (none)
    This enum defines no properties. Use the enum values directly.

Constructors

  • (none declared)
    Enums do not have user-defined constructors. The default value is the first declared member (Node) with the underlying integral value 0 unless explicitly assigned.

Methods

  • (none declared on the enum type)
    As with all enums, standard System.Enum static/instance helpers are available (e.g., ToString(), Enum.GetValues(typeof(NetObjectPlacement)), Enum.TryParse(), etc.). There are no custom methods defined on this enum in the source file.

Usage Example

// Choose placement for a net object
NetObjectPlacement placement = NetObjectPlacement.EdgeMiddle;

// Check placement when spawning/validating a prefab
switch (placement)
{
    case NetObjectPlacement.Node:
        // place object on node
        break;
    case NetObjectPlacement.EdgeMiddle:
    case NetObjectPlacement.EdgeMiddleFixedSegment:
        // place object in segment middle
        break;
    case NetObjectPlacement.WaterwayCrossingNode:
        // special handling for waterway crossing nodes
        break;
    case NetObjectPlacement.NotWaterwayCrossingEdgeMiddle:
        // ensure we are not at a waterway crossing before placing
        break;
    // handle other cases as needed
}

// Enumerate all possible values (example)
foreach (NetObjectPlacement val in Enum.GetValues(typeof(NetObjectPlacement)))
{
    Debug.Log($"Allowed placement type: {val}");
}