Localization Simulation

Introduction

The SimulationDataManager is a Unity component designed to manage and retrieve localization simulation data from a server. It provides a user-friendly custom editor within the Unity Inspector, allowing developers to easily fetch a list of available simulations, download them, and process them for use in Unity Editor Localization.

This system is intended for use within the Unity Editor only, as indicated by the #if UNITY_EDITOR directive.

How to Create Simulation Data

Before you can download data in the Unity Editor, you first need to capture it using the MultiSet mobile app. Follow these steps:

  1. Download the MultiSet App: Install the MultiSet application on your mobile device.

  2. Start a New Capture: Open the app and tap the + button to begin a new session.

  3. Choose "Simulation Data": From the options presented, select "Simulation Data." This will open an AR scene using your device's camera.

  4. Position Yourself: Walk to the physical location where you want to capture the simulation data.

  5. Capture the Data: Tap the Capture button. The app will record simulation data for a few seconds.

  6. Name Your Simulation: A pop-up will appear after the capture is complete. Give your simulation a descriptive name so you can easily identify it later.

  7. Upload: Finalize the process by uploading the captured data. It will become instantly available in the Unity Editor for you to download and test.

  8. Repeat: You can repeat this process multiple times where you want to capture simulation data for later testing

How to Use Simulation Data

Once you have a SimulationDataManager component on a GameObject in your scene, you can access the custom inspector to manage your simulation data. The process is divided into two main steps:

Step 1: Fetch Available Simulations

  1. Click the "Get Simulation Data List" button.

  2. The manager will connect to the server to retrieve a list of all available simulations in your account.

  3. While fetching, the button will be disabled and will display "Fetching Simulation Data..." with a progress indicator.

Step 2: Select & Download a Simulation

  1. Once the list of simulations is successfully fetched, a new section will appear in the inspector.

  2. An info box will show the number of simulations found.

  3. An "Available Simulations" dropdown will be populated with the names of all retrieved simulations.

    • A "✓" symbol next to a simulation name indicates that it has already been downloaded to your local machine.

  4. Select the desired simulation from the dropdown.

  5. Click the "Download Selected Simulation" button.

Download Button States

The download button's appearance and behavior will change based on the current status:

  • Download Selected Simulation (Green): The default state when a new, undownloaded simulation is selected.

  • Re-download Simulation (Yellow-Orange): This appears if the selected simulation is already present on your local machine. Clicking it will overwrite the existing data.

  • Downloading File... (Blue, Disabled): The button shows this state while the simulation's .zip file is being downloaded. A progress bar will be visible.

  • Extracting & Processing... (Orange, Disabled): After the download is complete, this state indicates that the files are being extracted and processed.

  • Select a Simulation First (Gray, Disabled): This is shown if no simulation has been selected from the dropdown.

File Storage

Downloaded and extracted simulation data is stored in the Application.persistentDataPath directory under a SimulationData subfolder. Each simulation's data is placed in a directory named after its unique simulationCode.

Last updated

Was this helpful?