Prediction: catch errors early

This commit is contained in:
mischa 2024-01-23 10:26:56 +01:00
parent 59ec51600a
commit b11a13795b

View File

@ -88,6 +88,7 @@ public class PredictedRigidbody : NetworkBehaviour
void Awake()
{
rb = GetComponent<Rigidbody>();
if (rb == null) throw new InvalidOperationException($"Prediction: {name} is missing a Rigidbody component.");
}
protected virtual void MoveRigidbody(GameObject destination)