Files
daluandou/.codely.packages/cn.tuanjie.codely.bridge@1.0.85-47f31100/Editor/Bridge/Helpers/PortManager.cs
T
huadexuan 13d0c80335 ```
chore(bridge): 删除桥接包的提交记录和Git属性配置

删除了 .codely-bridge-commit 文件中存储的提交哈希值
移除了 .gitattributes 文件中的行结束符配置规则
```
2026-09-24 21:41:14 +08:00

25 lines
841 B
C#

using System.IO;
using UnityEngine;
namespace UnityTcp.Editor.Helpers
{
// Resolves the handshake file path. Content (unity_port, heartbeat, reason,
// ...) is owned entirely by the native heartbeat writer — see
// NativeUnityTcpBridgeHost.StartOrAttach.
public static class PortManager
{
private const string RegistryFileName = ".com-unity-codely.json";
private static string GetRegistryDirectory()
{
string projectRoot = Directory.GetParent(Application.dataPath)?.FullName ?? Application.dataPath;
string tempDir = Path.Combine(projectRoot, "Temp");
Directory.CreateDirectory(tempDir);
return tempDir;
}
public static string GetRegistryFilePath() =>
Path.Combine(GetRegistryDirectory(), RegistryFileName);
}
}