public static void LoadToObject(Component game, ref SurfaceEffectorData data) { var obj = game.GetComponent <SurfaceEffector2D>(); if (obj == null) { return; } obj.useColliderMask = data.useColliderMask; obj.colliderMask = data.colliderMask; obj.speed = data.speed; obj.speedVariation = data.speedVariation; obj.forceScale = data.forceScale; obj.useContactForce = data.useContactForce; obj.useFriction = data.useFriction; obj.useBounce = data.useBounce; }
public unsafe override void Load(FakeStruct fake) { data = *(SurfaceEffectorData *)fake.ip; }