Wizarding World Unity App Integration

Tech Holding builds an immersive, cross-platform Sorting Hat experience for Wizarding World using Unity 3D.

  • Product Design
  • Web Design

Challenges

  • Enhance mobile app by adding Sorting Hat Ceremony Experience.
  • Use Augmented Reality to provide an immersive experience.
  • A cross-platform development solution.

Solution

  • Utilize the Unity 3D game engine for developing mobile platforms.
  • Support both ARKit and ARCore.
  • Export Unity as a library.

Benefits

  • Immersive AR experience of Harry Potter’s Sorting Hat ceremony.
  • Unified AR experience across iOS and Android platforms.
  • Any changes done for one platform could be applied to the other with ease.
  • The final build can be exported as a library, which can then be integrated with the native app.

The Wizarding World App needed a module that could assign one of the four Hogwart Houses to the app user in the Harry Potter movie’s Sorting Hat ceremony. A magical hat is placed on the person and asks them a few questions. Based on the answers, the Sorting Hat chooses a house for that person. The user would experience this Sorting Hat Ceremony in Augmented Reality as part of the Wizarding World app.

Why use Unity?

Unity started as a game engine that supported many platforms, but with time it has produced a wide range of tools that also support Augmented Reality and Virtual Reality. In the context of game development, it requires audio, user controls, user interface, 2D and 3D graphics, and animations. To address each of these requirements, Unity has a specific module built-in. It also supports cross-platform development, thus allowing us to reuse the source code, graphics, 3D models, audio-video, and other artifacts, which saves time and money.

To make Sorting Hat a reality, we needed a 3D model of the actual hat with animation for the lips, eyes, and expressions. We also needed computer vision technology that could produce the final experience of a hat being anchored to the head of a user in the camera feed, and it needed to remain attached to make the user believe that he/she is wearing a virtual hat. Augmented Reality Framework is platform specific, so each platform implementation requires its own development team.

The Unity engine met all of these needs. It is capable of handling all the animations, audio syncing with lip animation, UI, 3D Models, etc. We could use it to produce interactable questionnaires for the user to answer. It has its own module to support Augmented Reality for ARKit and ARCore to cover both iOS and Android, and it provides a uniform cross-platform implementation of AR.

Most importantly Unity provides a new means of exporting the unity build as a library. This means the entire Unity payload is exported as a library, which could then be integrated with the Native (iOS / Android) projects to get the best of both Native and Unity features.

Unity vs. Other Game Engines

  • C# is a ‘managed language’ that can leverage automatic memory management.

  • .NET 4.6 runtime in unity supports the latest features in c#.

  • A complete suite of Profilers that enables debugging and helps target key regions for optimizations.

  • The engineer can use the editor to customize the implementation of inspectors, windows, and add unique tools to suit the workflow. 

  • Supports cross-platform development for 25 platforms.

  • Excellent support for both AR and VR development.

  • Unity’s Job System and Burst compiler helps take full advantage of modern hardware.

Best practices

  • Use Event and Delegates to ensure modularity and composition.

  • Emphasis on image size compression with respect to the target platform.

  • Instead of scene switching, load, and unload scene as per requirement.

  • Separate game artifacts to Asset Bundle so as to support on-demand resources.

  • Unit test for all the major components to validate the behavior.

  • Use atlas for reducing draw calls for UI, 2D, and 3D objects to improve performance.

  • Separate interface from game logic.

  • Use prefabs, scriptable objects, and configuration objects often.

  • Use Profiler and its specific module to target problem areas and rectify.

  • Ensure the usage of LZ4 and LZ4HC compressions to further reduce build sizes.

  • Automate the build process.

Implementation of Unity as Library

Unity 2019.3.x supports the process of exporting Unity Project as a Library instead of native build projects. When you export a Unity build, it automatically separates the game content to data folder and separately exports the unity framework. 

This data folder and unity framework can be integrated with existing Native project files (Xcode project for iOS and Gradle project for Android ) as simply as integrating plugins into the project.

Our Partners

By using this site, you agree to thePrivacy Policy.