Prediction: fix wrong null check

This commit is contained in:
mischa 2024-01-23 10:21:26 +01:00
parent d4f55d8761
commit 4e8890967d

View File

@ -247,7 +247,7 @@ protected virtual void CreateGhosts()
// cache components to avoid GetComponent calls at runtime // cache components to avoid GetComponent calls at runtime
physicsCopyRigidbody = physicsCopy.GetComponent<Rigidbody>(); physicsCopyRigidbody = physicsCopy.GetComponent<Rigidbody>();
physicsCopyCollider = physicsCopy.GetComponent<Collider>(); physicsCopyCollider = physicsCopy.GetComponent<Collider>();
if (physicsGhostRigidbody == null) throw new Exception("SeparatePhysics: couldn't find final Rigidbody."); if (physicsCopyRigidbody == null) throw new Exception("SeparatePhysics: couldn't find final Rigidbody.");
if (physicsCopyCollider == null) throw new Exception("SeparatePhysics: couldn't find final Collider."); if (physicsCopyCollider == null) throw new Exception("SeparatePhysics: couldn't find final Collider.");
} }