Create Location-Based AR Quickly and Easily (Unity + Lightship WPS)

  Рет қаралды 1,091

Alive Studios

Alive Studios

Күн бұрын

Thanks for watching my journey. I want to build the most exciting AR Experiences including games, movies and productive apps. My background is mainly in 2D / 3D Animation using Blender and After Effects, but I always loved the idea auf Augmented Reality. Furthermore I liked to code. So in late 2022 I decided to learn Unity and get deeper into AR Software Development. Let's see how far we can come :)
If you like my tutorials and videos, you can support me here:
www.paypal.com/donate/?hosted...
Timestamps
0:00 Introduction
02:45 Create new project
04:45 Place objects at preset locations
16:30 Let the player place objects
26:00 Final testing and outro
Video Tutorial for installing Lightship:
• How to make an AR App:...
Link and written instructions to install Lightship to Unity:
lightship.dev/docs/ardk/setup/
WPS Link:
github.com/niantic-lightship/...
zzzLog:
stackoverflow.com/questions/6...
Templates for playback (In editor testing with video):
drive.google.com/drive/folder...
My Lightship ARDK 3 Playlist:
• ARDK3 Tutorials
Niantic Wayfarer App:
testflight.apple.com/join/VXu...
play.google.com/store/apps/de...
Lightship ARDK Sample Package (Includes an invisible shadow catcher for the built in pipeline):
lightship.dev/docs/ardk/sampl...
3D Assets that are great for AR / VR purposes:
(The given links are part of Unity’s affiliate program and help support the channel at no extra cost)
Shadow catchers for URP:
URP Shadowcatcher (Free)
prf.hn/click/camref:1100lumXw...
URP Shadowcatcher:
assetstore.unity.com/packages...
Beautiful, Low-Poly Packs:
Low Poly Hummingbird, Animated:
prf.hn/click/camref:1100lumXw...
Low Poly, Animated Dinosaurs:
assetstore.unity.com/packages...
Low Poly, Animated Animals:
assetstore.unity.com/packages...
Low Poly Jungle:
assetstore.unity.com/packages...
Low Poly Forest:
assetstore.unity.com/packages...
City Pack:
Knight & Medieval small pack:
prf.hn/click/camref:1100lumXw...
Fantasy Kingdom:
assetstore.unity.com/packages...
Dungeon Realms:
assetstore.unity.com/packages...
Explorer Character Pack:
assetstore.unity.com/packages...
VFX ( Particles, Fire, Magic, Smoke etc.)
Epic Toon VFX
assetstore.unity.com/packages...
Convert Terrain to Mesh (For Transforming a Terrain to view in AR):
assetstore.unity.com/packages...

