Table of Contents

Block Viewer Tool (Unity Development)

The Block Viewer Tool (Unity Development) is an independent, lightweight functional module in Mega Studio, specifically designed for developers to directly view and preview completed Mega Blocks. It allows you to load, browse, and inspect Block data generated in the cloud directly within the Unity Editor. Additionally, it supports direct validation of positioning effects without requiring any code writing or running a full application.

Tip

This tool is designed for Unity developers. Compared to the EasyAR.Mega.BlockViewer tool, it additionally integrates a validation tool component. If you are a non-developer, it is recommended to use EasyAR.Mega.BlockViewer or EasyAR.Mega.Annotation directly.

Create the viewer tool

  • Right-click on a blank area in the Hierarchy panel, select EasyAR Mega -> Tool -> Block Viewer for Unity Developer (Edit Mode)

    Create block viewer

  • After adding, a new node named EasyAR.Mega.BlockViewer (Dev) will appear in the Hierarchy panel

    Node

Feature description

After creating the tool, you can configure it through the Inspector panel to load Block data, and export or control the display of models.

BlockViewer (Dev) node description

The EasyAR.Mega.BlockViewer (Dev) node, except for the validation tool, can only be used in the editor in a non-running state. This means you need to ensure the play button at the top of the Unity Editor is not pressed. As shown in the image below, the button should be in the right-facing triangle state, indicating it is stopped, for the tool to be usable.

During runtime, the tool-related nodes and data will remain in the scene and can be used with the validation tool, but all functions of the tool itself will be unavailable.

Node

Warning

If you need to package the developed Unity application to a mobile device, be sure to delete the EasyAR.Mega.BlockViewer (Dev) node from the scene before building. Otherwise, it may cause build failures or runtime errors.

Tool module description

  1. Login component

  2. Mega cloud service component

  3. Block data component

  4. Annotation toolkit component

  5. Validation tool component

    Tool modules