diff --git a/.github/workflows/gua-tests.yml b/.github/workflows/gua-tests.yml index 1ca0173..0d26aa4 100644 --- a/.github/workflows/gua-tests.yml +++ b/.github/workflows/gua-tests.yml @@ -28,7 +28,7 @@ jobs: artifact-key: unity-sample platform: LinuxX64 unity-version: auto - gua-tag: gua-v1.0.4 + gua-tag: gua-v1.0.7 artifact-path: artifacts/gua secrets: UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }} diff --git a/Assets/Scripts/GuaUiLab.cs b/Assets/Scripts/GuaUiLab.cs index 29e69db..9255771 100644 --- a/Assets/Scripts/GuaUiLab.cs +++ b/Assets/Scripts/GuaUiLab.cs @@ -18,6 +18,7 @@ private static void Build() if (Object.FindFirstObjectByType() != null) return; + Debug.developerConsoleEnabled = false; Application.runInBackground = true; Application.targetFrameRate = 60; _font = Resources.GetBuiltinResource("LegacyRuntime.ttf"); diff --git a/Packages/com.link1345.gua/Documentation~/index.md b/Packages/com.link1345.gua/Documentation~/index.md index 88cbcdc..8349a3c 100644 --- a/Packages/com.link1345.gua/Documentation~/index.md +++ b/Packages/com.link1345.gua/Documentation~/index.md @@ -5,7 +5,75 @@ players, reflects UI Toolkit, uGUI, and TextMeshPro runtime controls, and listen `GUA_BRIDGE_PORT` (8765 by default). Add `GuaId` only where a stable explicit id is required; semantic registration is otherwise automatic. -Supported in the initial release: Windows x64, Unity 6000.5 or newer, and Mono. -The package contains precompiled managed assemblies and Windows Editor/Player -native libraries. IL2CPP, other operating systems, IMGUI, and EditorWindow UI -automation are outside the supported range. +The stable support range is Windows x64, Unity 6000.5 or newer, and Mono. The +package contains precompiled managed assemblies and Windows Editor/Player native +libraries. Other IL2CPP targets, other operating systems, IMGUI, and EditorWindow +UI automation remain outside that stable range; the WebGL path below is +experimental. + +## Unity WebGL and browser-native WebMCP (experimental) + +WebGL builds install a tab-local `__guaUnityWebPort` from +`Runtime/Plugins/WebGL/GuaWebMcp.jslib`. A surrounding page passes it to +`gua-webmcp` with `createUnityWebGlBridge()` and `registerGuaWebMcp()`. Calls +remain in the page. Action promises resolve from request-correlated host +completion after Unity applies the action, not when it is enqueued. +UI reads and action enqueueing cross Player-only runtime entry points, so a +local Debug Inspector does not make private nodes available to browser tools. +The same bridge exposes the host-filtered World Object Tree through the +read-only `get_world_object_tree`, `find_world_objects`, and +`wait_for_world_object` tools. Shared browser-safe world contracts are provided +by `gua-world-tools`; WebMCP callers cannot elevate the runtime observation +profile or invoke actions on world objects. +When `GuaGameInputMap` initializes the input pump, the same page bridge exposes +only the matching Semantic Game Action and Raw Input capabilities. Calls wait +for correlated host completion and use a page-owned session that is released on +abort, timeout, bridge uninstall, or runtime destruction. + +The WebGL build must include the Gua C ABI runtime as a WebAssembly native plugin; +the managed adapter remains a P/Invoke wrapper and does not implement another UI +model. The initial Unity bridge does not advertise screenshot support. + +## Semantic game actions and raw input + +Add `GuaGameInputMap` to one scene object and register only the actions intended +for automation. Game code reads semantic values with +`GuaUnityRuntime.GetGameInputValue` or subscribes to `GameInputChanged`. +Enabling **Raw Input** creates virtual keyboard, mouse, and gamepad devices with +Unity Input System 1.20.0. The adapter queues host-frame state events and +neutralizes/removes the devices when it stops. Raw capabilities are omitted +when Input System support or the opt-in map setting is unavailable. +`AllowPlayerAgentSemanticInput` and `AllowPlayerAgentRawInput` are independent, +default-off permissions for WebMCP/Public Agent callers. `EnableRawInput` alone +only initializes the local Debug path and never grants browser input access. +Physical keyboard tools accept the cross-adapter W3C code subset enumerated by +`commands.schema.json`, including left/right modifiers and common numpad operators. +When scenes change, the persistent runtime neutralizes the previous map and +publishes the `GuaGameInputMap` found in the new scene before accepting more +input. + +## World objects + +Add `GuaWorldObject` only to scene objects that are safe to observe. Assign a +stable `Id`, semantic `Kind`, 2D/3D space, player visibility, exposure, tags, +and primitive state explicitly: + +```csharp +var door = gameObject.AddComponent(); +door.Id = "door-a"; +door.Kind = "door"; +door.Space = Gua.Core.GuaWorldSpace.World2D; +door.VisibleToPlayer = true; +door.SetState("locked", true); +``` + +The adapter publishes global transform positions each frame and links the +nearest opted-in ancestor. It does not expose ordinary GameObjects or UI objects +automatically. Do not place secrets in labels, tags, or state. + +Add `GuaAgentPolicyComponent` to a uGUI or `GuaWorldObject` GameObject to mark it +private, transform Player-visible fields, or override allowed UI actions. For UI +Toolkit and custom adapters, call `GuaUnityAdapterRegistry.SetAgentPolicy` with +the reflected target object. These policies affect Player profile only. +Enable `Override Exposure` only when the component should replace the exposure +already declared by `GuaWorldObject`; field-only policies inherit that setting. diff --git a/Packages/com.link1345.gua/Editor.meta b/Packages/com.link1345.gua/Editor.meta deleted file mode 100644 index 8c93b81..0000000 --- a/Packages/com.link1345.gua/Editor.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 3fad9f1496ddd58429d96b05cbd26aed -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.link1345.gua/Editor/Gua.Unity.Editor.dll b/Packages/com.link1345.gua/Editor/Gua.Unity.Editor.dll index 6751793..5c49e08 100644 Binary files a/Packages/com.link1345.gua/Editor/Gua.Unity.Editor.dll and b/Packages/com.link1345.gua/Editor/Gua.Unity.Editor.dll differ diff --git a/Packages/com.link1345.gua/Runtime.meta b/Packages/com.link1345.gua/Runtime.meta deleted file mode 100644 index a0d1fd8..0000000 --- a/Packages/com.link1345.gua/Runtime.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0df2d81beed04fa4fbc2bb657cbec0d6 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins.meta b/Packages/com.link1345.gua/Runtime/Plugins.meta deleted file mode 100644 index 2b34850..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: fdc0f8bc2478ed74ab3aec72b0c7c449 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua.so b/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua.so new file mode 100644 index 0000000..81ba8bf Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua.so differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua.so.meta b/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua.so.meta new file mode 100644 index 0000000..4fc316e --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua.so.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: 86df316b33ee4fa8a957db978bda3c3e +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86_64 + DefaultValueInitialized: true + OS: Linux + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: x86_64 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua_runtime.so b/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua_runtime.so new file mode 100644 index 0000000..8684f99 Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua_runtime.so differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua_runtime.so.meta b/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua_runtime.so.meta new file mode 100644 index 0000000..03e9d56 --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/Linux/x86_64/libgua_runtime.so.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: b2a307254d41466ab48bbfc3933a1bcc +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: x86_64 + DefaultValueInitialized: true + OS: Linux + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: x86_64 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed.meta deleted file mode 100644 index cd57df9..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f188e1f4f8858e24997fcbd339515008 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Core.dll b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Core.dll index 7144bb9..0969d9b 100644 Binary files a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Core.dll and b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Core.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Core.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Core.dll.meta index 77b3a36..50c6f3c 100644 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Core.dll.meta +++ b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Core.dll.meta @@ -1,2 +1,47 @@ fileFormatVersion: 2 -guid: 9cbe98b036506524f9a07496f3826957 \ No newline at end of file +guid: 41f339bbfa9649343b0f20337fe54bce +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Runtime.dll b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Runtime.dll index 678883b..c13070d 100644 Binary files a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Runtime.dll and b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Runtime.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Runtime.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Runtime.dll.meta index 4078a0e..fefe717 100644 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Runtime.dll.meta +++ b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Runtime.dll.meta @@ -1,2 +1,47 @@ fileFormatVersion: 2 -guid: 33e0679c75a996c45ad136bfd7d679d4 \ No newline at end of file +guid: a2b9f84fb8b849cf9e920a66499c49d1 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: AnyOS + - first: + Standalone: Linux64 + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + - first: + Standalone: Win64 + second: + enabled: 1 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.Bootstrap.dll b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.Bootstrap.dll index 7226422..f67ac19 100644 Binary files a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.Bootstrap.dll and b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.Bootstrap.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.Bootstrap.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.Bootstrap.dll.meta index 3a231f3..7266e9f 100644 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.Bootstrap.dll.meta +++ b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.Bootstrap.dll.meta @@ -17,8 +17,8 @@ PluginImporter: enabled: 0 settings: Exclude Editor: 0 - Exclude Linux64: 1 - Exclude OSXUniversal: 1 + Exclude Linux64: 0 + Exclude OSXUniversal: 0 Exclude Win: 1 Exclude Win64: 0 - first: @@ -37,15 +37,15 @@ PluginImporter: - first: Standalone: Linux64 second: - enabled: 0 + enabled: 1 settings: - CPU: None + CPU: AnyCPU - first: Standalone: OSXUniversal second: - enabled: 0 + enabled: 1 settings: - CPU: None + CPU: AnyCPU - first: Standalone: Win second: @@ -58,6 +58,12 @@ PluginImporter: enabled: 1 settings: CPU: AnyCPU + - first: + WebGL: WebGL + second: + enabled: 1 + settings: + CPU: AnyCPU userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.TMP.dll b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.TMP.dll index 7db9c0b..f296ee4 100644 Binary files a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.TMP.dll and b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.TMP.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.TMP.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.TMP.dll.meta index d073032..30ba1ef 100644 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.TMP.dll.meta +++ b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.TMP.dll.meta @@ -17,8 +17,8 @@ PluginImporter: enabled: 0 settings: Exclude Editor: 0 - Exclude Linux64: 1 - Exclude OSXUniversal: 1 + Exclude Linux64: 0 + Exclude OSXUniversal: 0 Exclude Win: 1 Exclude Win64: 0 - first: @@ -37,15 +37,15 @@ PluginImporter: - first: Standalone: Linux64 second: - enabled: 0 + enabled: 1 settings: - CPU: None + CPU: AnyCPU - first: Standalone: OSXUniversal second: - enabled: 0 + enabled: 1 settings: - CPU: None + CPU: AnyCPU - first: Standalone: Win second: @@ -58,6 +58,12 @@ PluginImporter: enabled: 1 settings: CPU: AnyCPU + - first: + WebGL: WebGL + second: + enabled: 1 + settings: + CPU: AnyCPU userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.dll b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.dll index c22b5df..8666188 100644 Binary files a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.dll and b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.dll.meta index a23e039..66615ad 100644 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.dll.meta +++ b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Gua.Unity.dll.meta @@ -17,8 +17,8 @@ PluginImporter: enabled: 0 settings: Exclude Editor: 0 - Exclude Linux64: 1 - Exclude OSXUniversal: 1 + Exclude Linux64: 0 + Exclude OSXUniversal: 0 Exclude Win: 1 Exclude Win64: 0 - first: @@ -37,15 +37,15 @@ PluginImporter: - first: Standalone: Linux64 second: - enabled: 0 + enabled: 1 settings: - CPU: None + CPU: AnyCPU - first: Standalone: OSXUniversal second: - enabled: 0 + enabled: 1 settings: - CPU: None + CPU: AnyCPU - first: Standalone: Win second: @@ -58,6 +58,12 @@ PluginImporter: enabled: 1 settings: CPU: AnyCPU + - first: + WebGL: WebGL + second: + enabled: 1 + settings: + CPU: AnyCPU userData: assetBundleName: assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Microsoft.Bcl.AsyncInterfaces.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/Microsoft.Bcl.AsyncInterfaces.dll.meta deleted file mode 100644 index 48fc988..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/Microsoft.Bcl.AsyncInterfaces.dll.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 242a8a0c136bd9c4da9f07d93a5780af \ No newline at end of file diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Buffers.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Buffers.dll.meta deleted file mode 100644 index cacfa53..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Buffers.dll.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 870567dd79b8be043a481aaed61fa491 \ No newline at end of file diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.IO.Pipelines.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.IO.Pipelines.dll.meta deleted file mode 100644 index e21651c..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.IO.Pipelines.dll.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: f0aa49431ebaff54f8f47f213e76af9a \ No newline at end of file diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Memory.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Memory.dll.meta deleted file mode 100644 index 359d0ca..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Memory.dll.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 9e393a261f5385345932fc27d32e9118 \ No newline at end of file diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Runtime.CompilerServices.Unsafe.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Runtime.CompilerServices.Unsafe.dll.meta deleted file mode 100644 index 5307ed5..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Runtime.CompilerServices.Unsafe.dll.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 636c1ee479facc84e9f3f738821ac34c \ No newline at end of file diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Text.Encodings.Web.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Text.Encodings.Web.dll.meta deleted file mode 100644 index 72e2211..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Text.Encodings.Web.dll.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 6c0e5c1fb1760854186628bb9f57a9b5 \ No newline at end of file diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Text.Json.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Text.Json.dll.meta deleted file mode 100644 index 17db2be..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Text.Json.dll.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: a64a367660122514baeb023eba29dc53 \ No newline at end of file diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Threading.Tasks.Extensions.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Threading.Tasks.Extensions.dll.meta deleted file mode 100644 index 865296a..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/Managed/System.Threading.Tasks.Extensions.dll.meta +++ /dev/null @@ -1,2 +0,0 @@ -fileFormatVersion: 2 -guid: 042e6149afa11984abe4778d1dc8ea5a \ No newline at end of file diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/GuaWebMcp.jslib b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/GuaWebMcp.jslib new file mode 100644 index 0000000..ddea00b --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/GuaWebMcp.jslib @@ -0,0 +1,137 @@ +mergeInto(LibraryManager.library, { + GuaUnityWebInstall: function (hostNamePointer, ownerIdPointer, timeoutMs) { + const hostName = UTF8ToString(hostNamePointer); + const ownerId = UTF8ToString(ownerIdPointer); + const previous = globalThis.__guaUnityWebState; + if (previous && typeof previous.uninstall === 'function') { + previous.uninstall('engine_unsupported', 'The Unity WebGL Gua runtime was replaced.'); + } + + const pending = new Map(); + const callTimeoutMs = Number.isFinite(timeoutMs) && timeoutMs >= 0 ? timeoutMs : 5000; + const state = { ownerId, pending, disposed: false, uninstall: null }; + + const cancelHostCall = function (callId) { + try { SendMessage(hostName, 'HandleWebCancellation', String(callId)); } catch (_error) { } + }; + + const takePending = function (callId) { + const entry = pending.get(callId); + if (!entry) return null; + pending.delete(callId); + clearTimeout(entry.timer); + if (entry.signal) entry.signal.removeEventListener('abort', entry.aborted); + return entry; + }; + + const rejectPending = function (code, message) { + for (const callId of Array.from(pending.keys())) { + const entry = takePending(callId); + if (!entry) continue; + cancelHostCall(callId); + entry.reject({ code, message }); + } + }; + + const worldSelectorError = function (command) { + if (!command || command.type !== 'query_world_objects') return null; + const own = function (name) { return Object.prototype.hasOwnProperty.call(command, name); }; + const stateFields = ['stateKey', 'stateType', 'stateString', 'stateNumber', 'stateBool']; + if (!stateFields.some(own)) return null; + if (!own('stateKey') || typeof command.stateKey !== 'string' || command.stateKey.length === 0 || + !own('stateType') || !Number.isInteger(command.stateType) || command.stateType < 0 || command.stateType > 3) { + return 'World state criteria require a non-empty stateKey and a valid stateType.'; + } + const expectedValueField = command.stateType === 0 ? null + : command.stateType === 1 ? 'stateString' + : command.stateType === 2 ? 'stateNumber' : 'stateBool'; + for (const name of ['stateString', 'stateNumber', 'stateBool']) { + if (own(name) !== (name === expectedValueField)) return 'World state criterion fields conflict with stateType.'; + } + if (expectedValueField === 'stateString' && typeof command.stateString !== 'string') return 'stateString must be a string.'; + if (expectedValueField === 'stateNumber' && (typeof command.stateNumber !== 'number' || !Number.isFinite(command.stateNumber))) { + return 'stateNumber must be a finite number.'; + } + if (expectedValueField === 'stateBool' && typeof command.stateBool !== 'boolean') return 'stateBool must be a boolean.'; + return null; + }; + + state.uninstall = function (code, message) { + if (state.disposed) return; + state.disposed = true; + rejectPending(code, message); + if (globalThis.__guaUnityWebState !== state) return; + delete globalThis.__guaUnityWebState; + delete globalThis.__guaUnityWebPort; + delete globalThis.__guaUnityWebResolveInternal; + }; + + globalThis.__guaUnityWebState = state; + globalThis.__guaUnityWebResolveInternal = function (resolvedOwnerId, callId, payload, failed) { + if (resolvedOwnerId !== ownerId || state.disposed) return; + const entry = takePending(callId); + if (!entry) return; + try { + const value = JSON.parse(payload); + if (failed) entry.reject(value); else entry.resolve(value); + } catch (_error) { + entry.reject({ code: 'invalid_request', message: 'Unity WebGL returned malformed Gua JSON.' }); + } + }; + globalThis.__guaUnityWebPort = { + __guaOwnerId: ownerId, + invoke(command, options) { + if (state.disposed) return Promise.reject({ code: 'engine_unsupported', message: 'The Unity WebGL Gua runtime is unavailable.' }); + if (command.type === 'get_screenshot') return Promise.reject({ code: 'engine_unsupported', message: 'Unity WebGL screenshot readback is not enabled.' }); + const selectorError = worldSelectorError(command); + if (selectorError) return Promise.reject({ code: 'invalid_request', message: selectorError }); + const signal = options && options.signal; + const requestedTimeoutMs = options && options.timeoutMs; + if (signal && signal.aborted) return Promise.reject({ code: 'aborted', message: 'The Unity WebGL Gua call was aborted.' }); + if (requestedTimeoutMs !== undefined && (!Number.isInteger(requestedTimeoutMs) || requestedTimeoutMs < 0 || requestedTimeoutMs > 2147483647)) { + return Promise.reject({ code: 'invalid_request', message: 'Unity WebGL timeoutMs must be an integer from 0 to 2147483647.' }); + } + const effectiveTimeoutMs = requestedTimeoutMs === undefined ? callTimeoutMs : requestedTimeoutMs; + const callId = globalThis.__guaUnityWebNextCallId || 1; + globalThis.__guaUnityWebNextCallId = callId + 1; + return new Promise((resolve, reject) => { + const timer = setTimeout(() => { + const entry = takePending(callId); + if (!entry) return; + cancelHostCall(callId); + entry.reject({ code: 'timeout', message: 'Timed out waiting for Unity WebGL host completion.' }); + }, effectiveTimeoutMs); + const aborted = function () { + const entry = takePending(callId); + if (!entry) return; + cancelHostCall(callId); + entry.reject({ code: 'aborted', message: 'The Unity WebGL Gua call was aborted.' }); + }; + pending.set(callId, { resolve, reject, timer, signal, aborted }); + if (signal) signal.addEventListener('abort', aborted, { once: true }); + if (signal && signal.aborted) { + aborted(); + return; + } + try { + SendMessage(hostName, 'HandleWebRequest', JSON.stringify({ callId, command, commandFields: Object.keys(command) })); + } catch (_error) { + const entry = takePending(callId); + if (entry) entry.reject({ code: 'engine_unsupported', message: `Unity WebGL could not reach the Gua runtime '${hostName}'.` }); + } + }); + } + }; + }, + GuaUnityWebUninstall: function (ownerIdPointer) { + const ownerId = UTF8ToString(ownerIdPointer); + const state = globalThis.__guaUnityWebState; + if (state && state.ownerId === ownerId && typeof state.uninstall === 'function') { + state.uninstall('engine_unsupported', 'The Unity WebGL Gua runtime was destroyed.'); + } + }, + GuaUnityWebResolve: function (ownerIdPointer, callId, jsonPointer, failed) { + const resolve = globalThis.__guaUnityWebResolveInternal; + if (typeof resolve === 'function') resolve(UTF8ToString(ownerIdPointer), callId, UTF8ToString(jsonPointer), failed); + } +}); diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/GuaWebMcp.jslib.meta b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/GuaWebMcp.jslib.meta new file mode 100644 index 0000000..19ce6f3 --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/GuaWebMcp.jslib.meta @@ -0,0 +1,26 @@ +fileFormatVersion: 2 +guid: 5b7520be6de14627ad9d828493d10baa +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Core.dll b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Core.dll new file mode 100644 index 0000000..ed0a3c2 Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Core.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Core.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Core.dll.meta new file mode 100644 index 0000000..680969c --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Core.dll.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 7e5c8b1f4a2d43e9b6c0f1a8d2e7c345 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Runtime.dll b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Runtime.dll new file mode 100644 index 0000000..817f4bc Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Runtime.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Runtime.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Runtime.dll.meta new file mode 100644 index 0000000..980105d --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/Managed/Gua.Runtime.dll.meta @@ -0,0 +1,27 @@ +fileFormatVersion: 2 +guid: 0cf1767b9a2e4c79ac73b5f57928f017 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 0 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua-core.a b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua-core.a new file mode 100644 index 0000000..6db6bb4 Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua-core.a differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua-core.a.meta b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua-core.a.meta new file mode 100644 index 0000000..169d15c --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua-core.a.meta @@ -0,0 +1,26 @@ +fileFormatVersion: 2 +guid: 41bf4b6a2b0045e7834ba7d650c97cf1 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua_runtime.a b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua_runtime.a new file mode 100644 index 0000000..ed7219b Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua_runtime.a differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua_runtime.a.meta b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua_runtime.a.meta new file mode 100644 index 0000000..3fe8f95 --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/WebGL/libgua_runtime.a.meta @@ -0,0 +1,26 @@ +fileFormatVersion: 2 +guid: d4e8b0deefcc4bf79d0cb498caa82b58 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + WebGL: WebGL + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua.dll b/Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua.dll new file mode 100644 index 0000000..df0ac49 Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua.dll.meta similarity index 100% rename from Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua.dll.meta rename to Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua.dll.meta diff --git a/Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua_runtime.dll b/Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua_runtime.dll new file mode 100644 index 0000000..a1ed3a4 Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua_runtime.dll differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua_runtime.dll.meta b/Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua_runtime.dll.meta similarity index 100% rename from Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua_runtime.dll.meta rename to Packages/com.link1345.gua/Runtime/Plugins/Windows/x86_64/gua_runtime.dll.meta diff --git a/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua.dylib b/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua.dylib new file mode 100644 index 0000000..a6d2f96 Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua.dylib differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua.dylib.meta b/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua.dylib.meta new file mode 100644 index 0000000..7938a64 --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua.dylib.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: 43e40b352e8e4d8fa1644c2cd93ad3dd +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: OSX + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua_runtime.dylib b/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua_runtime.dylib new file mode 100644 index 0000000..c2f6b20 Binary files /dev/null and b/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua_runtime.dylib differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua_runtime.dylib.meta b/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua_runtime.dylib.meta new file mode 100644 index 0000000..796dc95 --- /dev/null +++ b/Packages/com.link1345.gua/Runtime/Plugins/macOS/libgua_runtime.dylib.meta @@ -0,0 +1,35 @@ +fileFormatVersion: 2 +guid: 4af4d22a359647d586b28c2ff0a40cd9 +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 1 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 0 + settings: {} + - first: + Editor: Editor + second: + enabled: 1 + settings: + CPU: AnyCPU + DefaultValueInitialized: true + OS: OSX + - first: + Standalone: OSXUniversal + second: + enabled: 1 + settings: + CPU: AnyCPU + userData: + assetBundleName: + assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/x86_64.meta b/Packages/com.link1345.gua/Runtime/Plugins/x86_64.meta deleted file mode 100644 index e027221..0000000 --- a/Packages/com.link1345.gua/Runtime/Plugins/x86_64.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: b299990b23362214a98655a01acd1285 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua.dll b/Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua.dll deleted file mode 100644 index 84da8c2..0000000 Binary files a/Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua.dll and /dev/null differ diff --git a/Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua_runtime.dll b/Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua_runtime.dll deleted file mode 100644 index 9c16bf3..0000000 Binary files a/Packages/com.link1345.gua/Runtime/Plugins/x86_64/gua_runtime.dll and /dev/null differ diff --git a/Packages/com.link1345.gua/Runtime/link.xml.meta b/Packages/com.link1345.gua/Runtime/link.xml.meta deleted file mode 100644 index 9f36f72..0000000 --- a/Packages/com.link1345.gua/Runtime/link.xml.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 783c8628cbe405747a6e820b0391bb29 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/com.link1345.gua/Samples~/Runtime UI Fixture/GuaRuntimeUiSample.cs b/Packages/com.link1345.gua/Samples~/Runtime UI Fixture/GuaRuntimeUiSample.cs index 493befb..3c9bb8f 100644 --- a/Packages/com.link1345.gua/Samples~/Runtime UI Fixture/GuaRuntimeUiSample.cs +++ b/Packages/com.link1345.gua/Samples~/Runtime UI Fixture/GuaRuntimeUiSample.cs @@ -1,4 +1,6 @@ using TMPro; +using Gua.Core; +using Gua.Unity; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; @@ -31,5 +33,17 @@ private static void Build() document.rootVisualElement.Add(new UnityEngine.UIElements.Label("Toolkit Ready") { name = "toolkit-label" }); document.rootVisualElement.Add(new UnityEngine.UIElements.Button { name = "toolkit-button", text = "Toolkit Start" }); document.rootVisualElement.Add(new TextField("Callsign") { name = "toolkit-input", value = "alpha" }); + + var doorObject = new GameObject("Door A"); + doorObject.transform.position = new Vector3(640, 180, 0); + var door = doorObject.AddComponent(); + door.Id = "door-a"; + door.Kind = "door"; + door.Label = "Door A"; + door.Space = GuaWorldSpace.World2D; + door.VisibleToPlayer = true; + door.Tags = new[] { "east-corridor", "mission-critical" }; + door.SetState("open", false); + door.SetState("locked", true); } } diff --git a/Packages/com.link1345.gua/Samples~/Runtime UI Fixture/README.md b/Packages/com.link1345.gua/Samples~/Runtime UI Fixture/README.md index 71ac074..9121034 100644 --- a/Packages/com.link1345.gua/Samples~/Runtime UI Fixture/README.md +++ b/Packages/com.link1345.gua/Samples~/Runtime UI Fixture/README.md @@ -4,5 +4,17 @@ Import this sample from Package Manager and open `GuaRuntimeUiSample.unity`. The scene creates UI Toolkit, uGUI, and TextMeshPro controls at runtime. Gua starts automatically; no semantic node registration is required. +## Virtual clock integration + +Gua can pause only game logic that explicitly uses GuaClock as its time source. +Use `GuaUnityRuntime.Clock.Schedule(...)` or subscribe to +`GuaUnityRuntime.Clock.Tick` in the target game subsystem. Calling +`clock_install` from a test, MCP, or Inspector activates that shared clock; it +does not rewrite existing `Time.deltaTime`, `WaitForSeconds`, coroutines, +physics, animation, or audio behavior. + +The `Tick` callback receives a `GuaClockDelta`; use `TotalMilliseconds` or +`TotalSeconds` to retain steps below the 100 ns resolution of `TimeSpan`. + The package targets Windows x64, Unity 6000.5 or newer, and the Mono scripting backend. Import TextMeshPro Essential Resources before building a Player. diff --git a/Packages/com.link1345.gua/package.json b/Packages/com.link1345.gua/package.json index d9a3c66..ed84677 100644 --- a/Packages/com.link1345.gua/package.json +++ b/Packages/com.link1345.gua/package.json @@ -1,6 +1,6 @@ { "name": "com.link1345.gua", - "version": "1.0.4", + "version": "1.0.7", "displayName": "Gua Runtime UI Automation", "description": "Managed Unity adapter for the Gua runtime UI automation protocol.", "unity": "6000.5", @@ -8,7 +8,8 @@ "com.unity.ugui": "2.0.0", "com.unity.modules.uielements": "1.0.0", "com.unity.modules.screencapture": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0" + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.inputsystem": "1.20.0" }, "samples": [ { diff --git a/Packages/com.link1345.gua/package.json.meta b/Packages/com.link1345.gua/package.json.meta deleted file mode 100644 index 3f46be7..0000000 --- a/Packages/com.link1345.gua/package.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5930f3a8880854b49bf05e3c787abe4f -PackageManifestImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/packages-lock.json b/Packages/packages-lock.json index 7c6824e..465326b 100644 --- a/Packages/packages-lock.json +++ b/Packages/packages-lock.json @@ -8,9 +8,19 @@ "com.unity.ugui": "2.0.0", "com.unity.modules.uielements": "1.0.0", "com.unity.modules.screencapture": "1.0.0", - "com.unity.modules.imageconversion": "1.0.0" + "com.unity.modules.imageconversion": "1.0.0", + "com.unity.inputsystem": "1.20.0" } }, + "com.unity.inputsystem": { + "version": "1.20.0", + "depth": 1, + "source": "registry", + "dependencies": { + "com.unity.modules.uielements": "1.0.0" + }, + "url": "https://packages.unity.com" + }, "com.unity.ugui": { "version": "2.5.0", "depth": 0, diff --git a/README-ja.md b/README-ja.md index efd3419..c03a389 100644 --- a/README-ja.md +++ b/README-ja.md @@ -9,7 +9,7 @@ ウィンドウはリサイズ可能です。541×857のデザイン比率を維持して一様に拡大・縮小し、画面比率から余る領域は黒いレターボックスとして表示します。 -UI自動化にはGua v1.0.4のUnity UPMパッケージを使用しています。実行中は既定で `ws://127.0.0.1:8765` にGua bridgeを開き、標準uGUIツリーを自動的に公開します。ポートは環境変数 `GUA_BRIDGE_PORT` で変更できます。 +UI自動化にはGua v1.0.7のUnity UPMパッケージを使用しています。実行中は既定で `ws://127.0.0.1:8765` にGua bridgeを開き、標準uGUIツリーを自動的に公開します。ポートは環境変数 `GUA_BRIDGE_PORT` で変更できます。 ## 実行 @@ -17,7 +17,7 @@ UI自動化にはGua v1.0.4のUnity UPMパッケージを使用しています 2. Unity `6000.5.3f1`で `Assets/Scenes/Main.unity` を開きます。 3. Playを押します。 -Guaの管理DLLとWindows/Linux x64 native libraryを含む公式UPMパッケージ v1.0.4は `Packages/com.link1345.gua` に固定しています。そのため、隣接するGuaソースリポジトリへの参照や別途のパッケージダウンロードは不要です。 +Guaの管理DLLとWindows/Linux x64 native libraryを含む公式UPMパッケージ v1.0.7は `Packages/com.link1345.gua` に固定しています。そのため、隣接するGuaソースリポジトリへの参照や別途のパッケージダウンロードは不要です。 ## UIテスト @@ -82,4 +82,4 @@ pull requestでVisual比較が失敗すると、`visual-report@v3.1`が`comparis | `cancel_exit` | button | 終了確認 | | `confirm_exit` | button | 終了確認 | -Gua v1.0.4のクロスプラットフォームUnity構成に合わせ、CIではLinux x64・Monoを対象にしています。IL2CPPはこのサンプルの検証対象外です。 +Gua v1.0.7のクロスプラットフォームUnity構成に合わせ、CIではLinux x64・Monoを対象にしています。IL2CPPはこのサンプルの検証対象外です。 diff --git a/README.md b/README.md index d90e2a1..e9b38d0 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ This is a Unity sample project for [Gua](https://github.com/link1345/gua). It re The window is resizable. The UI scales uniformly while preserving its 541×857 design aspect ratio, and any space outside that ratio is rendered as black letterboxing. -UI automation uses the Gua v1.0.4 Unity UPM package. At runtime, it opens a Gua bridge at `ws://127.0.0.1:8765` by default and automatically exposes the standard uGUI tree. Set the `GUA_BRIDGE_PORT` environment variable to use a different port. +UI automation uses the Gua v1.0.7 Unity UPM package. At runtime, it opens a Gua bridge at `ws://127.0.0.1:8765` by default and automatically exposes the standard uGUI tree. Set the `GUA_BRIDGE_PORT` environment variable to use a different port. ## Run the sample @@ -16,7 +16,7 @@ UI automation uses the Gua v1.0.4 Unity UPM package. At runtime, it opens a Gua 2. Open `Assets/Scenes/Main.unity` with Unity `6000.5.3f1`. 3. Enter Play Mode. -The official UPM package v1.0.4, including the managed assemblies and Windows and Linux x64 native libraries, is pinned in `Packages/com.link1345.gua`. No adjacent Gua source repository or separate package download is required. +The official UPM package v1.0.7, including the managed assemblies and Windows and Linux x64 native libraries, is pinned in `Packages/com.link1345.gua`. No adjacent Gua source repository or separate package download is required. ## UI tests @@ -81,4 +81,4 @@ Enable `visual-report-demo` in a manual run to reuse the Unity Player from the n | `cancel_exit` | button | Exit confirmation | | `confirm_exit` | button | Exit confirmation | -This sample's CI targets Linux x64 and Mono, matching the cross-platform Unity configuration in Gua v1.0.4. IL2CPP remains outside the sample's validated scope. +This sample's CI targets Linux x64 and Mono, matching the cross-platform Unity configuration in Gua v1.0.7. IL2CPP remains outside the sample's validated scope. diff --git a/tests/GuaUiLab.Unity.Tests.csproj b/tests/GuaUiLab.Unity.Tests.csproj index 58eb62c..d5391be 100644 --- a/tests/GuaUiLab.Unity.Tests.csproj +++ b/tests/GuaUiLab.Unity.Tests.csproj @@ -8,11 +8,11 @@ - - - - - + + + + + diff --git a/tests/baselines/title-screen/unity-LinuxX64.png b/tests/baselines/title-screen/unity-LinuxX64.png new file mode 100644 index 0000000..cda5931 Binary files /dev/null and b/tests/baselines/title-screen/unity-LinuxX64.png differ