Skip to content

Getting Started

Michael Starrett edited this page Apr 5, 2019 · 2 revisions

Getting Started

Open the existing Landmarks-Master unity project

  1. Fork, clone, or download the repository here
  2. Open the project in Unity 2018.3.1f1 or later
  3. That's it! Use the existing simpleSample_GettingStarted.unity scene (Assets/Landmarks/Samples/) or create your own new scene following the guidelines below. All the required packages for Landmarks to work should already be included in the project folder.

Create/Prepare a virtual environment for Landmarks (Environment child gameObject of the Landmarks Prefab)

  • Create a new scene
  • Delete the main camera prefab and the directional light (there's one included in the Landmarks prefab)
    • NOTE: if using an existing scene, delete any player controllers, directional lights, cameras, etc. that are not part of the environment
  • Drag and drop the Landmarks prefab (Landmarks/Prefabs/Landmarks.prefab)
  • Populate the Environment gameObject (child of the Landmarks prefab, with filler props (non-target buildings, sidewalks, streets, trees, etc.)
    • NOTE: Don't create or place any actual navigation targets. Just aesthetics for now.
    • If you are using an existing environment, move all non-target environment objects onto the Environment object
    • You may wish to organize aspects of the environment via additional empty child gameObjects of LM_Environment (e.g., an empty "NonTargetBuildings" gameObject as a child of LM_Environment that contains any building/house/store prefabs/gameObjects that are not going to be targets for navigation/memory)
    • Important - Be sure to tag all of these objects as "props" in the Inspector
  • Place empty game objects (or, if all your targets are identical, a blank prefab of your target object) as children of the TargetLocations gameObject.
    • NOTE: These are not your actual targets, but merely placeholders that facilitate Landmarks ability to flexibly populate targets in predefined or randomized order (depending on your experimental design/needs) targets in the environment
    • Ensure that the empty or placeholder object has the correct Transform (local position and rotation) that you want the populated target to have when the experiment begins (this is why it is good to use an empty target prefab)
    • Select all of your TargetLocations children and add them to the "Targets" Layer in the inspector
    • Be sure that each of these objects has a unique name or Landmarks will throw errors when populating targets
  • Add gameObjects that will serve as navigation/memory targets as children of the "TargetObjects" gameObject.
    • If using an existing environment, make your target gameObjects children of the TargetObjects gameObject
    • Once finished, select all of these objects use the Inspector to tag them as "Target" and place them in the "Targets" layer
    • Ensure that each of these gameObjects are outside the environment and the view of any cameras
  • In the MapTestPlaceHolders gameObject (8 children by default when using the Landmarks prefab)...
    • Adjust so the number of children matches TargetObjects and TargetLocations
      • If your environment has less than 8 targets, remove children (beginning with the last child) until there are the same number of children as TargetObjects and/or TargetLocations
      • If your environment has more than 8 targets, duplicate the last child and adjust it's transform to be consistent with the other children. Repeat until there are the same number of children as TargetObjects and/or TargetLocations
    • Adjust the position to be just outside the environment. This allows mapTask functionality.
  • In the MapTestHighlights gameObject (8 children by default when using the Landmarks prefab)...
    • Adjust so the number of children matches MapTestPlaceHolders, TargetObjects, and TargetLocations
      • If your environment has less than 8 targets, remove children (beginning with the last child) until there are the same number of children as TargetObjects and/or TargetLocations
      • If your environment has more than 8 targets, duplicate the last child and adjust it's transform to be consistent with the other children. Repeat until there are the same number of children as TargetObjects and/or TargetLocations
    • Ensure that each of these gameObjects are outside the environment and the view of any cameras

Set up your experiment (Experiment child gameObject of the Landmarks Prefab)

  • Select LM_Experiment in the Hierarchy (child of Landmarks gameObject prefab) and use the Inspector to select the desired user interface from the dropdown menu (User Interface enum on the Experiment (Script) component of LM_Experiment
  • Expand the LM_Timeline component, which reveals an ordered list of the experiment procedure. The framework functions in essentially 4 loops (practice, pre, main, and post). Each loop is represented by a gameObject by that same name.
    • Drag and drop experiment prefabs onto any of the task loops and configure them based on the documentation for that task prefab.
  • NOTE: The Landmarks prefab comes with the NavigationTask prefab (Landmarks/Prefabs/NavigationTask.prefab) preconfigured on the MainTaskLoop. If you have followed this guide correctly, so far, you should now be able to run a basic navigation task in your scene and get output as a log file (In your project folder, you will find a file named test.log in the following path: ProjectFolder/data/tmp/test.log)
    • This task can be moved to any of the four task loops without need for any additional changes. It can also be removed and replaced with other tasks, or have additional tasks placed on the same loop.

NOTICE This guide is a living document. If you have any questions or issues, please let us know by emailing Mike Starrett at mjstarrett@gmail.com.

You can’t perform that action at this time.