chore(bridge): 删除桥接包的提交记录和Git属性配置 删除了 .codely-bridge-commit 文件中存储的提交哈希值 移除了 .gitattributes 文件中的行结束符配置规则 ```
25 lines
841 B
C#
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);
|
|
}
|
|
}
|