Compare commits
No commits in common. "709404ed1778fea3f76953e0804adaea181b56a9" and "efff67e4420aea91505bc59da921571ed19280b0" have entirely different histories.
709404ed17
...
efff67e442
|
|
@ -680,8 +680,6 @@ GameObject:
|
||||||
- component: {fileID: 140014613}
|
- component: {fileID: 140014613}
|
||||||
- component: {fileID: 140014612}
|
- component: {fileID: 140014612}
|
||||||
- component: {fileID: 140014611}
|
- component: {fileID: 140014611}
|
||||||
- component: {fileID: 140014614}
|
|
||||||
- component: {fileID: 140014615}
|
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: Manager
|
m_Name: Manager
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -745,11 +743,6 @@ MonoBehaviour:
|
||||||
maxStackCount: 2
|
maxStackCount: 2
|
||||||
maxStackWarningColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
maxStackWarningColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
||||||
selfConnectionWarningColor: {r: 1, g: 0, b: 1, a: 1}
|
selfConnectionWarningColor: {r: 1, g: 0, b: 1, a: 1}
|
||||||
useCylinderWire: 1
|
|
||||||
cylinderWireMaterial: {fileID: 2100000, guid: 5d584feac28e6794b9baef26ba2e2840, type: 2}
|
|
||||||
cylinderWireDiameter: 0.002
|
|
||||||
cylinderSegments: 4
|
|
||||||
useLineRenderer: 0
|
|
||||||
--- !u!4 &140014613
|
--- !u!4 &140014613
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -765,65 +758,6 @@ Transform:
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_RootOrder: 12
|
m_RootOrder: 12
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &140014614
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 140014610}
|
|
||||||
m_Enabled: 0
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: e143a11ee4571024bafae2796f676625, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
wireMaterial: {fileID: 2100000, guid: 0c0f05601b68b0d47aa19ab02889caec, type: 2}
|
|
||||||
wireColor: {r: 0, g: 1, b: 0.11764706, a: 1}
|
|
||||||
wireWidth: 0.001
|
|
||||||
enableSnapping: 1
|
|
||||||
snapDistance: 1
|
|
||||||
snapLayers:
|
|
||||||
serializedVersion: 2
|
|
||||||
m_Bits: 64
|
|
||||||
snapToColliderCenter: 1
|
|
||||||
snapToTransformCenter: 0
|
|
||||||
snapHighlightColor: {r: 0, g: 1, b: 1, a: 1}
|
|
||||||
enableHighlight: 1
|
|
||||||
clickHighlightColor: {r: 0, g: 1, b: 0, a: 1}
|
|
||||||
highlightDuration: 1
|
|
||||||
requireColliderForConnection: 1
|
|
||||||
addColliderToWires: 0
|
|
||||||
currentState: 0
|
|
||||||
snapTargetOriginalColor: {r: 0, g: 0, b: 1, a: 1}
|
|
||||||
LineModel: {fileID: 1303211141}
|
|
||||||
connectionPointPrefab: {fileID: 1303211141}
|
|
||||||
connectionPointScale: 0.005
|
|
||||||
connectionPointMaterial: {fileID: 0}
|
|
||||||
snapPreviewPrefab: {fileID: 1303211141}
|
|
||||||
deleteKey: 324
|
|
||||||
deleteDetectionRadius: 0.5
|
|
||||||
verticalOffset: 0.005
|
|
||||||
enableStacking: 1
|
|
||||||
maxStackCount: 2
|
|
||||||
maxStackWarningColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
|
|
||||||
selfConnectionWarningColor: {r: 1, g: 0, b: 1, a: 1}
|
|
||||||
--- !u!114 &140014615
|
|
||||||
MonoBehaviour:
|
|
||||||
m_ObjectHideFlags: 0
|
|
||||||
m_CorrespondingSourceObject: {fileID: 0}
|
|
||||||
m_PrefabInstance: {fileID: 0}
|
|
||||||
m_PrefabAsset: {fileID: 0}
|
|
||||||
m_GameObject: {fileID: 140014610}
|
|
||||||
m_Enabled: 1
|
|
||||||
m_EditorHideFlags: 0
|
|
||||||
m_Script: {fileID: 11500000, guid: 9de98abaf88316a4da82930a8eb6668e, type: 3}
|
|
||||||
m_Name:
|
|
||||||
m_EditorClassIdentifier:
|
|
||||||
enableAutoSave: 1
|
|
||||||
autoSaveInterval: 10
|
|
||||||
saveFileName: WireData.json
|
|
||||||
loadOnStart: 1
|
|
||||||
debugMode: 1
|
|
||||||
--- !u!1 &154209944
|
--- !u!1 &154209944
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
// 添加圆柱体连线数据组件
|
|
||||||
public class CylinderWireData : MonoBehaviour
|
|
||||||
{
|
|
||||||
public GameObject startPoint;
|
|
||||||
public GameObject endPoint;
|
|
||||||
public Vector3 startPos;
|
|
||||||
public Vector3 endPos;
|
|
||||||
public GameObject startInterface;
|
|
||||||
public GameObject endInterface;
|
|
||||||
public float wireDiameter;
|
|
||||||
}
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 362c3147899df0a458cecf9ea9e2451a
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: e143a11ee4571024bafae2796f676625
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,11 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 9de98abaf88316a4da82930a8eb6668e
|
|
||||||
MonoImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
serializedVersion: 2
|
|
||||||
defaultReferences: []
|
|
||||||
executionOrder: 0
|
|
||||||
icon: {instanceID: 0}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
|
|
@ -10,7 +10,6 @@ public class WireConnectionData
|
||||||
public GameObject startConnectionPoint;
|
public GameObject startConnectionPoint;
|
||||||
public GameObject endConnectionPoint;
|
public GameObject endConnectionPoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class WireDrawingSystem : MonoBehaviour
|
public class WireDrawingSystem : MonoBehaviour
|
||||||
{
|
{
|
||||||
public enum DrawingState
|
public enum DrawingState
|
||||||
|
|
@ -118,27 +117,10 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
private Coroutine currentHighlightCoroutine; // 当前高亮协程
|
private Coroutine currentHighlightCoroutine; // 当前高亮协程
|
||||||
private GameObject lastClickedObject; // 最后点击的物体
|
private GameObject lastClickedObject; // 最后点击的物体
|
||||||
|
|
||||||
[Header("圆柱体连线设置")]
|
|
||||||
public bool useCylinderWire = true; // 启用圆柱体连线
|
|
||||||
public Material cylinderWireMaterial;
|
|
||||||
public float cylinderWireDiameter = 0.02f;
|
|
||||||
public int cylinderSegments = 8; // 圆柱体面数,影响性能
|
|
||||||
|
|
||||||
// 移除原来的LineRenderer相关设置,或者保留作为备选
|
|
||||||
[Header("传统连线设置(备选)")]
|
|
||||||
public bool useLineRenderer = false;
|
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
HandleInput();
|
HandleInput();
|
||||||
|
UpdateWirePreview();
|
||||||
if (useCylinderWire)
|
|
||||||
{
|
|
||||||
UpdateCylinderWirePreview();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UpdateWirePreview(); // 原有的LineRenderer更新
|
|
||||||
}
|
|
||||||
|
|
||||||
// 在选择终点状态时检查吸附
|
// 在选择终点状态时检查吸附
|
||||||
if (currentState == DrawingState.SelectingEnd && enableSnapping)
|
if (currentState == DrawingState.SelectingEnd && enableSnapping)
|
||||||
|
|
@ -148,7 +130,9 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
// 不在选择终点状态时,清除吸附点预览
|
||||||
ClearSnapPreview();
|
ClearSnapPreview();
|
||||||
|
// 同时清除吸附高亮
|
||||||
if (currentState != DrawingState.SelectingEnd)
|
if (currentState != DrawingState.SelectingEnd)
|
||||||
{
|
{
|
||||||
ClearAllHighlights();
|
ClearAllHighlights();
|
||||||
|
|
@ -312,7 +296,7 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
Debug.Log($"记录接口 {targetInterface.name} 的原始颜色(堆叠警告): {renderer.material.color}");
|
Debug.Log($"记录接口 {targetInterface.name} 的原始颜色(堆叠警告): {renderer.material.color}");
|
||||||
}
|
}
|
||||||
|
|
||||||
// StartCoroutine(FlashWarningColor(renderer, maxStackWarningColor, targetInterface));
|
// StartCoroutine(FlashWarningColor(renderer, maxStackWarningColor, targetInterface));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
@ -588,7 +572,7 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
{
|
{
|
||||||
CancelDrawing();
|
CancelDrawing();
|
||||||
}
|
}
|
||||||
if (Input.GetMouseButtonDown(2))
|
if (Input.GetMouseButtonDown(1))
|
||||||
{
|
{
|
||||||
HandleDelete();
|
HandleDelete();
|
||||||
}
|
}
|
||||||
|
|
@ -691,7 +675,7 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
// 如果当前吸附目标不在字典中,使用保存的原始颜色
|
// 如果当前吸附目标不在字典中,使用保存的原始颜色
|
||||||
if (!highlightedInterfaces.ContainsKey(snapTarget))
|
if (!highlightedInterfaces.ContainsKey(snapTarget))
|
||||||
{
|
{
|
||||||
// snapTargetRenderer.material.color = snapTargetOriginalColor;
|
// snapTargetRenderer.material.color = snapTargetOriginalColor;
|
||||||
Debug.Log($"恢复吸附目标 {snapTarget?.name} 的原始颜色: {snapTargetOriginalColor}");
|
Debug.Log($"恢复吸附目标 {snapTarget?.name} 的原始颜色: {snapTargetOriginalColor}");
|
||||||
}
|
}
|
||||||
snapTargetRenderer = null;
|
snapTargetRenderer = null;
|
||||||
|
|
@ -1201,181 +1185,14 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
void CreateWirePreview()
|
void CreateWirePreview()
|
||||||
{
|
{
|
||||||
currentWireObject = new GameObject("WirePreview");
|
currentWireObject = new GameObject("WirePreview");
|
||||||
|
currentWire = currentWireObject.AddComponent<LineRenderer>();
|
||||||
|
|
||||||
if (useCylinderWire)
|
ConfigureLineRenderer(currentWire);
|
||||||
{
|
currentWire.positionCount = 2;
|
||||||
CreateCylinderWirePreview();
|
currentWire.SetPosition(0, startPoint);
|
||||||
}
|
currentWire.SetPosition(1, startPoint); // 初始时终点与起点相同
|
||||||
else
|
|
||||||
{
|
|
||||||
// 原有的LineRenderer代码
|
|
||||||
currentWire = currentWireObject.AddComponent<LineRenderer>();
|
|
||||||
ConfigureLineRenderer(currentWire);
|
|
||||||
currentWire.positionCount = 2;
|
|
||||||
currentWire.SetPosition(0, startPoint);
|
|
||||||
currentWire.SetPosition(1, startPoint);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// 创建圆柱体连线预览
|
|
||||||
/// </summary>
|
|
||||||
void CreateCylinderWirePreview()
|
|
||||||
{
|
|
||||||
// 创建初始圆柱体(长度很短)
|
|
||||||
GameObject cylinder = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
|
|
||||||
cylinder.name = "WireCylinder";
|
|
||||||
cylinder.transform.SetParent(currentWireObject.transform);
|
|
||||||
|
|
||||||
// 设置材质
|
|
||||||
if (cylinderWireMaterial != null)
|
|
||||||
{
|
|
||||||
Renderer renderer = cylinder.GetComponent<Renderer>();
|
|
||||||
renderer.material = cylinderWireMaterial;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 初始位置和缩放
|
|
||||||
cylinder.transform.position = startPoint;
|
|
||||||
cylinder.transform.localScale = new Vector3(
|
|
||||||
cylinderWireDiameter,
|
|
||||||
0.001f, // 初始高度很小
|
|
||||||
cylinderWireDiameter
|
|
||||||
);
|
|
||||||
|
|
||||||
// 移除碰撞器,避免干扰
|
|
||||||
Destroy(cylinder.GetComponent<Collider>());
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 更新圆柱体连线预览
|
|
||||||
/// </summary>
|
|
||||||
void UpdateCylinderWirePreview()
|
|
||||||
{
|
|
||||||
if (currentState == DrawingState.SelectingEnd && currentWireObject != null)
|
|
||||||
{
|
|
||||||
Vector3 targetPoint;
|
|
||||||
|
|
||||||
if (snapTarget != null)
|
|
||||||
{
|
|
||||||
targetPoint = GetObjectCenter(snapTarget);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetPoint = GetMouseWorldPosition();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (useCylinderWire)
|
|
||||||
{
|
|
||||||
UpdateCylinderWire(startPoint, targetPoint);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// 原有的LineRenderer更新代码
|
|
||||||
if (currentWire != null)
|
|
||||||
{
|
|
||||||
currentWire.SetPosition(1, targetPoint);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 更新圆柱体连线的位置和形状
|
|
||||||
/// </summary>
|
|
||||||
void UpdateCylinderWire(Vector3 start, Vector3 end)
|
|
||||||
{
|
|
||||||
Transform cylinderTransform = currentWireObject.transform.Find("WireCylinder");
|
|
||||||
if (cylinderTransform == null) return;
|
|
||||||
|
|
||||||
GameObject cylinder = cylinderTransform.gameObject;
|
|
||||||
|
|
||||||
// 计算连线的方向、长度和中点
|
|
||||||
Vector3 direction = end - start;
|
|
||||||
float distance = direction.magnitude;
|
|
||||||
|
|
||||||
if (distance < 0.001f)
|
|
||||||
{
|
|
||||||
// 距离太短,隐藏圆柱体
|
|
||||||
cylinder.transform.localScale = new Vector3(cylinderWireDiameter, 0.001f, cylinderWireDiameter);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Vector3 midPoint = (start + end) / 2f;
|
|
||||||
|
|
||||||
// 设置圆柱体的位置和旋转
|
|
||||||
cylinder.transform.position = midPoint;
|
|
||||||
cylinder.transform.up = direction.normalized; // 圆柱体默认朝向Y轴
|
|
||||||
|
|
||||||
// 设置圆柱体的缩放
|
|
||||||
// 圆柱体原始高度为2,所以实际高度 = scaleY * 2
|
|
||||||
cylinder.transform.localScale = new Vector3(
|
|
||||||
cylinderWireDiameter,
|
|
||||||
distance / 2f, // 因为原始高度为2,所以要除以2
|
|
||||||
cylinderWireDiameter
|
|
||||||
);
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 最终确定圆柱体连线
|
|
||||||
/// </summary>
|
|
||||||
void FinalizeCylinderWire()
|
|
||||||
{
|
|
||||||
if (currentWireObject == null) return;
|
|
||||||
|
|
||||||
Transform cylinderTransform = currentWireObject.transform.Find("WireCylinder");
|
|
||||||
if (cylinderTransform == null) return;
|
|
||||||
|
|
||||||
GameObject cylinder = cylinderTransform.gameObject;
|
|
||||||
|
|
||||||
// 更新最终位置
|
|
||||||
UpdateCylinderWire(startPoint, endPoint);
|
|
||||||
|
|
||||||
// 添加圆柱体连线数据
|
|
||||||
CylinderWireData wireData = currentWireObject.AddComponent<CylinderWireData>();
|
|
||||||
wireData.startPoint = GetConnectionPointObject(true);
|
|
||||||
wireData.endPoint = GetConnectionPointObject(false);
|
|
||||||
wireData.startInterface = startInterfaceObject;
|
|
||||||
wireData.endInterface = endInterfaceObject;
|
|
||||||
wireData.wireDiameter = cylinderWireDiameter;
|
|
||||||
|
|
||||||
// 可选:添加碰撞器
|
|
||||||
if (addColliderToWires)
|
|
||||||
{
|
|
||||||
AddCylinderWireCollider(cylinder);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 添加到连线列表
|
|
||||||
allWires.Add(currentWireObject);
|
|
||||||
|
|
||||||
Debug.Log($"圆柱体连线完成: {currentWireObject.name}");
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 获取连接点对象(用于连线数据)
|
|
||||||
/// </summary>
|
|
||||||
GameObject GetConnectionPointObject(bool isStartPoint)
|
|
||||||
{
|
|
||||||
// 查找最近创建的连接点
|
|
||||||
for (int i = allConnectionPoints.Count - 1; i >= 0; i--)
|
|
||||||
{
|
|
||||||
GameObject point = allConnectionPoints[i];
|
|
||||||
if (point != null && point.transform.parent == null)
|
|
||||||
{
|
|
||||||
if (isStartPoint && point.name.Contains("Start"))
|
|
||||||
return point;
|
|
||||||
else if (!isStartPoint && point.name.Contains("End"))
|
|
||||||
return point;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
/// 为圆柱体连线添加碰撞器
|
|
||||||
/// </summary>
|
|
||||||
void AddCylinderWireCollider(GameObject cylinder)
|
|
||||||
{
|
|
||||||
CapsuleCollider collider = cylinder.AddComponent<CapsuleCollider>();
|
|
||||||
collider.isTrigger = true;
|
|
||||||
|
|
||||||
// 胶囊碰撞器会自动匹配圆柱体的形状
|
|
||||||
// 方向设置为Y轴(圆柱体的默认方向)
|
|
||||||
collider.direction = 1; // 1 = Y轴
|
|
||||||
}
|
|
||||||
void UpdateWirePreview()
|
void UpdateWirePreview()
|
||||||
{
|
{
|
||||||
if (currentState == DrawingState.SelectingEnd && currentWire != null)
|
if (currentState == DrawingState.SelectingEnd && currentWire != null)
|
||||||
|
|
@ -1516,7 +1333,7 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
// 设置高亮颜色
|
// 设置高亮颜色
|
||||||
// snapTargetRenderer.material.color = snapHighlightColor;
|
// snapTargetRenderer.material.color = snapHighlightColor;
|
||||||
Debug.Log($"设置接口 {target.name} 为吸附高亮颜色: {snapHighlightColor}");
|
Debug.Log($"设置接口 {target.name} 为吸附高亮颜色: {snapHighlightColor}");
|
||||||
|
|
||||||
// 更新当前高亮接口
|
// 更新当前高亮接口
|
||||||
|
|
@ -1575,7 +1392,7 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
{
|
{
|
||||||
if (snapTargetRenderer != null && isSnapTargetHighlighted)
|
if (snapTargetRenderer != null && isSnapTargetHighlighted)
|
||||||
{
|
{
|
||||||
// snapTargetRenderer.material.color = snapTargetOriginalColor;
|
// snapTargetRenderer.material.color = snapTargetOriginalColor;
|
||||||
snapTargetRenderer = null;
|
snapTargetRenderer = null;
|
||||||
isSnapTargetHighlighted = false;
|
isSnapTargetHighlighted = false;
|
||||||
}
|
}
|
||||||
|
|
@ -1585,67 +1402,54 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
// 修改 FinalizeWire 方法,添加记录功能
|
// 修改 FinalizeWire 方法,添加记录功能
|
||||||
void FinalizeWire()
|
void FinalizeWire()
|
||||||
{
|
{
|
||||||
if (currentWireObject != null)
|
if (currentWire != null)
|
||||||
{
|
{
|
||||||
currentWireObject.name = $"Wire_{System.DateTime.Now:yyyyMMddHHmmss}";
|
currentWireObject.name = $"Wire_{System.DateTime.Now:yyyyMMddHHmmss}";
|
||||||
|
|
||||||
// 将连接点附加到连线对象
|
// 将连接点附加到连线对象
|
||||||
AttachConnectionPointsToWire(currentWireObject);
|
AttachConnectionPointsToWire(currentWireObject);
|
||||||
|
|
||||||
if (useCylinderWire)
|
// 添加到连线列表
|
||||||
|
allWires.Add(currentWireObject);
|
||||||
|
|
||||||
|
// 可选:添加物理碰撞器
|
||||||
|
if (addColliderToWires)
|
||||||
{
|
{
|
||||||
FinalizeCylinderWire();
|
AddWireCollider(currentWire);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// 保存连线数据
|
||||||
|
WireData data = currentWireObject.AddComponent<WireData>();
|
||||||
|
data.startPoint = startPoint;
|
||||||
|
data.endPoint = endPoint;
|
||||||
|
data.creationTime = System.DateTime.Now;
|
||||||
|
|
||||||
|
// 存储接口引用
|
||||||
|
if (startInterfaceObject != null)
|
||||||
{
|
{
|
||||||
// 原有的LineRenderer最终化代码
|
data.snapStartObject = startInterfaceObject;
|
||||||
FinalizeLineRendererWire();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (endInterfaceObject != null)
|
||||||
|
{
|
||||||
|
data.snapEndObject = endInterfaceObject;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 存储连线连接数据
|
||||||
|
WireConnectionData connectionData = new WireConnectionData
|
||||||
|
{
|
||||||
|
startInterface = startInterfaceObject,
|
||||||
|
endInterface = endInterfaceObject
|
||||||
|
};
|
||||||
|
wireConnectionData[currentWireObject] = connectionData;
|
||||||
|
|
||||||
|
Debug.Log($"连线完成: {currentWireObject.name}, 起点: {startInterfaceObject?.name ?? "无"}, 终点: {endInterfaceObject?.name ?? "无"}");
|
||||||
}
|
}
|
||||||
|
|
||||||
currentWire = null;
|
currentWire = null;
|
||||||
currentWireObject = null;
|
currentWireObject = null;
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// 最终化LineRenderer连线(原有的FinalizeWire内容)
|
|
||||||
/// </summary>
|
|
||||||
void FinalizeLineRendererWire()
|
|
||||||
{
|
|
||||||
// 这里放置原有的FinalizeWire方法中的LineRenderer相关代码
|
|
||||||
FinalizeWire();
|
|
||||||
// 包括添加到连线列表、添加WireData组件等
|
|
||||||
|
|
||||||
allWires.Add(currentWireObject);
|
|
||||||
|
|
||||||
if (addColliderToWires)
|
|
||||||
{
|
|
||||||
AddWireCollider(currentWire);
|
|
||||||
}
|
|
||||||
|
|
||||||
WireData data = currentWireObject.AddComponent<WireData>();
|
|
||||||
data.startPoint = startPoint;
|
|
||||||
data.endPoint = endPoint;
|
|
||||||
data.creationTime = System.DateTime.Now;
|
|
||||||
|
|
||||||
if (startInterfaceObject != null)
|
|
||||||
{
|
|
||||||
data.snapStartObject = startInterfaceObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (endInterfaceObject != null)
|
|
||||||
{
|
|
||||||
data.snapEndObject = endInterfaceObject;
|
|
||||||
}
|
|
||||||
|
|
||||||
WireConnectionData connectionData = new WireConnectionData
|
|
||||||
{
|
|
||||||
startInterface = startInterfaceObject,
|
|
||||||
endInterface = endInterfaceObject
|
|
||||||
};
|
|
||||||
wireConnectionData[currentWireObject] = connectionData;
|
|
||||||
|
|
||||||
Debug.Log($"连线完成: {currentWireObject.name}");
|
|
||||||
}
|
|
||||||
// 修改 CancelDrawing 方法,确保正确清理
|
// 修改 CancelDrawing 方法,确保正确清理
|
||||||
void CancelDrawing()
|
void CancelDrawing()
|
||||||
{
|
{
|
||||||
|
|
@ -1654,8 +1458,13 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
Destroy(currentWireObject);
|
Destroy(currentWireObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 删除未完成的连接点
|
||||||
RemoveUnfinishedConnectionPoints();
|
RemoveUnfinishedConnectionPoints();
|
||||||
|
|
||||||
|
// 清除吸附点预览
|
||||||
ClearSnapPreview();
|
ClearSnapPreview();
|
||||||
|
|
||||||
|
// 清除所有高亮和材质实例
|
||||||
ClearAllHighlights();
|
ClearAllHighlights();
|
||||||
|
|
||||||
// 恢复所有接口的原始材质
|
// 恢复所有接口的原始材质
|
||||||
|
|
@ -1673,6 +1482,7 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
currentWire = null;
|
currentWire = null;
|
||||||
currentWireObject = null;
|
currentWireObject = null;
|
||||||
|
|
||||||
|
// 重置当前接口
|
||||||
currentStartInterface = null;
|
currentStartInterface = null;
|
||||||
currentEndInterface = null;
|
currentEndInterface = null;
|
||||||
startInterfaceObject = null;
|
startInterfaceObject = null;
|
||||||
|
|
@ -1680,10 +1490,11 @@ public class WireDrawingSystem : MonoBehaviour
|
||||||
|
|
||||||
Debug.Log("取消连线操作");
|
Debug.Log("取消连线操作");
|
||||||
}
|
}
|
||||||
/// <summary>
|
|
||||||
/// 更新吸附点预览模型
|
/// <summary>
|
||||||
/// </summary>
|
/// 更新吸附点预览模型
|
||||||
void UpdateSnapPreview()
|
/// </summary>
|
||||||
|
void UpdateSnapPreview()
|
||||||
{
|
{
|
||||||
if (snapPreviewPrefab == null) return;
|
if (snapPreviewPrefab == null) return;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,558 +0,0 @@
|
||||||
{
|
|
||||||
"wires": [
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.2700444459915162,
|
|
||||||
"y": -0.24335770308971406,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.2912330627441407,
|
|
||||||
"y": -0.26317930221557619,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174803",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.014507354237139225,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.2806386947631837,
|
|
||||||
"y": -0.2532685101032257,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.9173758625984192,
|
|
||||||
"w": 0.39802202582359316
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.2912330627441407,
|
|
||||||
"y": -0.26317930221557619,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.3185701370239258,
|
|
||||||
"y": -0.26755011081695559,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174805",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.013842142187058926,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.3049015998840333,
|
|
||||||
"y": -0.26536470651626589,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.760881245136261,
|
|
||||||
"w": 0.6488911509513855
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.3185701370239258,
|
|
||||||
"y": -0.26755011081695559,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.3627458810806275,
|
|
||||||
"y": -0.2951911687850952,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174806",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.02605534717440605,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.3406579494476319,
|
|
||||||
"y": -0.2813706398010254,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.8747655749320984,
|
|
||||||
"w": 0.48454639315605166
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.3627458810806275,
|
|
||||||
"y": -0.2951911687850952,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.378318190574646,
|
|
||||||
"y": -0.2723008692264557,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174806",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.01384253054857254,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.3705320358276368,
|
|
||||||
"y": -0.28374600410461428,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.2942698299884796,
|
|
||||||
"w": 0.9557223916053772
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.378318190574646,
|
|
||||||
"y": -0.2723008692264557,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.406347632408142,
|
|
||||||
"y": -0.2516351342201233,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174808",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.017412081360816957,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.392332911491394,
|
|
||||||
"y": -0.2619680166244507,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.4508708417415619,
|
|
||||||
"w": 0.8925892114639282
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.406347632408142,
|
|
||||||
"y": -0.2516351342201233,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.382118821144104,
|
|
||||||
"y": -0.30075377225875857,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174809",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.027384648099541665,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.394233226776123,
|
|
||||||
"y": -0.2761944532394409,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.9738655090332031,
|
|
||||||
"w": -0.22712557017803193
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.382118821144104,
|
|
||||||
"y": -0.30075377225875857,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.3185701370239258,
|
|
||||||
"y": -0.3232034742832184,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174812",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.033698756247758868,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.3503444194793702,
|
|
||||||
"y": -0.31197863817214968,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": -0.8164232969284058,
|
|
||||||
"w": 0.5774539113044739
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.3185701370239258,
|
|
||||||
"y": -0.3232034742832184,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.250161051750183,
|
|
||||||
"y": -0.3160459101200104,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174813",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.03439125418663025,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.2843656539916993,
|
|
||||||
"y": -0.3196246922016144,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": -0.6693052649497986,
|
|
||||||
"w": 0.7429875135421753
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.250161051750183,
|
|
||||||
"y": -0.3160459101200104,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.250161051750183,
|
|
||||||
"y": -0.2582668662071228,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174814",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.028889521956443788,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.250161051750183,
|
|
||||||
"y": -0.2871564030647278,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0,
|
|
||||||
"w": 1.0
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.250161051750183,
|
|
||||||
"y": -0.2582668662071228,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.3185701370239258,
|
|
||||||
"y": -0.2905614376068115,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174816",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.03782440349459648,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.2843656539916993,
|
|
||||||
"y": -0.27441415190696719,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.8446600437164307,
|
|
||||||
"w": 0.5353030562400818
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.3185701370239258,
|
|
||||||
"y": -0.2905614376068115,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.406347632408142,
|
|
||||||
"y": -0.3217931091785431,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174817",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.046584080904722217,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.3624589443206788,
|
|
||||||
"y": -0.3061772584915161,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.8170735239982605,
|
|
||||||
"w": 0.5765335559844971
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"startInterfaceName": "",
|
|
||||||
"endInterfaceName": "",
|
|
||||||
"startConnectionPointPosition": {
|
|
||||||
"x": -1.406347632408142,
|
|
||||||
"y": -0.3217931091785431,
|
|
||||||
"z": 0.09028154611587525
|
|
||||||
},
|
|
||||||
"endConnectionPointPosition": {
|
|
||||||
"x": -1.3627458810806275,
|
|
||||||
"y": -0.32740670442581179,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"startPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"endPoint": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": 0.0
|
|
||||||
},
|
|
||||||
"wireName": "Wire_20251126174818",
|
|
||||||
"cylinderScale": {
|
|
||||||
"x": 0.0020000000949949028,
|
|
||||||
"y": 0.02198081649839878,
|
|
||||||
"z": 0.0020000000949949028
|
|
||||||
},
|
|
||||||
"cylinderPosition": {
|
|
||||||
"x": -1.3845467567443848,
|
|
||||||
"y": -0.3245999217033386,
|
|
||||||
"z": 0.08528154343366623
|
|
||||||
},
|
|
||||||
"cylinderRotation": {
|
|
||||||
"x": 0.0,
|
|
||||||
"y": 0.0,
|
|
||||||
"z": -0.7508971691131592,
|
|
||||||
"w": 0.6604191660881043
|
|
||||||
},
|
|
||||||
"cylinderRadius": 0.0020000000949949028,
|
|
||||||
"hasStartInterface": false,
|
|
||||||
"hasEndInterface": false,
|
|
||||||
"debugInfo": "从 CylinderWireData 组件获取",
|
|
||||||
"wireType": "CylinderWireData"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"wireCount": 12,
|
|
||||||
"sceneName": "xianchang"
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
fileFormatVersion: 2
|
|
||||||
guid: 01d5283402a8084409b013a047a9949b
|
|
||||||
DefaultImporter:
|
|
||||||
externalObjects: {}
|
|
||||||
userData:
|
|
||||||
assetBundleName:
|
|
||||||
assetBundleVariant:
|
|
||||||
Loading…
Reference in New Issue