Пример #1
0
        public static void LoadToObject(Component game, ref SliderJointData data)
        {
            var obj = game.GetComponent <SliderJoint2D>();

            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.autoConfigureAngle           = data.autoConfigureAngle;
            obj.angle     = data.angle;
            obj.useMotor  = data.useMotor;
            obj.useLimits = data.useLimits;
            obj.motor     = data.motor;
            obj.limits    = data.limits;
        }
Пример #2
0
 public unsafe override void Load(FakeStruct fake)
 {
     data = *(SliderJointData *)fake.ip;
 }