Пікірлер: 19
@AliveStudios_
@AliveStudios_ Ай бұрын
IMPORTANT ADDITION: 👉🏽 For the seconds part, letting the user place the objects, you can also use the ARWorldPositioningCameraHelper to make your life easier. It will let you automatically access the current GPS coordinates of your camera. The ARWorldPositioningCameraHelper is being automatically attached in play mode to your camera under XR origin when using Lightship WPS . You can simply create a reference to it and then use the latitude and longitudes values from the ARWorldPositioningCameraHelper to spawn the objects. The whole script could look like this: using System.Collections; using System.Collections.Generic; using UnityEngine; using Niantic.Experimental.Lightship.AR.WorldPositioning; using Niantic.Experimental.Lightship.AR.XRSubsystems; using UnityEngine.UI; public class AddWPSObjects : MonoBehaviour { [SerializeField] ARWorldPositioningObjectHelper positioningHelper; [SerializeField] private ARWorldPositioningManager _positioningManager; [SerializeField] private Button button; //Add some random materials [SerializeField] private List cubeMaterials; //Reference the helper private ARWorldPositioningCameraHelper _arWorldPositioningCameraHelper; void Start() { //Find the helper in the scene _arWorldPositioningCameraHelper = FindObjectOfType(); button.onClick.AddListener(SpawnObjectAtPosition); _positioningManager.OnStatusChanged += OnStatusChanged; } private void OnStatusChanged(WorldPositioningStatus obj) { Debug.Log("WPS Status Changed " + obj); } void SpawnObjectAtPosition() { //Use it to determine the GPS position double latitude =_arWorldPositioningCameraHelper.Latitude; double longitude = _arWorldPositioningCameraHelper.Longitude; double altitude = 0.0; GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.GetComponent().material = cubeMaterials[Random.Range(0, cubeMaterials.Count-1)]; cube.transform.localScale *= .75f; positioningHelper.AddOrUpdateObject(cube, latitude, longitude, altitude, Quaternion.identity); Debug.Log("Placing Object at: latitude:" + latitude + " longitude: " + longitude); } }
@justapasserby445
@justapasserby445 Ай бұрын
tq bro
@RoRo-rg2vr
@RoRo-rg2vr Күн бұрын
Assets\PreplaceWorldObjects.cs(36,34): error CS0246: The type or namespace name 'ARWorldPositioningStatus' could not be found (are you missing a using directive or an assembly reference?) I have this error when i try implementing the first script. WHat could be the cause
@user-xn7yt3oy7z
@user-xn7yt3oy7z 2 күн бұрын
Thanks for the tutorial! I tried this, but only the second script works properly. I want to pre-place some objects though. I have no errors, but the objects still don't appear on the device. However, when I playtest in Unity, the debug.log statements seem to work well (Placing object at longitude X and latitude Y appear). A bit late, but any suggestions?
@AliveStudios_
@AliveStudios_ Күн бұрын
Hi mate :) So if I get you right, pre-placing objects does not work for you, because the 3D Objects do not appear at their corresponding positions on device? Did you make sure to set in the Camera settings 14:08 the clipping plane option to 500, or even better something like 10.000 ?
@user-xn7yt3oy7z
@user-xn7yt3oy7z 11 сағат бұрын
@@AliveStudios_ Hi, thanks for taking the time to reply! I had already set the clipping planes to 10000. My problem is that I am not sure if the loop that spawns the object actually works, because on the android device, the only log that appears is the: Status changed to available. When I run the game on Unity however, the game window shows the following logs: -Status changed to initializing. -[Warning] Package “Lightship World Positioning System (WPS) Plugin" has no loader metadata. Skipping loader initialization. (I saw on the site for ARDK 3.6 Release notes that this error is benign and can be ignored, so I am not sure if that’s the issue). However, in the editor window in Unity, the following debug statements appear: -Added object at latitude X and longitude Y. -Status changed to initializing. -Plugin Lightship World Positioning System (WPS) Plugin" has no loader metadata. Skipping loader initialization.
@aarongreen4432
@aarongreen4432 Ай бұрын
So i tried this and added the zlog as nothing was appearing, I've checked all the permissions etc, but im getting the error no tracking and no gnss. Any ideas?
@AliveStudios_
@AliveStudios_ Ай бұрын
hmm, so if you made sure that you have a good 4G / 5G on your phone it should usually work. Is there any way you can try this on another phone and see if you got the same error?
@raizel420
@raizel420 Ай бұрын
is it possible to create a game using your tutorial in tiktok effect house?
@AliveStudios_
@AliveStudios_ Ай бұрын
Hey :) So this Tutorial can be used to create a standalone game for the play store or App Store, which you could probably advertise on your TikTok account . While it is also possible to create games in effect house , as far as I am concerned, it is not possible to create AR games.
@raizel420
@raizel420 Ай бұрын
@@AliveStudios_ thanks
@justapasserby445
@justapasserby445 Ай бұрын
Hi sir sorry for bothering may I know how to set the aspect ratio into iphone? because I search google I just cant search it....
@AliveStudios_
@AliveStudios_ Ай бұрын
Hey mate :) It is not necessary to set it to iPhone, you can also set it to any android phone you like :). Most likely you do not see iPhone as your build target is set to Android
@justapasserby445
@justapasserby445 Ай бұрын
@@AliveStudios_ but I have non 😓.. I install unity and I have non of it😓
@AliveStudios_
@AliveStudios_ Ай бұрын
@@justapasserby445 When you click on file (top right) build settings , do you see android or iOS being selected?
@justapasserby445
@justapasserby445 Ай бұрын
@@AliveStudios_ yea I select android in the build settings but I didnt saw any option for me to choose any android phone. its a SDK right? but I saw nothing. I saw run device, default device.
@justapasserby445
@justapasserby445 Ай бұрын
@@AliveStudios_ at 3:53 I saw you have a lots of selection but for me I have non of android and iphone at all, I search google but google didnt have the answer..
How to build AR Apps fast (Unity + Lightship Samples)
15:27
Alive Studios
Рет қаралды 583
Build location-based AR experiences at world scale
12:44
Google for Developers
Рет қаралды 21 М.
Unity AR+GPS Location - Web Editor
7:37
Unity AR GPS Location
Рет қаралды 73 М.
How I created an AR Game in 2 days (Unity + Lightship)
7:48
Alive Studios
Рет қаралды 461
Mobile Augmented Reality: Web vs App
5:55
WeAR Studio
Рет қаралды 38 М.
Let's Make a VR Game Part 9 - Start Menu
11:38
Valem Tutorials
Рет қаралды 12 М.
How To Get Started With Niantic Lightship VPS In Unity
7:40
Dilmer Valecillos
Рет қаралды 7 М.
Building Runtime UI with UI Toolkit In Unity
21:35
Game Dev Guide
Рет қаралды 31 М.
Never Wait For Compilation AGAIN! (Unity Fast Script Reload)
4:42
Explore Earth Augmented Reality Sample
1:34
Magic EdTech
Рет қаралды 42 М.
Modeling: Prisma 3D Beginner tutorial ep3
5:43
Remote Animation
Рет қаралды 96 М.
ОБСЛУЖИЛИ САМЫЙ ГРЯЗНЫЙ ПК
1:00
VA-PC
Рет қаралды 1,2 МЛН
Как слушать музыку с помощью чека?
0:36
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Кинг Комп Shorts
Рет қаралды 868 М.
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 25 МЛН
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 2 МЛН
Main filter..
0:15
CikoYt
Рет қаралды 16 МЛН