Tutorial: Creating Interactive Objects in Unity for Micrsoft Mesh

Christian GlessnerTutorial

Welcome to another tutorial from ilovemesh. Today’s video focuses on making objects interactable in Unity, demonstrated by recreating a chess game. Follow our comprehensive step-by-step guide and create your own interactive game in Unity for Microsoft Mesh.  

Stey-by-Step Guide

Step 1: Using Unity Asset Store 

Start in the Unity Asset Store. Look for a free package suitable for your project. Pay close attention to the licensing terms.  

Click “add to my assets” and accept the terms and conditions.  

With Unity running in the background, click “open in Unity”. This action brings you to the Unity Package Manager, prepped for importing the package.  

Step 2: Organizing Project Structure 

In Unity, reorganize your project for efficiency. Move materials, textures, and prefabs from the plugin folder to the project folder. Organize these elements into subfolders. 

While this step is optional, it becomes beneficial even for sample-sized projects. The video tutorial below fast-forwards through this reorganization process.

Step 3: Material Conversion  

Convert default materials to the Universal Render Pipeline (URP). Benefit from your organized project structure by selecting all materials simultaneously for editing.  

Click “Edit” ->  “Rendering” ->  “Materials” then “Convert Built-in to URP Materials”. Confirm the conversion by checking the spherical material previews.  

Step 4: Organizing the Scene

Add all prefabs to your scene. Similar to project structure, tidy up the scene hierarchy. This step involves personal preferences. 

Start with an example scene from the plugin and reorganize it into your scene. Address an issue with the Rooks and Knights prefab. They are instantiated as models rather than prefabs, which needs correction.  

Tip: When moving objects in Unity, hold down “Control” for grid snapping, making positioning easier.  

Step 5: Making Chess Pieces Interactive  

Select all chess piece prefabs, excluding the board. Add a Mesh Interactable setup component, Rigidbody, and Mesh Collider to all prefabs. 

Set Collision Meshes to “Convex” for better performance and physics stability. Modify one component to be manipulatable and copy this change to all other prefabs.  

Step 6: Testing and Finalizing 

Fix any remaining issues. Move the chessboard, rescale the ground plane, and adjust positions to prevent clipping. Press “Play” to preview your interactive chess game. Experience it like a real board game, with flexible rules and interactions.  

Ensure everything works as expected. This setup demonstrates how gamification can be integrated into serious environments with minimal effort and no coding, thanks to Microsoft Mesh. If you’re interested in learning more about Microsoft Mesh, check out our YouTube channel and our LinkedIn Community Group.  

Video Tutorial