Unity 2018 Augmented Reality Projects by Jesse Glover
Author:Jesse Glover
Language: eng
Format: epub
Tags: COM057000 - COMPUTERS / Virtual Worlds, COM012040 - COMPUTERS / Programming / Games, COM051310 - COMPUTERS / Programming Languages / C#
Publisher: Packt Publishing
Published: 2018-07-30T06:54:06+00:00
For Unity specifically, plugins allow us to directly interface with native calls and use them as we wish in our application or games. Many developers tend to create plugins with native system calls to extend the render pipeline or for enhancing shaders.
It is important to note that there are two very distinct plugin types available to use in Unity. Those two types are Native Plugins and Managed Plugins. A very simplified explanation of the difference between native and managed plugins is that native plugins are for low-level calls, and managed plugins are an easy way to hide source code.
There is, however, a more nuanced differentiation between them than this old adage.
A managed plugin can and will easily hide source code from prying eyes when a developer wants to sell something in the asset store. It can also be used to include libraries and frameworks that are not otherwise readily available to Unity. For example, a developer could import the Entity Framework dll files into Unity and utilize the Entity Framework to create, manage, and handle database code with Unity. The final thing that a managed plugin can do is allow a developer to utilize some .NET languages and compilers that are not supported by Unity, such as F#, JScript, IronPython, ClosureCLR, or even Powershell. For example, a developer could create a plugin for Unity that allows for scripting in IronPython, or they could write game code using IronPython and import it as a plugin and use it without issues.
A native plugin, on the other hand, is profoundly more powerful. A native plugin normally consists of using Java, Swift, Objective-C, or C++ to access the direct hardware of their respective devices and provide functionality that a developer could otherwise not have access to within Unity. Let’s say a developer is working with a device that connects to a smartphone that is not normally present in smartphones; in this case, we will go with the BACtrack Mobile Pro as our example.
The BACtrack Mobile pro is a police-grade breathalyzer that can check a user’s blood alcohol content and send that information to a device via Bluetooth connections. This developer wants to make a drinking-style AR game, and they want to make the game harder, the higher the end user’s BAC level is. This developer would need to use a native plugin to gain access to the BACtrack device’s sensors' results.
Now that a firm understanding should have been gained from this explanation, we can finally start looking at the structure of a plugin for C++, Swift, C#, and Java. What we will do is create a very simple plugin that will simply add two numbers together. This is to keep things simple and allow for the flow of steps for the overall workflow to be much more easy to follow.
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(12569)
Hello! Python by Anthony Briggs(9914)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9777)
Dependency Injection in .NET by Mark Seemann(9337)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8296)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7763)
Grails in Action by Glen Smith Peter Ledbrook(7696)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Becoming a Dynamics 365 Finance and Supply Chain Solution Architect by Brent Dawson(7062)
Microservices with Go by Alexander Shuiskov(6824)
Practical Design Patterns for Java Developers by Miroslav Wengner(6741)
Test Automation Engineering Handbook by Manikandan Sambamurthy(6684)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6413)
Angular Projects - Third Edition by Aristeidis Bampakos(6088)
The Art of Crafting User Stories by The Art of Crafting User Stories(5615)
NetSuite for Consultants - Second Edition by Peter Ries(5554)
Demystifying Cryptography with OpenSSL 3.0 by Alexei Khlebnikov(5356)
Kotlin in Action by Dmitry Jemerov(5062)
