File tree Expand file tree Collapse file tree 4 files changed +7
-25
lines changed
Filter options
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
19
19
20
20
private const string EnvUnityPort = "UNITY_PORT" ;
21
21
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>
22
25
private const string SettingsPath = "ProjectSettings/McpUnitySettings.json" ;
23
26
24
27
private static McpUnitySettings _instance ;
@@ -83,17 +86,16 @@ public void LoadSettings()
83
86
/// <summary>
84
87
/// Save settings to disk
85
88
/// </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>
86
92
public void SaveSettings ( )
87
93
{
88
94
try
89
95
{
90
96
// Save settings to McpUnitySettings.json
91
97
string json = JsonUtility . ToJson ( this , true ) ;
92
98
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 ) ;
97
99
}
98
100
catch ( Exception ex )
99
101
{
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
383
383
The workaround is to turn off ** Reload Domain** in ** Edit > Project Settings > Editor > "Enter Play Mode Settings"** .
384
384
</details >
385
385
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
-
400
386
## Support & Feedback
401
387
402
388
If 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 {
293
293
* @returns a JSON object with the contents of the McpUnitySettings.json file.
294
294
*/
295
295
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' ) ;
297
297
this . logger . debug ( `Reading McpUnitySettings.json from ${ configPath } ` ) ;
298
298
try {
299
299
const content = await fs . readFile ( configPath , 'utf-8' ) ;
You can’t perform that action at this time.
0 commit comments