Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
"Edit Particles" NullReferenceException
#4
(05-09-2017, 04:19 PM)RoryMakarov Wrote: 2017.1.0p4 and the latest asset

Could reproduce this. Thanks for reporting it! Wwll include the fix in the next update, for now replace the OnDrawGizmosSelected function in ObiPinConstraints.cs with this:

Code:
public void OnDrawGizmosSelected(){

        if (!visualize) return;

        Gizmos.color = Color.cyan;

        foreach (ObiPinConstraintBatch batch in batches){
            foreach(int i in batch.ActiveConstraints){

                if (batch.pinBodies[i] != null){
                    Vector3 pinPosition = batch.pinBodies[i].transform.TransformPoint(batch.pinOffsets[i]);
    
                    Gizmos.DrawLine(actor.GetParticlePosition(batch.pinIndices[i]),
                                    pinPosition);
                }
            }
        }

    }
Reply


Messages In This Thread
RE: "Edit Particles" NullReferenceException - by josemendez - 05-09-2017, 07:53 PM