Skip to content

CVR Spawnable

The primary component for a spawnable (prop). Required for setup and uploading. Adds a CVRSharedPhysicsController at runtime and registers the prop with the SpawnableManager.

float. Vertical offset used when the prop is first placed. Gizmo drawn as a downward line and a ring on the floor.

bool. Enables the extended sync-value path (used by the CCK inspector to gate advanced sync options).

PropPrivacy enum:

  • everyone (default) — any player can interact.
  • owner — only the spawning owner.

SpawnableType enum:

  • StandaloneSpawnable (default) — a regular prop spawn.
  • WorldSpawnable — prop pre-baked into a world scene.

string. Stable instance id for WorldSpawnable entries. Empty for regular props.

string. Arbitrary serialized payload that travels with the prop over the network.

List<CVRSpawnableValue>. Up to 40 floats per prop. Each entry has:

  • name — label shown in the inspector.
  • startValue — initial float at spawn.
  • currentValue — runtime float.
  • updatedByUpdatedBy enum selecting a value source:
    • None
    • SystemTime, WorldTime
    • SpawnerPositionX/Y/Z, SpawnerDistance
    • SpawnerLookDirectionX/Y/Z
    • SpawnerLeftHandDirectionX/Y/Z, SpawnerRightHandDirectionX/Y/Z
    • SpawnerLeftGrip, SpawnerRightGrip, SpawnerLeftTrigger, SpawnerRightTrigger
    • OwnerLeftGrip, OwnerRightGrip, OwnerLeftTrigger, OwnerRightTrigger
    • OwnerCurrentGrip, OwnerCurrentTrigger, OwnerOppositeGrip, OwnerOppositeTrigger
  • updateMethodUpdateMethod enum:
    • Override (default) — replace with source value.
    • AddToDefault, AddToCurrent
    • SubtractFromDefault, SubtractFromCurrent
    • MultiplyWithDefault
    • DefaultDividedByCurrent
  • animator — optional Animator to write into.
  • animatorParameterName — parameter name (-none- or empty disables the write).
  • animatorParameterType — resolved at Start to Float, Int, Bool, or Trigger based on the animator parameter kind.

Spawner* sources only tick when SpawnedByMe is true. Owner* sources require a CVRPickupObject grabbed by you. Values are sent at the tick rate set by SetSyncTickRate (default: MetaPort.SystemTickRate).

List<CVRSpawnableSubSync>. Each entry syncs a child transform. Fields:

  • transform — target child.
  • syncedValuesSyncFlags flag enum: TransformX, TransformY, TransformZ, RotationX, RotationY, RotationZ.
  • precisionSyncPrecision enum: Full (4 bytes), Half (2 bytes), Quarter (1 byte).
  • syncBoundaryfloat, default 0.5. Half/Quarter positions are clamped to [-syncBoundary, syncBoundary] and quantised over the byte range. Rotations are encoded as fraction of 360 degrees.

usedParametersForSubSync reflects the 4-byte chunks consumed by all sub-syncs, counted against the prop’s parameter budget.

Runtime-only fields:

  • guid, instanceId, ownerId — populated from CVRSyncHelper.PropData.
  • SpawnedByMe, SpawnedByFriend — ownership flags set in ApplyPropValuesSpawn.
  • SyncType — int used by the sync helper (0: idle/physics, 1: grabbed, 2: attached, 3: telepathic grab).
  • isPhysicsSynced — true while the prop is being simulated/sent.
  • PropData — reference to the matching PropData entry.
  • DataStore — optional CVRDataStore on the same GameObject.
  • ContentType — always CVRContentType.Spawnable.
  • SetValue(int index, float value) — write a sync value and flag dirty.
  • GetValue(int index) — read current float.
  • ForceUpdate() / ForceUpdate(int syncType) — force a sync send.
  • SetSyncTickRate(float tickRate) — change the scheduled send rate.
  • ResetInterpolationTime() — clear interpolation buffer.
  • UpdateValueIfNecessary(string name, float value) — set a sync value by its animator parameter name (owner only).
  • Delete() — request destruction via CVRSyncHelper.
  • IsMine(), IsSyncedByMe() — ownership queries.
  • AnimEventDestroyProp, AnimEventDestroyThis — animation-event entry points that call Delete().
  • Drop() — used by grip-sync values on pickup release to zero them.

CVR-GameFiles/ABI.CCK.Components/CVRSpawnable.cs, CVR-GameFiles/ABI.CCK.Components/CVRSpawnableValue.cs, CVR-GameFiles/ABI.CCK.Components/CVRSpawnableSubSync.cs