SDT0605: Invalid Replication Type

Property Value
Rule ID SDT0605
Title Invalid Replication Type
Category Network
Severity Error

Cause

The [ReplicateField] attribute has been applied to a field whose data type cannot be natively replicated by the network engine.

Rule Description

To optimize bandwidth, the state synchronization system only supports primitive types (like int, float, bool, byte) and predefined engine structs. Complex reference types, classes, or nested collections cannot be marked for automated variable replication.

How to Fix Violations

Remove the [ReplicateField] attribute from the unsupported type, or change the field to a supported primitive/struct layout.

Violation:

[ReplicateField]
public List<string> CustomInventory; // Error!

Fix:

[ReplicateField]
public int InventoryId; 

When to Suppress Warnings

Danger

Do not suppress this error. This error halts the build because the generated low-level memory serialization layout will fail to compile.