Zephyrnet Logo

Using Unity MARS and Flutter to Author Cross-Platform Augmented Reality (AR) Experiences

Date:

Using Unity MARS and Flutter to Author Cross-Platform AR Experiences.

I previously experimented with combining the Unity game engine and Flutter (Google’s UI toolkit for natively compiled cross-platform apps) back in late 2019, early 2020; with mixed outcomes. At the time, I was working on an AR prototype using Vuforia, a framework for which a Flutter plugin wasn’t (and still isn’t) available. In any case Flutter is essentially a 2D platform while Unity is one of the most popular realtime 3D authoring tools. On the flip side, Unity has poor support for native-feel mobile interface. So, the combination of these two technologies should be a great match.

1. How VR could bring transhumanism to the masses

2. How Augmented Reality (AR) is Reshaping the Food Service Industry

4.ExpiCulture — Developing an Original World-Traveling VR Experience

5. Enterprise AR: 7 real-world use cases for 2021

I followed the beta releases of Unity MARS with great interest over the course of 2020. MARS is what Unity describes as a Professional-grade workflow for AR development. It enables AR developers to author complex, data-oriented apps, test within the editor without waiting for builds after code edits, and deliver apps with “ runtime logic that adapt responsively to the real world”

The MARS tool was adopted by the creative team behind the recent highly acclaimed Wallace & Grommet AR interactive storytelling app — The Big Fixup. Furthermore, the team behind the project, — a creative consortium of three British design/software companies, chose Flutter for the app’s user interface thus pursuing the embedded Unity-Flutter approach with seemingly great results. Product manager, Beth, at Fictioneers, the name of the consortium, described the goal of the project as :

I had previously experienced numerous challenges when I first experimented with the Flutter Unity Widget, including performance, Unity communication issues and general Unity version compatability issues. However, that was way back before the major 3.0.0 version was released in November 2020 which addressed much of these issues as well as a further version 4.0.0 in early March 2021 which included a number of critical fixes and performance issues with iOS among other improvements.

For my initial test I decided to use the example game provided within the Unity MARS package. There are several example scenes including a complex game which includes an animated robot who can move about on surfaces and even leap from one surface to another when there is no ground-level clear passage available. The robot collects floating gems which are also generated in the AR space. This seemed like a nice, relatively complex test case for me to experiment with.

For the purpose of a current project prototype I want to place floating virtual objects above the real-world ground.

There are a few things to look out for when using MARS and Unity/Flutter together generally. Here are a few of them which by noting them along the way, I hope may be useful for anyone running into these small but sometimes blocking gotchas.

Planes Visualizer Config
Planes Visualizer Plane Config
lintOptions { disable 'InvalidPackage' checkReleaseBuilds false }
def getNdkDir() { Properties local = new Properties() local.load(new FileInputStream("${rootDir}/local.properties")) return local.getProperty('ndk.dir') }

Here is a link to a demo of my experimentation using primitive 3D objects.

Unity MARS and the Flutter Unity Widget have each come a long way over the past 12 months, since I previously experimented with the approach. I found the process to be relatively straightforward and stable using Unity 2020 and Flutter 2.1. The MARS workflow really speeds up the early phase of the development process with the simulation environment without the necessity of new builds. Using MARS allows the developer to lay down the framework of a fully functional AR experience with the knowledge that adding new AR features/conditions such as weather detection, object recognition and so forth, in the near future, can be accommodated naturally into the workflow.

Coinsmart. Beste Bitcoin-Börse in Europa
Source: https://arvrjourney.com/using-unity-mars-and-flutter-to-author-cross-platform-augmented-reality-ar-experiences-6aec23a80ac1?source=rss—-d01820283d6d—4

spot_img

Latest Intelligence

spot_img