Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ad4b08a

Browse filesBrowse files
committed
Update path to read from existing settings file.
1 parent 876acb9 commit ad4b08a
Copy full SHA for ad4b08a

File tree

Expand file treeCollapse file tree

4 files changed

+7
-25
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+7
-25
lines changed

‎Editor/UnityBridge/McpUnitySettings.cs

Copy file name to clipboardExpand all lines: Editor/UnityBridge/McpUnitySettings.cs
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public class McpUnitySettings
1919

2020
private const string EnvUnityPort = "UNITY_PORT";
2121
private const string EnvUnityRequestTimeout = "UNITY_REQUEST_TIMEOUT";
22+
/// <remarks>
23+
/// This file path is also read by the MCP server. Changes here will require updates to it. See mcpUnity.ts
24+
/// </remarks>
2225
private const string SettingsPath = "ProjectSettings/McpUnitySettings.json";
2326

2427
private static McpUnitySettings _instance;
@@ -83,17 +86,16 @@ public void LoadSettings()
8386
/// <summary>
8487
/// Save settings to disk
8588
/// </summary>
89+
/// <remarks>
90+
/// WARNING: This file is also read by the MCP server. Changes here will require updates to it. See mcpUnity.ts
91+
/// </remarks>
8692
public void SaveSettings()
8793
{
8894
try
8995
{
9096
// Save settings to McpUnitySettings.json
9197
string json = JsonUtility.ToJson(this, true);
9298
File.WriteAllText(SettingsPath, json);
93-
94-
// Now save these same settings to the server to read on start-up.
95-
string propertiesPath = GetServerPath() + "/build/McpUnitySettings.json";
96-
File.WriteAllText(propertiesPath, json);
9799
}
98100
catch (Exception ex)
99101
{

‎README.md

Copy file name to clipboardExpand all lines: README.md
-14Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -383,20 +383,6 @@ This error occurs because the bridge connection is lost when the domain reloads
383383
The workaround is to turn off **Reload Domain** in **Edit > Project Settings > Editor > "Enter Play Mode Settings"**.
384384
</details>
385385

386-
## Node Server
387-
These steps can be useful if you want to build and run the server independently of the Unity plugin.
388-
### Requirements
389-
As well as `node`, you will need `tsc`.
390-
### Steps
391-
1. cd into the `Server~/` directory.
392-
2. run `npm install` to install the project.
393-
3. run `npm run build` to build the project.
394-
4. run `node build/index.js` to run the server! 🚀
395-
396-
### Troubleshooting 🔨
397-
#### Logging
398-
Logging is enabled when the environment variable `LOGGING` is set to true. E.g. `export LOGGING=true`.
399-
400386
## Support & Feedback
401387

402388
If you have any questions or need support, please open an [issue](https://github.com/CoderGamester/mcp-unity/issues) on this repository.

‎Server~/build/McpUnitySettings.json

Copy file name to clipboardExpand all lines: Server~/build/McpUnitySettings.json
-6Lines changed: 0 additions & 6 deletions
This file was deleted.

‎Server~/src/unity/mcpUnity.ts

Copy file name to clipboardExpand all lines: Server~/src/unity/mcpUnity.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export class McpUnity {
293293
* @returns a JSON object with the contents of the McpUnitySettings.json file.
294294
*/
295295
private async readConfigFileAsJson(): Promise<any> {
296-
const configPath = path.resolve(process.cwd(), 'build/McpUnitySettings.json');
296+
const configPath = path.resolve(process.cwd(), '../ProjectSettings/McpUnitySettings.json');
297297
this.logger.debug(`Reading McpUnitySettings.json from ${configPath}`);
298298
try {
299299
const content = await fs.readFile(configPath, 'utf-8');

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.