0% found this document useful (0 votes)
5 views15 pages

Virtual Technology - Module 2

The document outlines the requirements and steps for setting up an Augmented Reality (AR) application in Unity, including necessary hardware specifications and software packages. It provides detailed instructions on creating a new project, downloading assets, configuring settings, and scripting for functionality. Additionally, it includes links to resources and videos for further guidance throughout the process.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views15 pages

Virtual Technology - Module 2

The document outlines the requirements and steps for setting up an Augmented Reality (AR) application in Unity, including necessary hardware specifications and software packages. It provides detailed instructions on creating a new project, downloading assets, configuring settings, and scripting for functionality. Additionally, it includes links to resources and videos for further guidance throughout the process.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

VIRTUAL TECHNOLOGY ONLINE TRAINING

Module 2: AR Application Set Up in Unity


Requirements:

• An Android device (tablet or smartphone).


• A laptop with appropriate specifications.
Minimum Laptop Specifications for Unity:
Processor (CPU):
o Intel Core i3 or AMD equivalent (multi-core processor with 64-bit support).
Graphics Card (GPU):
o Integrated graphics like Intel HD Graphics 5000 or better.
o Dedicated GPUs are not required for basic projects but are highly recommended for 3D
projects or larger scenes (e.g., NVIDIA GTX 900 series or better).
RAM:
o At least 8 GB of RAM (4 GB might run Unity but will struggle with performance).
Storage:
o SSD (Solid State Drive) with at least 10-20 GB free for Unity installation and small
projects.
o HDDs are slower but can suffice for light use.
Operating System:
o Windows 10 (64-bit) or newer.
Screen Resolution:
o Minimum 1280 x 720 resolution, though higher resolutions are better for productivity.
DirectX Version:
o DirectX 11 capable GPU.
.
Link to AR video guide: Watch here.
Instructions:
1. Create a New Project
Refer to the video guide here (1:30 – 1:58) for detailed steps.

2. Download Required Packages, Assets, and Resources


Follow the video (1:59 – 2:47) to download all necessary files to create the AR application.

Open the Package Manager to locate the required packages


Install the AR Foundation package.

Install the ARCore XR Plugin


3. Download Additional Assets

Link to download Image:


[Link]
eebb6242d7b654ac6c0ed94cce2ad088337a686dbca480913257b862fe1511330dd9e212e9be8
[Link]

Link to download 3D Dragon:


[Link]
79398
Link to download Joystick Pack: [Link]
management/joystick-pack-107631

4. Import Assets into Unity


Refer to the video (2:48 – 3:16) to import:

Import the 3D Dragon asset.


Import the Joystick Pack.

Import the image downloaded.


5. Configure Android Platform Settings
Switch the platform to Android (Refer to the video: 3:17 – 4:06).

Make sure to change the Platform to Android.

Ensure the platform settings meet the requirements for smooth application building.
Activate XR Plug-in Management and select ARCore.

6. Set Up the Scene in Unity


Follow the video (4:07 – 5:07) for detailed instructions.

Remove the Main Camera (an AR Camera will be added automatically).


7. Add a New Script
Create a new component in Visual Studio called PrefabCreator (5:08 – 8:33).
SCRIPT:

using [Link];
using [Link];
using UnityEngine;
using [Link];

public class PrefabCreator : MonoBehaviour


{
[SerializeField] private GameObject dragonPrefab;
[SerializeField] private Vector3 prefabOffset;

private GameObject dragon;


private ARTrackedImageManager aRTrackedImageManager;

private void OnEnable()


{
aRTrackedImageManager = [Link]<ARTrackedImageManager>();
[Link] += OnImageChanged;
}

private void OnImageChanged(ARTrackedImagesChangedEventArgs obj)


{
foreach (ARTrackedImage image in [Link])
{
dragon = Instantiate(dragonPrefab, [Link]);
[Link] += prefabOffset;
}
}
}
8. Set Up the Dragon Prefab
Rescale the 3D Dragon model (Refer to the video: 8:34 – 9:32).

Rescaling the 3D dragon

9. Adjust the Dragon's Animations


Refer to the video: (9:33 – 11:01).

Adjustments on the animation of the 3D Dragon.


10. Create the Dragon Controller Script
Add joystick movement to control the rotation of the Dragon (11:02 – 14:52).

Script for Joystick movement to rotate the 3D Dragon.


SCRIPT:

using [Link];
using [Link];
using UnityEngine;

public class DragonController : MonoBehaviour


{
[SerializeField] private float speed;

private FixedJoystick fixedJoystick;


private Rigidbody rigidBody;

private void OnEnable()


{
fixedJoystick = FindObjectOfType<FixedJoystick>();
rigidBody = [Link]<Rigidbody>();
}

private void FixedUpdate()


{
float xVal = [Link];
float yVal = [Link];

Vector3 movement = new Vector3(xVal, 0, yVal);


[Link] = movement * speed;

if (xVal != 0 && yVal != 0)


{
[Link] = new Vector3(
[Link].x,
Mathf.Atan2(xVal, yVal) * Mathf.Rad2Deg, [Link].z);
}
}
}
11. Integrate the Joystick into the Scene and Configure It
Refer to the video: (14:53 – 15:58).
12. Build the Application File
Export the final application as an .apk file (15:59 – 16:45).
Create a dedicated folder for the AR .apk file.

Create a dedicated folder for the AR .apk file.

You might also like