Migration from MAGES 4 to MAGES 5 (NXT)

This is a guide for users who want to migrate from using MAGES 4 to using MAGES 5 (NXT). In this guide, we will showcase how to import your assets from a MAGES 4 project to use with MAGES NXT as well as recreate Actions from MAGES 4 in MAGES NXT. In our case, we will use the Medical simulation sample as an example. It is recommended to follow this tutorial step-by-step.

Create your project with MAGES NXT

  1. Create a clean MAGES NXT project following the instructions in the MAGES NXT Installation guide. Ensure all issues are fixed before continuing.

  2. Although it’s optional, in order to add Multiplayer, make sure to follow the Multiplayer Setup.

  3. Once you are done, import the Empty sample scene as shown here in order to kickstart your project.

Importing from MAGES 4 to MAGES NXT

Import any of your MAGES 4 assets (e.g. models, materials, textures, prefabs) simply by drag and dropping them from their asset folder inside your MAGES NXT asset folder.

  • Importing Models from MAGES 4 Medical simulation sample.

../../../_images/models.png
../../../_images/blood_material_import.png

Here are a few things to look out for when importing from a MAGES 4 project:

  1. Import any assets you want from your old project however, some of the scripts may not be supported, and you may get the missing script warning. In that case, you may need to recreate that specific script.

../../../_images/missing_script.png

Note

You may get missing scripts, especially for multiplayer objects, as in MAGES NXT the objects don’t need an individual multiplayer script in order to work. Please delete the missing references.

  1. When you import your project to MAGES NXT, you might have to recreate or delete certain assets that are missing or modified in MAGES NXT.

../../../_images/missing_assets.png
  1. Don’t import any old ActionScripts from MAGES 4 to MAGES NXT as they are not supported anymore. In the next section, we will show you how to create Actions from scratch with the Scenegraph.

../../../_images/error_scripts.png

Action creation with MAGES NXT

We will now set up the Scenegraph and recreate the old actions with MAGES NXT.

  1. Navigate to MAGES > MAGES Panel

../../../_images/click_mages_panel.png
  1. Click on Scenegraph Editor.

../../../_images/click_scenegraph_editor.png
  1. Now you can easily create any action you want with the Scenegraph editor.

../../../_images/scenegraph_opened.png

Warning

Make sure you have selected the correct Scenegraph; in our case, it’s the Empty Scenegraph from the Empty Project.

  1. Now you can close the MAGES panel and start experimenting with the Scenegraph. For starters, you can create two simple Actions.

The Question Action. MAGES 4 vs MAGES NXT
Info
  • With the Question: Which is the correct tool to perform a skin incision?

  • Wrong Answers: Cautery, Luar, Drill. Right Answers: Scalpel.

With MAGES 4
  • You would need to create a script, with its class inheriting from its parent Action:

../../../_images/question_script.png
  • As well as create a separate question prefab.

../../../_images/question_prefab.png
With MAGES NXT
  • Simply right-click in the scenegraph and you are ready to start setting up your Action.

../../../_images/question_action3.png
../../../_images/magesnxt_question.png
The Insert Action. MAGES 4 vs MAGES NXT
Info
  • The Insert Object (Initial position) will be at the table.

  • The Final Position will be on top of the Hand of the Patient.

With MAGES 4
  • You would need to manually set the initial and the final position of the Insert Action as well as its Hologram.

../../../_images/insert_action.png
With MAGES NXT
  • Simply drag your prefabs to the respective field, with the Hologram being generated automatically.

../../../_images/choose_insert.png
../../../_images/insert_action_nxt.png

Follow these tutorials to create these Actions, Question Action and Insert Action.

Note

The scenegraph is no longer saved in a .xml file, so there’s no need to import it into the new project anymore.

  1. If you created these Actions, the rest of the Actions should be pretty easy to replicate; simply follow any of the respective tutorials here.

With this, you can easily recreate any simulation from MAGES 4 in MAGES NXT.

Analytics with MAGES NXT

The Analytics Editor has also seen massive upgrade with MAGES NXT. Although its concept is the same there are some key differences:

  1. You cannot import Analytics from MAGES 4 to MAGES NXT instead you will to recreate them with the Analytics Editor which has been integrated inside the MAGES Panel.

With MAGES 4
  • Messy and convoluted UI.

../../../_images/old_analytics.png
With MAGES NXT
  • Clean and straightforward to use UI.

../../../_images/analytics.png

2. UI is now split with 3 categories, Errors, Objectives and Events. You can now aside from Errors, setup Events that lets you add extra details to your analytics using key-value pairs tied to specific actions, as well as Objectives to define overall goals for an entire operation, evaluated upon completion.

With MAGES 4
  • Limited to basic Errors.

../../../_images/limited_analytics_old.png
With MAGES NXT
  • Offers three distinct categories which can be used to create complex scoring and evaluation systems.

../../../_images/errors.png
../../../_images/objectives.png
../../../_images/events1.png

To start adding your own Errors, Objectives and Events start by taking a look at these tutorials Errors, Objectives and Events.

Important

Its also important to note that its possible to now create your own custom Errors, Objectives or Analytics.

UIs with MAGES NXT

UIs are greatly simplified with MAGES NXT.

  1. For a simple button you would need:

With MAGES 4
  • You need a Rigidbody.

  • You need a Box collider.

  • MAGES Interactable Item.

../../../_images/old_ui.png
With MAGES NXT
  • You only need the MAGES Graphic Raycaster to be able to use Unity’s system to interact with the UI.

../../../_images/new_ui.png

Check out the documentation about interaction with UI.

Setup the players Rig with MAGES NXT

In MAGES NXT the players rig is automatically generated as long as:

  1. There is a Camera in the scene with the MainCamera Tag.

../../../_images/camera_in_scene.png
../../../_images/camera_tagged_with_maincamera.png
  1. Auto Start is checked in the Hub Editor.

../../../_images/checked_autostart.png
  1. Automatic Player Rig Setup is checked in the Interaction System Module.

../../../_images/checked_automaticrig.png

Important

  • 2DoF is not supported in MAGES NXT. Use Mobile3D instead for mobile devices.

  • The XRrig will spawn at the position of the Camera.

Select your Camera according to this guide and you are ready to play.