File tree Expand file tree Collapse file tree 4 files changed +7
-25
lines changed
Expand file tree Collapse file tree 4 files changed +7
-25
lines changed Original file line number Diff line number Diff 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 {
Original file line number Diff line number Diff line change @@ -383,20 +383,6 @@ This error occurs because the bridge connection is lost when the domain reloads
383383The 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
402388If you have any questions or need support, please open an [ issue] ( https://github.com/CoderGamester/mcp-unity/issues ) on this repository.
Load Diff This file was deleted.
Original file line number Diff line number Diff 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' ) ;
You can’t perform that action at this time.
0 commit comments