GetGameObjectResource: Add a tool call, and some workarounds #87
+321
−15
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.
get_gameobjectas a resource in Cursor fails. Instead, we need a tool, which can be invoked with URI template parameters.gameObjectthat relies on certain native C++ libraries (A* Pathfinding, FMOD) will hard crash Unity. This change looks ugly but does makeget_gameobjectwork for codebases using these common Unity dependencies.get_gameobjectwill stack overflow Unity for any self-referential serialization chain, which is also surprisingly common. So this adds depth limits toSerializeValue.In my testing this took
get_gameobjectfrom "only works on the simplest objects" to "can handle everything I throw at it," but, every repo is different: ymmv.