Sockets and shapes
Placement size, sockets, solid collision, and interaction triggers are separate settings.
Choose what to override
| Property | Omitted / null | Empty array |
|---|---|---|
Models | Keep donor visuals | Remove visuals |
Sockets | Keep donor sockets | Remove sockets |
BuildingCost | Keep donor cost | Free to build |
PhysicsShapes | Keep donor solid geometry | No solid colliders |
InteractionShapes | Keep donor triggers | No overrides |
An interaction's Boxes | Supply an array | Remove that target's colliders |
Set a footprint
Add using UnityEngine; and using Ships.Interface.Model.Parts;. Put these properties in the tutorial controller's PartDefinition:
Size = new Vector3(0.5f, 0.5f, 0.5f),
Sockets = new[]
{
new SocketDefinition
{
Id = 0,
Type = CableType.Signal,
Position = new Vector3(0, 0.07f, -0.375f),
Rotation = Vector3.zero
}
},
PhysicsShapes = new[]
{
new BoxShape { Center = new Vector3(0, 0.025f, 0), Size = new Vector3(0.5f, 0.05f, 0.5f) }
},
InteractionShapes = new[]
{
new InteractionShapeDefinition
{
Boxes = new[]
{
new BoxShape { Center = new Vector3(0, 0.25f, 0), Size = new Vector3(0.52f, 0.52f, 0.52f) }
}
}
}Size sets the placement footprint. The example adds a thin solid base, a larger use trigger, and signal socket 0.
Coordinates and restrictions
Use part-local positions and Euler angles in degrees. Dimensions must be positive. Explicit boxes and replacement sockets do not scale with the mesh or footprint.
Preserve socket IDs/types expected by donor logic. Interaction shapes modify existing actions: omitted Target selects the sole interaction; otherwise name a unique interaction GameObject. Static physics overrides cannot replace dynamic donor colliders.
Place a fresh instance to test snapping, cable connections, collision, and use prompts. Existing placements are not moved by geometry updates.
See shape types for the complete limits.