Add New Methods #1
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements to the
UnityMCPConnectionmodule, focusing on improving scene and game object information retrieval, and simplifying the periodic update mechanism. The most important changes include adding new detail levels for scene and game object information, new methods for handling scene and game object info requests, and removing the periodic update mechanism.Enhancements to scene and game object information retrieval:
UnityMCPConnection/Editor/MCPDataCollector.cs: Added new enumsSceneInfoDetailandGameObjectInfoDetailto specify detail levels for scene and game object information. Introduced new methodsGetCurrentSceneInfoandGetGameObjectsInfoto retrieve detailed information based on the specified detail levels. [1] [2]Simplification of periodic update mechanism:
UnityMCPConnection/Editor/MCPManager.cs: Removed the periodic update mechanism, including methods and references toSendPeriodicUpdates. Updated connection management methods to reflect this change. [1] [2] [3] [4] [5] [6] [7]New message handling for scene and game object info requests:
UnityMCPConnection/Editor/MCPMessageHandler.cs: Added new message typesgetSceneInfoandgetGameObjectsInfoto handle requests for scene and game object information. Implemented methodsHandleGetSceneInfoAsyncandHandleGetGameObjectsInfoAsyncto process these requests. [1] [2] [3] [4]Removal of outdated ping handling:
UnityMCPConnection/Editor/MCPMessageHandler.cs: Removed theHandlePingAsyncmethod and associated message handling forpingmessages.Cleanup of unused methods:
UnityMCPConnection/Editor/MCPMessageSender.cs: Removed theSendPingResponseAsyncmethod, which is no longer needed after removing the ping handling.