Image without caption
👋
Here are some instructions and examples project using the Augmenta Unity asset from the Unity asset store
⬇️
First, get the asset ! (free) 👉 Unity Asset store Augmenta plugin
⬇️
Then check the examples projects showing different use cases and techniques
Unity Augmenta example projectsUnity Augmenta example projects

Quick start

  1. Get the simulatorGet the simulator and use the Unity preset or OSC V2 with port 12000 (default)
  1. Start one of the Unity example projects
  1. Enjoy 🙂

Starting a project from scratch or adding to an existing project

  • Open your Unity scene and drop the Augmenta prefab (from Assets/Plugins/Augmenta/Prefabs) in it.
    • If needed, set the input port in the AugmentaManager script of the Augmenta prefab to your protocol port. (default is 12000)
  • Run the scene, you should see gizmos of your Augmenta scene and persons in the scene view. You can enable or disable debug objects with the Show Debug option of the AugmentaManager.

Using Custom Object Prefabs

To instantiate your own prefab on each Augmenta object, add your prefab to the Custom Object Prefab parameter of the Augmenta Manager.
You can change this prefab at runtime by calling the function ChangeCustomObjectPrefab(GameObject newPrefab) of the Augmenta Manager.

Using Custom Behaviours

You can implement custom spawn and destroy behaviours for your custom Augmenta objects by implementing the IAugmentaObjectBehaviour interface in a script of your object. If you do, its Spawn function will be called when the object is instantiated, and its Destroy function will be called when the object should be destroyed (i.e. when the corresponding AugmentaObject is destroyed).
Note that if you implement the IAugmentaObjectBehaviour interface, the AugmentaObject will NOT destroy your object when it destroys itself, instead it will call the Destroy function of the interface. You should handle the destruction of the custom object yourself in the Destroy() function of the interface.
An example use of the custom behaviours is shown in scene 10 - AugmentaObjectBehaviour.

Using Several Augmenta Streams

You can receive different Augmenta streams in the same Unity application as long as they are not on the same OSC port. You need to add an Augmenta prefab (i.e. AugmentaManager) for each incoming stream, then set each AugmentaManager ID and input port to listen to each protocol.