7 Commits

Author SHA1 Message Date
Shutong Wu f69acf0fb1 Cleanup 2026-04-12 16:41:03 -04:00
Tomicz Engineering LLC deea7d2a56 Replace reflection with version-gated conditional compilation.
Addresses review feedback on the Unity 6.5 GetInstanceID migration:

- UnityObjectIdCompatExtensions: drop the reflective method lookup in
  favor of a simple #if UNITY_6000_5_OR_NEWER / #else split calling
  GetEntityId() or GetInstanceID() directly. Also wrap the class in
  the MCPForUnity.Runtime.Helpers namespace.
- UnityTypeConverters: remove the reflective EntityIdToObject probe and
  call EditorUtility.EntityIdToObject(EntityId) directly under the same
  version gate. Serialize entityID as EntityId.ToULong() rather than
  ToString(), since Unity's docs explicitly warn that the textual form
  is not a stable serialization contract.
- Drop #pragma warning disable 0619 from 22 files that no longer make
  any direct calls to obsolete APIs. The remaining 7 files still need
  it (FindObjectsOfType, InstanceIDToObject fallback) and are left as-is
  — those deprecations are out of scope for this PR.
- Add the MCPForUnity.Runtime.Helpers using to every file that calls
  GetInstanceIDCompat() now that the extension method lives in a
  namespace.
2026-04-11 22:55:45 +02:00
Tomicz Engineering LLC 8a89a03eda Migrate Unity object ID usage for Unity 6.5 compatibility.
Replace direct GetInstanceID calls with a compatibility helper and update serialization to handle EntityId-era identifiers, so the package compiles on Unity 6.5 while preserving behavior on older versions.
2026-04-09 11:59:25 +02:00
Shutong Wu e15a377980 Update through field deployment - bug fix / doc update / UX change 2026-03-31 01:08:27 -04:00
Shutong Wu 0b56f0a8a9 Initial Commit 2026-03-15 16:13:39 -04:00
Shutong Wu 8e122e37ce Plugin eviction, CLI camera/graphics, minor fixes
Handle plugin session evictions and extend CLI/docs; misc Unity tooling fixes.

- Server: PluginRegistry.register now returns (session, evicted_session_id). PluginHub consumes the evicted id to cancel ping tasks, clear pending commands, remove state, and close the old WebSocket to avoid orphaned connections after reconnection races. Tests updated to unpack the returned tuple.
- CLI/docs: Add extensive camera, graphics, packages, and texture command examples and raw command snippets across CLI guides and examples; update command reference tables.
- Unity editor tools: SkyboxOps adds a CustomReflectionTexture accessor to handle Unity API differences (RenderSettings.customReflection vs customReflectionTexture). ManageScript now ignores C# keywords when detecting duplicate methods to prevent false positives; added unit test to cover keyword cases.
- Misc: Small docstring tweaks in services/tools/utils.py and skill docs updated to reference manage_camera screenshots.
2026-03-10 10:37:12 -04:00
Shutong Wu b5b58b97a4 [Feature] Manage_graphics (#890)
* Initial update

* Update with docs and fix

* Update on Skybox

* Bug fix and compatability issue

* Update

* Resolve EntityIdToInstance and InstanceIdToObject conflict

* update to revert the changes

Seems EntityId is implicitly casted to Int so no need to prevent it.
2026-03-08 14:40:32 -04:00