fix: resolve target GameObjects through ObjectsHelper everywhere; add include_stack_trace to get_console_logs#30
Open
dehuaichendragonplus wants to merge 1 commit into
Conversation
… include_stack_trace to get_console_logs Rebased onto v0.5.0 (post FunplayAI#28/FunplayAI#29 merge).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What changed
GameObject.Findcall, which cannot find inactive objects and has no way to disambiguate duplicate names (assign_animator,assign_material, camera tools,create_prefab/unpack_prefab,get_object_memory,capture_multiview'starget_name,select_object/focus_on_object,get_hierarchy'sroot_name, and UI-creation tools'parent_name). They now resolve through the sharedObjectsHelper.FindTarget(name, hierarchy path, or instance ID; inactive objects and additively-loaded scenes included).HierarchyFunctionsand aResources.FindObjectsOfTypeAllfallback loop inUIFunctions.FindParent.get_console_logsgained aninclude_stack_traceoption: appends each entry's stack trace (indented, own 2000-character truncation cap independent of the message's 300-character cap). Off by default.ScreenshotFunctions.cs/UIFunctions.cschanges here are limited to the target-resolution call sites and leave the path-traversal hardening from feat: save_to_file on screenshot tools, capture_editor_window, and raycast_at_point UI diagnostics #28 untouched.Checklist
Funplay > MCP Serveropens and starts correctly (verified indirectly: all MCP tool calls below went through a live running server).idea/or.DS_StoreCHANGELOG.mdwhen the change affects usersManual verification performed
select_objectresolved it by name -- would have failed with the oldGameObject.Find.create_buttonwithparent_nameset to that inactive GameObject produced the expected hierarchy path (get_game_object_infoconfirmedParent/Button).Debug.LogErrorand confirmedget_console_logs(include_stack_trace=true)returns the indented stack trace under the message.