02 Importing Data from GAMA - project-SIMPLE/simple.toolchain GitHub Wiki

Importing Data from GAMA

The Unity template allows you import data from GAMA into Unity and use them to create gameobjects. It works in the same way as VR templates, with static data being sent: the user will need to define Unity properties in a GAMA model, and define which agents/geometries with which Unity properties she/he wishes to send data. The particularity of this tool is that it allows this import to be carried out from the Unity editor, thus preserving the geometries sent in the scene.

ExportDataFromGAMAToUnity

Using this tool requires to follow 4 steps:

  1. First step: open the model « Plugins models/LinkToUnity/Models/Utilities/SendGeometriesToUnity.gaml », and modify it to select the data to send to Unity as well as the unity properties attached to them. All the geometries that will be sent to GAMA have to be added by using the add_background_data_with_names action.

LoadingGeometries - GAMA

  1. Second step: run the experiment SendGeometriesToUnity.

  2. Third step: In Unity, "GAMA menu -> Load Geometries from GAMA", define the parameter and click on Import

LoadingGeometries - panel

  1. Fourth step: click « Ok » on the pop-up that appears and immediately add the player to the middleware. If you are too slow to add the player, it will be disconnected and the data will not be imported.

LoadGeometriesFromUnity - popup

LoadGeometriesFromUnity - middleware

⚠️ **GitHub.com Fallback** ⚠️