Skip to content

YevenLourance/Portable-Augmented-Reality-Based-Multi-User-Data-Exploration-Experience

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Portable Augmented Reality-Based Multi-User Data Exploration Experience

[This software now supports new ARKit functionality exposed in Unity ARKit Plug-in 2.0 Beta.]

This is a native Unity plugin that exposes the functionality of Apple ARKit SDK to your Unity projects for compatible iOS devices. This documentation assumes that the developers are familiar with Unity software and ARKKit framework. It includes ARKit features such as world tracking, pass-through camera rendering, horizontal and vertical plane detection and update, face tracking (requires iPhone X), image anchors, point cloud extraction, light estimation, and hit testing API to Unity developers for their AR projects. This plugin is a preview quality build that will help you get up and running quickly, but the implementation and APIs are subject to change. Nevertheless, it is quite capable of creating a full featured ARKit app, and hundreds of ARKit apps on the AppStore already use this plugin.

The code drop is a Unity project, and it is only compatible with Unity 2017.4. The coding project is based on the example in CaptainsMess The network connection is currently use the High-Level-API

Requirements:

  • Unity v2017.4
  • Visual Studio 2017 or later
  • Apple Xcode with latest iOS SDK that contains ARKit Framework
  • Apple iOS device that supports ARKit (iPhone X)
  • Mac support latest OS operating system
  • Apple [iOS 11.3 or later] installed on device
  • Unity ARKit-Plug-in master version
  • Network support multi-user protocol

Building

Downloading the file and open this whole project in Unity version 2017.4. Notice that this artefact is over 1.1GB. Choose build settings to iOS platform in Unity and compile the code in XCode. Set the certification into another string and player setting versions to iOS 12. (explain the detailed string and give example) After this project has been built, users can directly open [Unity-iPhone.xcodeproj] test module. Click the project name and then in develop group, set the individual icloud account as developer certification. In XCode, the codes are compiled to Objective-C. Users can deploy the code on several iPhones and open the app to create shared session.

API

Here shows the steps need to be set by Unity Network and high level API.

AutoConnect() starts joining or hosting as appropriate. This is what Spaceteam does when you dial "Play".
StartHosting() starts hosting a game as the server
StartJoining() starts joining any servers it finds, but will not host
Cancel() aborts the connection or disconnect from a lobby
Players() returns a list of all the connected players
LocalPlayer() returns the player associated with the local device
AreAllPlayersReady() returns true if all players have marked themselves ready
CountdownTimer() returns the remaining time in the countdown (or 0 if the countdown is not running)
IsConnected() returns true if connected to other devices
IsHost() returns true if this device is the host/server
StartLocalGameForDebugging() is the same as StartHosting but temporarily sets minPlayers to 1 so that you can start a single-player game
FinishGame() call this when your game is over if you want to return to the lobby with the same players
ForceServer(bool forceServer) give the device a high 'serverScore' so that it will be preferred when choosing a server

SendReadyToBeginMessage() Tell the server that this player is ready
SendNotReadyToBeginMessage() Tell the server that this player is NOT ready
OnClientReady(bool readyState) Called when the player's ready state changes
OnClientEnterLobby() Called when the player enters a lobby
OnClientExitLobby() Called when the player exits a lobby
CaptainsMessListener callbacks

OnServerCreated() (Server only) Called after the server has started so you can do additional setup (eg. spawn network objects)
OnStartGame(List) (Server only) Called when all players are ready and the countdown has finished. This is when your game should take over do whatever it needs to.
OnAbortGame() (Server only) Called if any player disconnects after the game has started. You should end your game at this point. At the moment there is no support for disconnecting/reconnecting while a game is in progress.
OnCountdownStarted() (Server only) Called when all players have marked themselves ready
OnCountdownCancelled() (Server only) Called if any player stops being ready during the countdown
OnJoinedLobby() Called when the player joins a lobby
OnLeftLobby() Called when the player leaves a lobby or is disconnected
OnStartConnecting() You can override this if you want to show feedback that the game has started the connection process
OnStopConnecting() You can override this if you want to show feedback that the game has stopped the connection process
OnReceivedBroadcast() You can override this if you want to show feedback about the network traffic
OnDiscoveredServer() You can override this if you want to show feedback about the network traffic.

Useful components

ARKit

I use the ARWorldTracking, ARAnchor and ARSession in Unity ARKit Plug-in package.

Unity

I use the high level API and I set the network manager and lobby manager to control the network.

ARKit 2.0 Beta Update

The ARKit package is based on Unity ARKit-Plug-in 2.0 Beta. It could be updated after each iteration. The Asset file can be updated after each update.

Demo for this app

demo

The detailed demo operations are videoed in the link https://www.youtube.com/watch?v=5a-Ffet1rVk

Questions? Bugs? Showcase?

Contact Zeruo.Liu@anu.edu.au if there are some questions

Reference

https://github.com/hengineer/CaptainsMess

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors