Getting Started with StereoKit

Here’s a quick list of what you’ll need to start developing with StereoKit:

This short video goes through the pre-requisites for building StereoKit’s hello world! You can find a UWP/HoloLens specific version here as well.

For Mac developers: while StereoKit’s simulator does not run on Mac OS, you can still deploy to standalone Android headsets such as Quest! See here for a quick video by community member Raphael about how to do this with the experimental cross platform template.

The Templates

Create New Project

For an overview of the initial code in the .Net Core and UWP templates, check out this video!

Minimum “Hello Cube” Application

The template does provide some code to help provide new developers a base to work from, but what parts of the code are really necessary? We can boil “Hello Cube” down to something far simpler if we want to! This is the simplest possible StereoKit application:

using System;
using StereoKit;

class Program
{
	static void Main(string[] args)
	{
		if (!SK.Initialize(new SKSettings{ appName = "Project" }))
			Environment.Exit(1);

		while (SK.Step(() =>
		{
			Mesh.Cube.Draw(Material.Default, Matrix.S(0.1f));
		}));

		SK.Shutdown();
	}
}

Next Steps

Awesome! That’s pretty great, but what next? Why don’t we build some UI? Alternatively, you can check out the StereoKit Ink repository, which contains an XR ink-painting application written in about 220 lines of code! It’s well commented, and is a good example to pick through.

For additional learning resources, you can check out the Learning Resources page for a couple of repositories and links that may help you out. In particular, the Github repository does contain a number of small demo scenes that are excellent reference for a number of different StereoKit features!

And don’t forget to peek in the docs here! Most pages contain sample code that illustrates how a particular function or property is used in-context. The ultimate goal is to have a sample for 100% of the docs, so if you’re looking for one and it isn’t there, use the ‘Create an Issue’ link at the bottom of the web page to get it prioritized!




Found an issue with these docs, or have some additional questions? Create an Issue on Github!