public static void SetSpringSettings(SpringJoint spring, SpringSettings settings) { spring.spring = settings.power; spring.damper = settings.damper; spring.tolerance = settings.tolerance; spring.anchor = settings.anchor; spring.autoConfigureConnectedAnchor = settings.autoAnchor; spring.connectedAnchor = settings.connectedAnchor; }
public static SpringSettings GetSpringSettings(SpringJoint spring) { SpringSettings settings = new SpringSettings(); settings.power = spring.spring; settings.damper = spring.damper; settings.tolerance = spring.tolerance; settings.anchor = spring.anchor; settings.connectedAnchor = spring.connectedAnchor; settings.autoAnchor = spring.autoConfigureConnectedAnchor; return(settings); }