Skip to content

Commit 98fe4dd

Browse files
committed
Misc name changes in logs and comments for better consistency
1 parent bdb62c0 commit 98fe4dd

File tree

7 files changed

+18
-18
lines changed

7 files changed

+18
-18
lines changed

UnityMcpBridge/Editor/Helpers/PortManager.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace MCPForUnity.Editor.Helpers
1313
{
1414
/// <summary>
15-
/// Manages dynamic port allocation and persistent storage for Unity MCP Bridge
15+
/// Manages dynamic port allocation and persistent storage for MCP for Unity
1616
/// </summary>
1717
public static class PortManager
1818
{
@@ -131,21 +131,21 @@ public static bool IsPortAvailable(int port)
131131
}
132132

133133
/// <summary>
134-
/// Check if a port is currently being used by Unity MCP Bridge
134+
/// Check if a port is currently being used by MCP for Unity
135135
/// This helps avoid unnecessary port changes when Unity itself is using the port
136136
/// </summary>
137137
/// <param name="port">Port to check</param>
138-
/// <returns>True if port appears to be used by Unity MCP</returns>
138+
/// <returns>True if port appears to be used by MCP for Unity</returns>
139139
public static bool IsPortUsedByUnityMcp(int port)
140140
{
141141
try
142142
{
143-
// Try to make a quick connection to see if it's a Unity MCP server
143+
// Try to make a quick connection to see if it's an MCP for Unity server
144144
using var client = new TcpClient();
145145
var connectTask = client.ConnectAsync(IPAddress.Loopback, port);
146146
if (connectTask.Wait(100)) // 100ms timeout
147147
{
148-
// If connection succeeded, it's likely the Unity MCP server
148+
// If connection succeeded, it's likely the MCP for Unity server
149149
return client.Connected;
150150
}
151151
return false;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""
2-
Unity MCP Server package.
2+
MCP for Unity Server package.
33
"""

UnityMcpBridge/UnityMcpServer~/src/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Configuration settings for the Unity MCP Server.
2+
Configuration settings for the MCP for Unity Server.
33
This file contains all configurable parameters for the server.
44
"""
55

UnityMcpBridge/UnityMcpServer~/src/port_discovery.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"""
2-
Port discovery utility for Unity MCP Server.
2+
Port discovery utility for MCP for Unity Server.
33
44
What changed and why:
55
- Unity now writes a per-project port file named like
66
`~/.unity-mcp/unity-mcp-port-<hash>.json` to avoid projects overwriting
77
each other's saved port. The legacy file `unity-mcp-port.json` may still
88
exist.
99
- This module now scans for both patterns, prefers the most recently
10-
modified file, and verifies that the port is actually a Unity MCP listener
10+
modified file, and verifies that the port is actually a MCP for Unity listener
1111
(quick socket connect + ping) before choosing it.
1212
"""
1313

@@ -55,7 +55,7 @@ def list_candidate_files() -> List[Path]:
5555

5656
@staticmethod
5757
def _try_probe_unity_mcp(port: int) -> bool:
58-
"""Quickly check if a Unity MCP listener is on this port.
58+
"""Quickly check if a MCP for Unity listener is on this port.
5959
Tries a short TCP connect, sends 'ping', expects a JSON 'pong'.
6060
"""
6161
try:

UnityMcpBridge/UnityMcpServer~/src/server.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
async def server_lifespan(server: FastMCP) -> AsyncIterator[Dict[str, Any]]:
2222
"""Handle server startup and shutdown."""
2323
global _unity_connection
24-
logger.info("Unity MCP Server starting up")
24+
logger.info("MCP for Unity Server starting up")
2525
try:
2626
_unity_connection = get_unity_connection()
2727
logger.info("Connected to Unity on startup")
@@ -36,7 +36,7 @@ async def server_lifespan(server: FastMCP) -> AsyncIterator[Dict[str, Any]]:
3636
if _unity_connection:
3737
_unity_connection.disconnect()
3838
_unity_connection = None
39-
logger.info("Unity MCP Server shut down")
39+
logger.info("MCP for Unity Server shut down")
4040

4141
# Initialize MCP server
4242
mcp = FastMCP(
@@ -52,9 +52,9 @@ async def server_lifespan(server: FastMCP) -> AsyncIterator[Dict[str, Any]]:
5252

5353
@mcp.prompt()
5454
def asset_creation_strategy() -> str:
55-
"""Guide for discovering and using Unity MCP tools effectively."""
55+
"""Guide for discovering and using MCP for Unity tools effectively."""
5656
return (
57-
"Available Unity MCP Server Tools:\\n\\n"
57+
"Available MCP for Unity Server Tools:\\n\\n"
5858
"- `manage_editor`: Controls editor state and queries info.\\n"
5959
"- `execute_menu_item`: Executes Unity Editor menu items by path.\\n"
6060
"- `read_console`: Reads or clears Unity console messages, with filtering options.\\n"

UnityMcpBridge/UnityMcpServer~/src/tools/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
def register_all_tools(mcp):
1111
"""Register all refactored tools with the MCP server."""
12-
print("Registering Unity MCP Server refactored tools...")
12+
print("Registering MCP for Unity Server refactored tools...")
1313
register_manage_script_tools(mcp)
1414
register_manage_scene_tools(mcp)
1515
register_manage_editor_tools(mcp)
@@ -18,4 +18,4 @@ def register_all_tools(mcp):
1818
register_manage_shader_tools(mcp)
1919
register_read_console_tools(mcp)
2020
register_execute_menu_item_tools(mcp)
21-
print("Unity MCP Server tool registration complete.")
21+
print("MCP for Unity Server tool registration complete.")

mcp_source.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python3
22
"""
3-
Generic helper to switch the Unity MCP package source in a Unity project's
3+
Generic helper to switch the MCP for Unity package source in a Unity project's
44
Packages/manifest.json. This is useful for switching between upstream and local repos while working on the MCP.
55
66
Usage:
@@ -109,7 +109,7 @@ def build_options(repo_root: pathlib.Path, branch: str, origin_https: str):
109109

110110

111111
def parse_args() -> argparse.Namespace:
112-
p = argparse.ArgumentParser(description="Switch Unity MCP package source")
112+
p = argparse.ArgumentParser(description="Switch MCP for Unity package source")
113113
p.add_argument("--manifest", help="Path to Packages/manifest.json")
114114
p.add_argument("--repo", help="Path to unity-mcp repo root (for local file option)")
115115
p.add_argument("--choice", choices=["1", "2", "3"], help="Pick option non-interactively")

0 commit comments

Comments
 (0)