public static void LoadToObject(Component game, ref HingeJointData data) { var obj = game.GetComponent <HingeJoint2D>(); if (obj == null) { return; } obj.enableCollision = data.enableCollision; obj.breakForce = data.breakForce; obj.breakTorque = data.breakTorque; obj.anchor = data.anchor; obj.connectedAnchor = data.connectedAnchor; obj.autoConfigureConnectedAnchor = data.autoConfigure; obj.useMotor = data.useMotor; obj.useLimits = data.useLimits; obj.motor = data.motor; obj.limits = data.limits; }
public unsafe override void Load(FakeStruct fake) { data = *(HingeJointData *)fake.ip; }