修改鱼线相关逻辑

This commit is contained in:
2026-04-12 21:17:29 +08:00
parent 8fbb21a66c
commit b83dfd47b1
15 changed files with 1446 additions and 1389 deletions

View File

@@ -1,29 +1,29 @@
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(Rope))]
public class RopeFishLineEditor : Editor
{
private Rope _target;
void OnEnable()
{
_target = target as Rope;
// lookAtPoint = serializedObject.FindProperty("lookAtPoint");
}
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
if (GUILayout.Button("打印总长度"))
{
_target.DebugLength();
// Debug.Log($"总长度={_target.GetCurrentLength()} 目标长度={_target.GetTargetLength()} smoot={_target.GetLengthSmoothVel()} relLen={_target.GetLengthByPoints()} PolylineLength={_target.GetPhysicsPolylineLength()}");
}
// serializedObject.Update();
// EditorGUILayout.PropertyField(lookAtPoint);
// serializedObject.ApplyModifiedProperties();
}
}
// using UnityEditor;
// using UnityEngine;
//
// [CustomEditor(typeof(Rope))]
// public class RopeFishLineEditor : Editor
// {
// private Rope _target;
//
// void OnEnable()
// {
// _target = target as Rope;
// // lookAtPoint = serializedObject.FindProperty("lookAtPoint");
// }
//
// public override void OnInspectorGUI()
// {
// base.OnInspectorGUI();
//
//
// if (GUILayout.Button("打印总长度"))
// {
// _target.DebugLength();
// // Debug.Log($"总长度={_target.GetCurrentLength()} 目标长度={_target.GetTargetLength()} smoot={_target.GetLengthSmoothVel()} relLen={_target.GetLengthByPoints()} PolylineLength={_target.GetPhysicsPolylineLength()}");
// }
// // serializedObject.Update();
// // EditorGUILayout.PropertyField(lookAtPoint);
// // serializedObject.ApplyModifiedProperties();
// }
// }