unityzgy/Assets/Scripts/ThisProjectTool/ProcessNode/UseNode.cs
ayuan9957 bf12e02276 feat: 多语言本地化系统 - 支持中/英/法/俄实时切换
- LocalizationManager: 新增翻译表(SetFormatted/SetDuration/LocalizeOperateMsg)
- LoginPanel: InputField placeholder本地化、字体颜色保持
- HistoryPanel: 用时数据本地化、placeholder本地化
- RecordDetailPanel: 操作详情消息本地化(LanguageChanged重建)
- AppraiseWindowBase: 评价等级本地化、操作消息重建
- EditorAppraiser: 所有评估消息改用InjectOperateMsgLocalized
- StudentOperateRecorder: 新增InjectOperateMsgLocalized方法
- LocalizationLanguageTestBar: 单例模式、ScreenSpaceOverlay筛选
- 字体切换时保留颜色和verticalOverflow
2026-07-16 10:05:59 +08:00

51 lines
1.6 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XFramework;
using XNode;
public class UseNode : MonoBehaviour
{
public string processName;
//拆卸流程
NodeGraph procress;
Dictionary<string, List<string>> keyValues = new Dictionary<string, List<string>>();
// Start is called before the first frame update
void Start()
{
procress = Resources.Load<NodeGraph>("NodeGraph/" + processName);
for (int i = 0; i < procress.nodes.Count; i++)
{
foreach (NodePort item in procress.nodes[i].Outputs)
{
if (item.IsConnected)
{
string nodeName = (string)item.node.GetValue(null);
if (keyValues.ContainsKey(nodeName))
{
Debug.LogError($"存在重复的步骤名称{nodeName},跳过重复节点");
continue;
}
keyValues.Add(nodeName, new List<string>());
List<NodePort> Connections = item.GetConnections();//获取当前节点 后续的所有节点
for (int j = 0; j < Connections.Count; j++)
{
keyValues[nodeName].Add((string)Connections[j].node.GetValue(null));
}
}
}
}
foreach (var item in keyValues)
{
for (int i = 0; i < item.Value.Count; i++)
{
Debug.Log($"{item.Key}___{item.Value[i]}");
}
}
}
}