CVR Builder Spawnable
Runtime helper for the builder mode, used to synchronize a preview asset’s position, rotation, and scale while it is being placed. Implements INewtonBuilderAsset. The component’s Reset() schedules its own destruction if a CVRSpawnable is present on the same GameObject, so you only use one or the other.
Fields
Section titled “Fields”Allow Generate Trigger
Section titled “Allow Generate Trigger”bool. When true the builder is allowed to auto-generate trigger colliders for this prop. Default true.
Primary Colour
Section titled “Primary Colour”string. Hex colour (#RRGGBB form). Applied to the _PrimaryColor and _Color shader properties via a MaterialPropertyBlock. Default #E100FF.
Secondary Colour
Section titled “Secondary Colour”string. Hex colour. Applied to the _SecondaryColor and _EmissionColor shader properties. Default #E100FF.
string. Asset id used by the sync helper. Set by Create(guid, bundleId).
Instance Id
Section titled “Instance Id”string. Per-placement instance id. Generated from GUID plus a random suffix by Create().
Create(string guid, string bundleId)— initialise, send spawn packet viaCVRSyncHelper.SpawnBuilderSpawnable.SetColours(string primary, string secondary)— parse hex colours and push them to every renderer’sMaterialPropertyBlock. Throws if either hex string is invalid.UpdateFromNetwork(CVRSyncHelper.BuilderSpawnableData data)— inbound network snapshot.ForceUpdate()— flag that a position / rotation / scale send is needed.Delete()— request removal throughCVRSyncHelper.DeleteBuilderSpawnable.
Runtime behaviour
Section titled “Runtime behaviour”On Start, all child colliders are passed through CVRTools.IgnoreMenuCollisions and the colour block is pushed to each renderer. A send job runs every 100ms and pushes outbound position / euler angles / local scale when needsUpdate is set. Inbound snapshots are interpolated against the network tick interval, with a one-second fallback for overruns.
Related
Section titled “Related”Source
Section titled “Source”CVR-GameFiles/ABI.CCK.Components/CVRBuilderSpawnable.cs