Dotween里面dopath通过代码调用时比较麻烦,像路径是否封闭,路径是否贝塞尔平滑这些设置是dopath()方法后面是没有直接写拓展的,需要拿到path的返回值一条一条去设置。
private void SetPathOprion(TweenerCore<Vector3, DG.Tweening.Plugins.Core.PathCore.Path, PathOptions> _path, AxisConstraint _lockAxis = AxisConstraint.Z,OrientType _orientType= OrientType.ToPath, float _lookAead = 0.1f ,bool _isClosePath = false)
{
_path.plugOptions.isClosedPath = _isClosePath;
_path.plugOptions.orientType = _orientType;
_path.plugOptions.lookAhead = _lookAead;
_path.plugOptions.lockRotationAxis = _lockAxis;
}