mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix nre
This commit is contained in:
parent
693acc409f
commit
cd6e67a78e
@ -264,14 +264,16 @@ protected void BeginBlending()
|
|||||||
|
|
||||||
protected void BeginFollowing()
|
protected void BeginFollowing()
|
||||||
{
|
{
|
||||||
predictedRigidbody.isKinematic = true; // full transform sync
|
|
||||||
|
|
||||||
// remove rigidbody until it's needed again later
|
// remove rigidbody until it's needed again later
|
||||||
if (rigidbodyOnDemand)
|
if (rigidbodyOnDemand)
|
||||||
{
|
{
|
||||||
rbConfig = new RigidbodyConfiguration(predictedRigidbody);
|
rbConfig = new RigidbodyConfiguration(predictedRigidbody);
|
||||||
Destroy(predictedRigidbody);
|
Destroy(predictedRigidbody);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predictedRigidbody.isKinematic = true; // full transform sync
|
||||||
|
}
|
||||||
|
|
||||||
state = ForecastState.FOLLOWING;
|
state = ForecastState.FOLLOWING;
|
||||||
#if UNITY_EDITOR // PERF: only access .material in Editor, as it may instantiate!
|
#if UNITY_EDITOR // PERF: only access .material in Editor, as it may instantiate!
|
||||||
|
Loading…
Reference in New Issue
Block a user