Skip to main content

Thing-max Tutorial

This tutorial will demonstrate how to create and use a Thing-max. For more information on a Thing-max and its components, check out this Thing-max overview.

Adding the Initial Assets

This tutorial will use a pre-made guitar 3D model that is configured to be a Thing-max.

Open an Experience

Creating a Thing with the Dev Kit requires an Experience. Open an Experience Unity project or follow the Getting Started tutorial to create a new one.

Import the 3D Model

Download this guitar 3D model Unity package: GuitarPackage.unitypackage

Right click anywhere in the Project window and select Import Package > Custom Package. Then select the downloaded GuitarPackage.unitypackage file. Make sure all assets are selected and click the Import button.

Import Model

Create a Thing-max Prefab

Click the plus sign at the top left of the Project window and then select Genies SDK > ThingMax-Template. Name the prefab Guitar Thing.

Create Prefab

Adding the Guitar to the Prefab

The Thing-max prefab has no model so it will need the guitar model to be added.

Open the Prefab

Double click the Guitar Thing asset to open the prefab view in the Scene window.

Open Prefab

Replace the Assets in the Prefab

In the Hierarchy window, expand the children of the Guitar Thing root object. Find and delete the [ReplaceWithAssets] object.

In the Project window, open the Experience > Guitar folder. Drag and drop the guitarModel asset into the prefab so it is a child of the ThingAsset object.

Replace Assets

tip

Use the F key shortcut to focus on the selected guitarModel object once its been added to the prefab because it is small and may not be visible by default.

Add Material to Guitar

In the Hierarchy window, expand the children of the guitarModel. Find and select the child object named guitarAcoustic_geo.

In the Project window, open the Experience > Materials folder. Drag and drop the guitarMaterial asset to the bottom of the Inspector window to add the material to the guitar model.

Add Material

Setting the Thing Asset Properties

The ThingAsset child object in the Thing-max prefab has properties to configure the protocols. These need to be updated with the guitar model references.

Set the Main Bounding Box

Select the ThingAsset object and open the Inspector window. There is a Thing Asset script component that contains a Main Bounding Box property. Drag and drop the guitarAcoustic_geo child object into the Renderers list.

Asset Box

Add Target to the Poke Animations

Under the Main Bounding Box property, there is a Poke In Animation and Poke Out Animation property. Drag and drop the Cog child object for the Target property for both animations.

Animation Target

Add Bone References

Under the Poke Animation properties, there are three bone Transform references required (Root, Cog, and Bind). Drag and drop the child objects into their respective properties.

Bone Reference

Add Poke Animations Reference

In the Hierarchy window, select the Poke object. In the Inspector window, drag and drop the ThingAsset object into the Poke In Animation Properties and Poke Out Animation Properties.

Poke Animations

Add Move and Fit Reference

Select the MoveAndFit object and add the ThingAsset object into the Bounding Box Properties.

Move Fit

Add Floating Idle Reference

Select the FloatingIdle object and add the ThingAsset object into the Target Property.

Floating Idle

Add Animated Idle Reference

Select the AnimatedIdle object and add the ThingAsset object into the Idle Animation Properties.

Idle Animation

Testing the Thing-max

The Thing-max configuration is now complete and the protocols are ready to be tested.

Open the Thing Checker Scene

In the Project window, open the Assets > GeniesSdk > ThingCheckingTools folder. Then double click the ThingMaxChecker scene to open it.

Checker Scene

Add the Guitar Thing to the Scene

Drag and drop the Guitar Thing prefab into the scene and make it is a child of the ThingMaxChecker inner object.

Drop Guitar

Test the Project

Enter Play mode. Select the Guitar Thing and test out each of the protocols to make sure they all work.

tip

Make sure the Game window is maximized for best results.

Using the Guitar Thing-max

Now that the guitar's Thing-max prefab is ready, you can use the Thing's protocols in the Experience.

Add the Genies SDK Prefab

In the Project window, open the ThingsUISelectionSample scene in the Assets > GeniesSdk > ThingSelectionUI folder. This is a sample scene that has logic to load a Thing and fit it into a bounding box.

Sample Scene

Add Guitar to User Thing

In the Hierarchy, select the User Thing object. Then in the Inspector window, add the Guitar Thing prefab to in the Local Things Prefabs property list.

User Thing

Test the Project

The Guitar Thing should load into the scene and fit into the bounding box.

Test Project

Conclusion

This tutorial of creating and using a Thing-max is now complete!

Check out the Submitting & Publishing Thing tutorial for more information on how to submit the Thing-max for review.