Unity Examples



With Unity’s new high-performance, multithreaded - Richard Harrison, Technical Director on Hardspace: Shipbreaker

AR Foundation Samples. Example projects that use AR Foundation 4.2 and demonstrate its functionality with sample assets and components. This set of samples relies on five Unity packages. For the past two centuries, composition handbooks have insisted that unity is an essential characteristic of an effective text.Professor Andy Crockett points out that the 'five-paragraph theme and current-traditional rhetoric's emphasis on method reflect further the expediency and utility of unity.' A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate in the Unity community. With Unity’s new high-performance, multithreaded Data-Oriented Technology Stack (DOTS), you will be able to take full advantage of multicore processors and create richer user experiences and C# code that’s easier to read and reuse across.

Tic Toc Games

Learn how Tic Toc was able to iterate faster and easily reuse their code across projects while improving player retention, device battery lifetime, and thermal control.

Far North Entertainment

This studio achieved a x2250 speed-up with the Entity Component System, C# Jobs System and the Burst Compiler. “The project we’re working on right now simply wouldn’t have been possible without DOTS,” says CEO Jimmy Mahler.

Nordeus
Unity Examples

“As soon as we heard about DOTS, we contacted Unity to try it out and see if we could collaborate,” says Jozef Oros, software engineer at Nordeus. “Unity’s DOTS lets us make some really cool spells that explode at scale – effects that we knew would blow the audience’s minds.”

Freejam

“The ECS data layout is fundamental to our networking approach. It gives us a fast, accurate and extendable method to synchronize game data,” says CEO Mark Simmons. Freejam is working on Gamecraft, a multiplayer game where you can create games from blocks.

Door 407

This studio’s working on Diplomacy Is Not an Option (DNO), a real-time strategy game. And got stunning results. “We’re using DOTS almost everywhere in our game, and we’re finding it especially useful for pathfinding and optimizing our gameplay logic,” says lead developer Sergey Klimenko.

We’ve created several tech demos for you to try that include both source code and assets.

DOTS Sample

Check out the DOTS Sample, an internal test project that combines all current DOTS components, including Unity Physics, Animation, Netcode, and Conversion Workflow.

Megacity

At Unite Los Angeles, we presented this futuristic cityscape, alive with flying vehicles and a fascinating soundscape, to showcase some of the exciting possibilities with DOTS.

Examples

Megacity features 4.5M mesh renderers, 200k unique building objects, 100k unique audio sources, and 5000 dynamic vehicles flying on spline-based traffic lanes.

Karenga
Massive battle in the Spellsouls Universe

As part of the Preview release of the Entity Component System, we worked with our friends from Nordeus to create a demo for our Unite Austin 2017 keynote. A cut-down version of the project is available on GitHub.

Eager to get your hands on DOTS, but don’t know how to start? Not sure if it’s the right solution for your project? Check out these resources and start experimenting!

DOTS packages

The DOTS stack consists of a growing number of packages. To get started with DOTS, check out our overview of the different components you can install from the Package Manager.

Documentation & samples

Get started with the C# Job System documentation. As well, be sure to consult the documentation for packages available via the Package Manager.

C# Job System manual
Entity Component System samples
Pong in DOTS tutorial project

Watch Unite Copenhagen 2019 talks on DOTS

Learn how innovative game studios use DOTS to make great games faster, and how all the DOTS components, including Unity Physics, the new Conversion Workflow, and the Burst Compiler, work together.

MRTK Examples Hub is a Unity scene that makes it easy to experience multiple scenes. It uses MRTK's Scene System to load & unload the scenes.

MRTKExamplesHub.unity is the container scene that has shared components including MixedRealityToolkit and MixedRealityPlayspace. MRTKExamplesHubMainMenu.unity scene has the cube buttons.

Prerequisite

MRTK Examples Hub uses Scene Transition Service and related scripts. If you are using MRTK through Unity packages, please import Microsoft.MixedReality.Toolkit.Unity.Extensions.x.x.x.unitypackage which is part of the release packages. If you are using MRTK through the repository clone, you should already have the MRTK/Extensions folder in your project.

MRTKExamplesHub scene and the scene system

Open MRTKExamplesHub.unity which is located at MRTK/Examples/Experimental/Demos/ExamplesHub/Scenes/ It is an empty scene with MixedRealityToolkit, MixedRealityPlayspace and LoadHubOnStartup. This scene is configured to use MRTK's Scene System. Click MixedRealitySceneSystem under MixedRealityToolkit. It will display the Scene System's information in the Inspector panel.


On the bottom of the Inspector, it displays the list of the scenes defined in the Scene System Profile. You can click the scene names to load/unload them.


Example of loading MRTKExamplesHub scene by clicking the scene name in the list.
Example of loading HandInteractionExamples scene.
Example of loading multiple scenes.

Running the scene

The scene works in both Unity's game mode and on device. Run the MRTKExamplesHub scene in the Unity editor and use MRTK's input simulation to interact with the scene contents. To build and deploy, simply build MRTKExamplesHub scene with other scenes that are included in the Scene System's list. The inspector also makes it easy to add scenes to the Build Settings. In the Building Settings, make sure MRTKExamplesHub scene is on the top of the list at index 0.

How MRTKExamplesHub loads a scene

In the MRTKExamplesHub scene, you can find the ExamplesHubButton prefab.There is a FrontPlate object in the prefab which contains Interactable.Using the Interactable's OnClick() and OnTouch() event, it triggers the LoadContentScene script's LoadContent() function.In the LoadContentScene script's Inspector, you can define the scene name to load.


The script uses the Scene System's LoadContent() function to load the scene.Please refer to the Scene System page for more details.

Returning to the main menu scene

To return to the main menu scene (MRTKExamplesHubMainMenu scene), you can use the same Scene System LoadContent() method. The ToggleFeaturesPanelExamplesHub.prefab provides the 'Home' button which contains the LoadContentScene script. Use this prefab or provide a custom home button in each scene to allow the user to return to the main scene. One can put the ToggleFeaturesPanelExamplesHub.prefab in the MRTKExamplesHub scene to make it always visible since MRTKExamplesHub is a shared container scene. Make sure to hide/deactivate ToggleFeaturesPanel.prefab in each example scene.

Paragraph Unity Examples

Adding additional buttons

In the CubeCollection object, duplicate (or add) ExampleHubButton prefabs and click Update Collection in the GridObjectCollection.This will update the cylinder layout based on the new total number of buttons.Please refer to the Object Collection page for more details.


Unity Examples

After adding the buttons, update the scene name in the LoadContentScene script(explained above).Add additional scenes to the Scene System's profile.