### Option B: Manual Setup - Install Optional Plugins Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Install optional plugins that are often added. ```bash npm install --save-dev \ @iwsdk/vite-plugin-uikitml \ @iwsdk/vite-plugin-metaspatial ``` -------------------------------- ### Option B: Manual Setup - Install Development Dependencies Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Install development dependencies for the project. ```bash # Development dependencies npm install --save-dev \ @iwsdk/vite-plugin-dev \ vite-plugin-mkcert \ vite \ typescript \ @types/three ``` -------------------------------- ### Option B: Manual Setup - Install Core Dependencies Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Install core dependencies for the project. ```bash # Core dependencies npm install @iwsdk/core three ``` -------------------------------- ### Typical Development Workflow: Build and install Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hzdb-cli/references/hzdb-app-management.md Example of building and installing an app in one step, and then launching it immediately. ```bash # Unity project example hzdb app install ./Builds/Android/myapp.apk # After install, launch immediately hzdb app install ./Builds/Android/myapp.apk && hzdb app launch com.mycompany.myapp ``` -------------------------------- ### Query Examples Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md Examples demonstrating how to create and evaluate queries to filter entities based on component presence and attribute values. ```kotlin // Basic query: entities that have both Transform and Mesh val query = Query.where { has(Transform.id, Mesh.id) } // Query with attribute filter val fastSpinners = Query.where { has(Spinner.id, Transform.id) attribute(Spinner.speed) greaterThan 5.0f } // Evaluate the query (returns an iterable of entities) for (entity in query.eval()) { // Process each matching entity } // Count matching entities val count = query.eval().count() ``` -------------------------------- ### HTML Entry Point Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Example index.html for the project. ```html My Quest App
My Quest App
Open this URL in Quest Browser and tap Enter XR.
``` -------------------------------- ### Scene Management Example Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md An example of configuring the 3D environment within the onSceneReady() method, including setting viewer position, skybox, IBL, and enabling passthrough. ```kotlin override fun onSceneReady(scene: Scene) { super.onSceneReady(scene) // Set the viewer (camera) starting position scene.setViewerPosition(Vector3(0f, 1.6f, 0f)) // Configure the environment skybox scene.setSkybox(Uri.parse("apk:///environments/sky.env")) // Configure image-based lighting scene.setIBL(Uri.parse("apk:///environments/ibl.env")) // Enable passthrough (mixed reality mode) scene.enablePassthrough(true) } ``` -------------------------------- ### Custom System Example Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md An example of a custom system that extends SystemBase and overrides the execute() method to destroy entities with zero health. ```kotlin class HealthSystem : SystemBase() { private val healthQuery = Query.where { has(Health.id, Transform.id) } override fun execute() { for (entity in healthQuery.eval()) { val health = entity.getComponent() if (health.current <= 0) { entity.destroy() } } } override fun onStart() { // Called once when the system starts } override fun onStop() { // Called once when the system stops } } ``` -------------------------------- ### Project Structure Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Example project directory structure. ```text my-quest-app/ src/ index.ts # Entry point: World.create, scene setup, XR controls systems/ # Optional ECS systems movement.ts public/ models/ # GLTF / GLB models textures/ # Texture files audio/ # Audio files ui/ # Compiled UIKitML JSON output ui/ welcome.uikitml # Source UIKitML files index.html # HTML entry point vite.config.ts tsconfig.json package.json ``` -------------------------------- ### Version Control Commit Example Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-api-upgrade/references/sdk-migration.md Example of committing changes after a successful upgrade step. ```bash git add -A && git commit -m "Upgrade Meta XR SDK to v69: fix deprecated APIs" ``` -------------------------------- ### SpatialActivity Example Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md An example of a custom SpatialActivity subclass demonstrating the registration of panels, systems, and spatial features, along with scene initialization. ```kotlin class MyActivity : SpatialActivity() { override fun registerPanels(): List { // Register all panels before the scene is ready return listOf(/* ... */) } override fun registerSystems(): List { // Register all custom systems return listOf(/* ... */) } override fun getSpatialFeatures(): List { // Declare which spatial features to enable return listOf(/* ... */) } override fun onSceneReady(scene: Scene) { super.onSceneReady(scene) // Scene is initialized -- spawn entities, load content scene.setViewerPosition(Vector3(0f, 0f, 0f)) Entity.createPanelEntity("home_panel") } } ``` -------------------------------- ### Build and Install Commands Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-android-2d-porting/references/gradle-setup.md Commands to build the release APK, specifically for the Quest flavor, and install it on a connected Quest device using hzdb. ```bash # Build the release APK ./gradlew assembleRelease # Or for the quest flavor specifically ./gradlew assembleQuestRelease # Install on connected device hzdb app install app/build/outputs/apk/quest/release/app-quest-release.apk # Launch the app hzdb app launch com.example.myquestapp ``` -------------------------------- ### System Implementation and Registration Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md An example of a custom system implementing the `execute` method and registering systems within an activity. ```kotlin class GravitySystem : SystemBase() { private val gravityQuery = Query.where { has(RigidBody.id, Transform.id) } override fun execute() { for (entity in gravityQuery.eval()) { val transform = entity.getComponent() val rigidBody = entity.getComponent() rigidBody.velocity.y -= 9.8f * getDeltaTime() transform.position += rigidBody.velocity * getDeltaTime() entity.setComponent(transform) entity.setComponent(rigidBody) } } } override fun registerSystems(): List { return listOf( GravitySystem(), SpinnerSystem(), ScoreSystem() ) } ``` -------------------------------- ### Entity Creation and Destruction Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md Examples of creating and destroying entities, with and without initial components. ```kotlin val entity = Entity.create() val entity = Entity.create( Transform(Pose(Vector3(0f, 1f, -2f))), Mesh(Uri.parse("apk:///models/chair.glb")) ) entity.destroy() ``` -------------------------------- ### Unity: Test on Device Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-api-upgrade/references/sdk-migration.md Build the APK from Unity and then install and test on the device. ```bash # Build the APK from Unity (File > Build Settings > Build) # Then install and test: hzdb app install ./Builds/YourApp.apk hzdb app launch com.yourcompany.yourapp ``` -------------------------------- ### Build Variants using Product Flavors Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-android-2d-porting/references/gradle-setup.md Example configuration for setting up product flavors in `app/build.gradle.kts` to maintain both standard Android and Quest builds. ```kotlin // app/build.gradle.kts android { flavorDimensions += "platform" productFlavors { create("mobile") { dimension = "platform" // Standard mobile Android settings } create("quest") { dimension = "platform" minSdk = 29 targetSdk = 34 // Quest-specific settings } } } ``` -------------------------------- ### SpatialFeatures Example Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md An example of how to declare which spatial features to enable for an activity. ```kotlin override fun getSpatialFeatures(): List { return listOf( SpatialFeature.PHYSICS, // Physics simulation SpatialFeature.MRUK, // Mixed Reality Utility Kit SpatialFeature.INTERACTION, // Interaction SDK (ISDK) SpatialFeature.ANIMATION // Animation playback ) } ``` -------------------------------- ### hzdb perf context examples Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hzdb-cli/references/hzdb-perf-tools.md Examples of how to use the `hzdb perf context` command to get a performance overview. ```bash # Get context for a specific trace hzdb perf context my_session_id # Get general performance analysis context hzdb perf context ``` -------------------------------- ### Documentation Search Commands Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-api-upgrade/references/deprecation-guide.md Command-line examples for searching the documentation for deprecated APIs, migration information, and breaking changes. ```bash hzdb docs search "deprecated" hzdb docs search "migration" hzdb docs search "breaking changes" ``` -------------------------------- ### Build and Test (Meta XR SDK) Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-api-upgrade/references/sdk-migration.md Commands to assemble, install, and launch the application using hzdb. ```bash ./gradlew assembleDebug hzdb app install ./app/build/outputs/apk/debug/app-debug.apk hzdb app launch com.yourcompany.yourapp ``` -------------------------------- ### Deploy and Launch with hzdb Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/unreal-project.md Commands to install, launch, and monitor logs of an application on a Meta Quest device using the hzdb tool. ```bash # Install the built APK hzdb app install ./Package/MyQuestApp.apk # Launch the application hzdb app launch com.yourcompany.yourapp # Monitor logs hzdb log --tag yourcompany ``` -------------------------------- ### Vite Configuration Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Example vite.config.ts for the project. ```typescript import { iwsdkDev } from '@iwsdk/vite-plugin-dev'; import { defineConfig } from 'vite'; import mkcert from 'vite-plugin-mkcert'; export default defineConfig({ plugins: [ mkcert(), iwsdkDev({ emulator: { device: 'metaQuest3', }, verbose: true, }), ], server: { host: '0.0.0.0', port: 8081, strictPort: true, }, build: { target: 'esnext', outDir: 'dist', sourcemap: true, }, esbuild: { target: 'esnext', }, publicDir: 'public', base: './', }); ``` -------------------------------- ### TypeScript Configuration Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Example tsconfig.json for the project. ```json { "compilerOptions": { "target": "ES2020", "module": "ESNext", "moduleResolution": "bundler", "strict": true, "esModuleInterop": true, "skipLibCheck": true, "resolveJsonModule": true, "isolatedModules": true, "lib": ["ES2020", "DOM", "DOM.Iterable"] }, "include": ["src/**/*"] } ``` -------------------------------- ### Command Line Build and Deployment Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/android-project.md Commands for building debug and release APKs, installing them on a device using hzdb, launching the application, and monitoring logs. ```bash # Build debug APK cd /path/to/your/project ./gradlew assembleDebug # Install using hzdb hzdb app install app/build/outputs/apk/debug/app-debug.apk # Launch the application hzdb app launch com.yourcompany.yourapp # Monitor logs hzdb log --tag yourcompany ``` ```bash # Build release APK (requires signing config in build.gradle) ./gradlew assembleRelease # Install release build hzdb app install app/build/outputs/apk/release/app-release.apk ``` -------------------------------- ### Vite Configuration with UIKitML Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Example vite.config.ts if the project uses UIKitML. ```typescript import { compileUIKit } from '@iwsdk/vite-plugin-uikitml'; export default defineConfig({ plugins: [ compileUIKit({ sourceDir: 'ui', outputDir: 'public/ui', verbose: true }), ], }); ``` -------------------------------- ### hzdb CLI for APK Deployment Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/unity-project.md Commands to install, launch, and monitor logs of an Android APK on a Meta Quest device using the hzdb CLI. ```bash # Install the built APK ``` ```bash hzdb app install ./Builds/MyQuestApp.apk ``` ```bash ``` ```bash # Launch the application ``` ```bash hzdb app launch com.yourcompany.yourapp ``` ```bash ``` ```bash # Monitor logs ``` ```bash hzdb log --tag Unity ``` -------------------------------- ### Loading a glXF scene Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md Example of loading a scene composed in the Spatial Editor using the glXF format. ```kotlin override fun onSceneReady(scene: Scene) { super.onSceneReady(scene) // Load a scene composed in the Spatial Editor scene.loadGlxf(Uri.parse("apk:///scenes/main_scene.glxf")) } ``` -------------------------------- ### Install Command Usage Source: https://github.com/meta-quest/agentic-tools/blob/main/docs/hzdb.md The base usage for the install command. ```bash install ``` -------------------------------- ### install Usage Source: https://github.com/meta-quest/agentic-tools/blob/main/docs/hzdb.md Install an APK to the device. ```bash install [OPTIONS] ``` -------------------------------- ### Project Installation Source: https://github.com/meta-quest/agentic-tools/blob/main/docs/hzdb.md Command to install hzdb into a project directory. ```bash project [OPTIONS] ``` -------------------------------- ### adb install Command Usage Source: https://github.com/meta-quest/agentic-tools/blob/main/docs/hzdb.md Usage for the 'install' subcommand under 'adb'. ```bash install ``` -------------------------------- ### Component Operations Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md Examples of getting, modifying, setting, checking for, and removing components from an entity. ```kotlin val transform = entity.getComponent() transform.position = Vector3(1f, 2f, 3f) entity.setComponent(transform) if (entity.hasComponent()) { // ... } entity.removeComponent() ``` -------------------------------- ### Instantiate the Client Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-platform-sdk/references/common-setup.md Each package provides a lightweight client class that can be instantiated wherever needed. ```kotlin val client = () ``` -------------------------------- ### Debugging a Unity App Crash - Step 1 & 2 Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-vr-debug/references/logcat-filtering.md Example of clearing logs and starting to capture Unity-specific logs, followed by reproducing the crash. ```bash # Step 1: Clear logs and start capturing hzdb adb logcat --clear hzdb adb logcat --tag Unity --level W --follow # Step 2: Reproduce the crash in the headset ``` -------------------------------- ### Option B: Manual Setup - Initialize Project Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Manually create the project directory and initialize it with npm. ```bash mkdir my-quest-app cd my-quest-app npm init -y ``` -------------------------------- ### Option A: Use The Official IWSDK Create Tool Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md Use the official create-iwsdk tool to scaffold a new project. ```bash npm create @iwsdk@latest my-quest-app cd my-quest-app ``` -------------------------------- ### Start MCP Server Directly Source: https://github.com/meta-quest/agentic-tools/blob/main/README.md Starts the MCP server directly without installing it for a specific tool. ```bash npx -y @meta-quest/hzdb mcp server ``` -------------------------------- ### Example welcome.uikitml Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-iwsdk-webxr/references/spatial-ui.md An example of a .uikitml file defining the structure and styling of a panel, including a button. ```xml
Hello, Immersive Web!
``` -------------------------------- ### macOS PATH Configuration Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-xr-simulator-setup/references/installation.md Manually add the XR Simulator installation directory to your system PATH on macOS for command-line access. ```bash export PATH="$PATH:/Applications/MetaXRSimulator" ``` -------------------------------- ### Install and Launch App Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-android-2d-porting/references/input-adaptation.md Command-line instructions to install an APK and launch an application using hzdb. ```bash hzdb app install path/to/app.apk hzdb app launch com.example.yourapp ``` -------------------------------- ### hzdb app install commands Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hzdb-cli/references/hzdb-app-management.md Examples of how to install an APK file onto the connected device, including options for replacement, permission granting, and version downgrading. ```bash # Install an APK hzdb app install ./build/myapp.apk # Replace an existing installation (keeps data) hzdb app install --replace ./build/myapp.apk # Install and grant all requested permissions hzdb app install --grant-permissions ./build/myapp.apk # Allow version downgrade hzdb app install --downgrade ./build/myapp.apk ``` -------------------------------- ### Creating a WebXR Media Layer for Video Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-iwsdk-webxr/references/performance-tips.md Example of creating a quad layer for video playback using XRMediaBinding. ```typescript // Request a quad layer for video playback const session = world.session; const layerFactory = new XRMediaBinding(session); const videoElement = document.createElement('video'); videoElement.src = '/videos/intro.mp4'; await videoElement.play(); const quadLayer = layerFactory.createQuadLayer(videoElement, { space: xrReferenceSpace, layout: 'mono', width: 2.0, // 2 meters wide height: 1.125, // 16:9 aspect ratio transform: new XRRigidTransform( { x: 0, y: 1.5, z: -3, w: 1 }, { x: 0, y: 0, z: 0, w: 1 } ), }); session.updateRenderState({ layers: [quadLayer, session.renderState.baseLayer] }); ``` -------------------------------- ### Install Android SDK Components Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/android-project.md This snippet shows the required Android SDK components to install for Meta Quest development. ```text SDK Platforms: Android 14 (API 34) -- Target SDK Android 10 (API 29) -- Minimum SDK SDK Tools: Android SDK Build-Tools (latest) Android SDK Command-line Tools Android SDK Platform-Tools NDK (if using native code) ``` -------------------------------- ### Install and Launch APK Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-store-submit/SKILL.md Installs the APK on a connected device and verifies it launches correctly. ```bash # Install the APK on a connected device to test hzdb app install path/to/release.apk # Verify it launches correctly hzdb app launch ``` -------------------------------- ### App Installation, Launch, and Logging with hzdb Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/SKILL.md Commands for installing, launching, and monitoring logs of an application using the hzdb tool. ```bash # After building, install the APK hzdb app install path/to/build.apk # Launch the app hzdb app launch com.yourcompany.yourapp # Monitor logs during first run hzdb log --tag yourapp ``` -------------------------------- ### Get APK Path Source: https://github.com/meta-quest/agentic-tools/blob/main/docs/hzdb.md Retrieves the file path to an installed APK on the device. ```bash path ``` -------------------------------- ### Build and Deploy (IWSDK) Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-api-upgrade/references/sdk-migration.md Commands to build the project and run it locally or deploy. ```bash npm run build # Deploy to your hosting or test locally npm run dev ``` -------------------------------- ### Typical Unity Crash Log Example Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-vr-debug/references/logcat-filtering.md An example of a typical logcat output for a Unity application crash, highlighting key information like exception type, method, and line number. ```text E/AndroidRuntime: FATAL EXCEPTION: UnityMain E/AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method ... E/AndroidRuntime: at com.example.myvrunityapp.GameManager.OnTriggerEnter(GameManager.java:142) E/AndroidRuntime: at com.unity3d.player.UnityPlayer.nativeRender(Native Method) ``` -------------------------------- ### hzdb app info command Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hzdb-cli/references/hzdb-app-management.md Command to get detailed information about an installed app. ```bash hzdb app info com.mycompany.myapp ``` -------------------------------- ### hzdb app path command Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hzdb-cli/references/hzdb-app-management.md Command to get the APK path for an installed app on the device. ```bash hzdb app path com.mycompany.myapp ``` -------------------------------- ### Package Scripts Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/references/web-project.md npm scripts for development, building, and previewing the project. ```json { "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview" }, "engines": { "node": ">=20.19.0" } } ``` -------------------------------- ### Update XML Component Definitions Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-api-upgrade/references/sdk-migration.md Example of checking component XML attributes against a new schema. ```xml ``` -------------------------------- ### Workflow Examples Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hzdb-cli/SKILL.md Examples of common hzdb commands for different development stages. ```bash hzdb docs search "spatial sdk panel" hzdb docs fetch https://developers.meta.com/horizon/documentation/... ./gradlew assembleDebug hzdb app install app/build/outputs/apk/debug/app-debug.apk hzdb app launch com.example.app hzdb log --tag MyApp hzdb capture screenshot -o latest.png hzdb device health-check hzdb device configure-testing setup # ...run tests... hzdb device configure-testing restore ``` -------------------------------- ### Full Self-Update Flow with Progress Polling Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-platform-sdk/references/application.md This code snippet demonstrates how to download and install an app update with periodic progress checks. It covers checking for updates, starting the download, polling for progress, and finally installing the update. ```kotlin import horizon.platform.application.Application import horizon.platform.application.ApplicationException import horizon.platform.application.models.AppDownloadResult import horizon.platform.application.models.AppDownloadProgressResult import horizon.platform.application.enums.AppInstallResult import horizon.platform.application.enums.AppStatus import kotlinx.coroutines.delay suspend fun performSelfUpdate(onProgress: (Int) -> Unit): Boolean { val application = Application() // Step 1: Check if update is available val version = application.getVersion() if (version.latestCode <= version.currentCode) { return false // Already up to date } // Step 2: Start download try { application.startAppDownload() } catch (e: ApplicationException) { throw e } // Step 3: Poll download progress var downloading = true while (downloading) { try { val progress: AppDownloadProgressResult = application.checkAppDownloadProgress() val percent = if (progress.downloadBytes > 0) { (progress.downloadedBytes * 100 / progress.downloadBytes).toInt() } else { 0 } onProgress(percent) when (progress.statusCode) { AppStatus.INSTALLED -> downloading = false AppStatus.DOWNLOADING, AppStatus.DOWNLOAD_QUEUED -> delay(1000) else -> delay(500) } } catch (e: ApplicationException) { throw e } } // Step 4: Install and relaunch (app will exit automatically) application.installAppUpdateAndRelaunch() return true } ``` -------------------------------- ### List All Config Settings Source: https://github.com/meta-quest/agentic-tools/blob/main/docs/hzdb.md Displays all available configuration settings. ```bash config list ``` -------------------------------- ### hzdb app list commands Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hzdb-cli/references/hzdb-app-management.md Examples of how to list installed applications on the connected device with various filters. ```bash # List all apps (third-party only by default) hzdb app list # List only system apps hzdb app list --system # List all apps (system and third-party) hzdb app list --all # Filter by package name substring hzdb app list --filter mycompany ``` -------------------------------- ### Android Studio Install Options Source: https://github.com/meta-quest/agentic-tools/blob/main/docs/hzdb.md Options available for installing MCP server configuration into Android Studio. ```bash android-studio [OPTIONS] ``` -------------------------------- ### DataModel Access and Querying Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md Examples of accessing the DataModel from a system, querying entities by component, and listening for component changes. ```kotlin val dataModel = getDataModel() val allMeshEntities = Query.where { has(Mesh.id) }.eval() dataModel.addOnComponentChangedListener(Transform.id) { entity, component -> // React to transform changes } ``` -------------------------------- ### Example CI Step Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-xr-simulator-setup/references/testing-workflows.md Conceptual example of a CI step integrating the XR Simulator into an automated build pipeline. ```bash # Build the application uname -a unity-editor -batchmode -buildTarget StandaloneWindows64 -executeMethod BuildScript.Build # Run simulator test xr-simulator --headless --config test_config.json --script grab_test.json --timeout 30 # Check results test -f results/result.png && echo "Test passed" || exit 1 ``` -------------------------------- ### Git Initialization and Ignore Configuration Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-new-project-creation/SKILL.md Initializes a Git repository and suggests using a platform-appropriate .gitignore file. ```bash git init # Use a platform-appropriate .gitignore (Unity, Unreal, Android, or Node.js) ``` -------------------------------- ### Using a Generated Custom Component Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md Example of using the auto-generated Kotlin data class for the 'Spinner' component to create and set it on an entity, and then retrieve its properties. ```kotlin val spinner = Spinner(speed = 2.5f, axis = "y", active = true) entity.setComponent(spinner) val s = entity.getComponent() println("Speed: ${s.speed}, Axis: ${s.axis}") ``` -------------------------------- ### Defining a Custom Component in XML Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-spatial-sdk/references/architecture-guide.md An example of defining a custom component named 'Spinner' with attributes for speed, axis, and active state using XML. ```xml ``` -------------------------------- ### Start The Dev Server Source: https://github.com/meta-quest/agentic-tools/blob/main/skills/hz-iwsdk-webxr/SKILL.md Command to start the IWSDK Vite development server. ```bash npm run dev ```