Git Product home page Git Product logo

ar-template's Introduction

Unity AR Project Template

Start a new Unity AR Foundation project using this template.

Getting Started

This template is preconfigured for AR Foundation 5.1.0-pre.4 which includes the XR Simulation Environment for fast iteration of your project. It also includes the XR Interaction Toolkit 2.3.1 to quickly add interactable functionality to augmented reality projects.

Prerequisites

 - Git client
 - Unity Editor version 2023.1.0b1 or newer

Installing

Follow these steps to create a project from this template and get it running in Unity on your computer.

  • Click Use this template button in the upper right of the Github page where you found this
  • Configure your repository and click Create repository from template
  • Clone your new repository to your machine
  • In Unity Hub, click Add project from disk
  • Open your project in Unity!

Usage

This project includes basic XR Simulation and a simple XR Interactable to demonstrate simulating augmented reality within the Unity editor.

There are two buttons on the AR Session in the project hierarchy:

  • Enable Touch Simulation - use this when you want to interact as if you were touching the screen of a mobile device
  • Disable Touch Simulation - use this when you want to "fly" around the simulation as if you were moving a mobile device through space

Note: You can move the buttons to any GameObject you like by adding the Tools script to it.

When Touch Simulation is disabled, hold down the right mouse button and rotate the mouse to rotate the view.

While holding down the right mouse button:

  • Use WASD to move forward, left, back, and right respectively
  • Use Q and E to to lower and raise the simulated device height respectively

Run the project

  • Fly around the simulation to detect planes in a simulated backyard environment
  • Enable Touch Simulation (see above)
  • Click a detected plane in the editor - a cube should be placed where you click
  • Click the cube to select it - a semi-transparent cube should appear around the selected cube
  • Click the selected cube and drag it - it should move within the bounds of the detected plane

Note: If your simulated environment includes horizontal and vertical planes, and they've been detected in a way that they touch, you should be able to drag the selected cube between them.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

ar-template's People

Contributors

jasonspatial avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.