StereoKit.Templates
0.7.4
Prefix Reserved
dotnet new install StereoKit.Templates::0.7.4
StereoKit.Templates
These StereoKit templates are designed to be used with the dotnet new
command for command-line and environments like Visual Studio Code, and also work with Visual Studio 2022's "New Project" interface! You do not need to clone this repository, these templates can be installed easily via the NuGet package.
Install
# Install the templates!
dotnet new install StereoKit.Templates
Pre-requisites
If you don't have the .NET SDK, or the dotnet
command, you can install this via winget:
winget install Microsoft.DotNet.SDK.7
# Restart the Terminal to refresh your Path variable
On Linux, it may be as simple as this! If not, check Microsoft's instructions for installing dotnet
on your Linux distribution.
sudo apt-get install dotnet-sdk-7.0
Usage
The sk-net
template is a good place to start. It works with VR on Windows and Linux, and provides a good Simulator for development.
# Create a .NET Core based StereoKit project, and run it
mkdir SKProjectName
cd SKProjectName
dotnet new sk-net
dotnet run
Android Projects
The sk-multi
template can also deploy to Android devices. While this experience is mostly seamless when using Visual Studio 2022, using CLI or VS Code is not as simple as dotnet run
. Instead, you must build an apk and install that:
# Start with an multiplatform project
dotnet new sk-multi
# You _can_ still run the StereoKit Simulator like this
dotnet run
# To run on Android, just run the Android flavored project!
dotnet run --project Projects\Android\SKProjectName.Android.csproj
Publishing an APK
You can also build and deploy an APK like this! This was the only way to do it in the past, but may still be useful in some scenarios.
# The build command for making the Android APK
dotnet publish -c Release Projects\Android\SKProjectName.Android.csproj
# Install on device
adb install Projects\Android\bin\Release\net7.0-android\publish\com.companyname.skprojectname-Signed.apk
# Run the APK on device
adb shell monkey -p com.companyname.skprojectname 1
Additional information about signing apks while building like this can be found here.
Items
# Add an unlit shader named "test_shader" to the Assets folder
dotnet new skshader-unlit -n test_shader -o Assets
# Add an shader with default lighting named "test_lit_shader" to the Assets
# folder
dotnet new skshader-lit -n test_lit_shader -o Assets
# Add a basic IStepper template called SomeSystem
dotnet new skstepper -n SomeSystem.cs
Templates
Project templates:
Id | Project | Description |
---|---|---|
sk-net | .NET Core | Simpler project for Windows and Linux desktop XR. |
sk-multi | Multitarget | Cross-platform project for Android/Windows/Linux XR. |
sk-sketch | .NET Core | Bare-bones XR template for small code sketches. |
Item templates:
Id | Type | Description |
---|---|---|
skstepper | C# | A simple empty class that implements IStepper. |
skshader-lit | Shader | A basic shader that uses StereoKit's built-in lighting. |
skshader-unlit | Shader | A simple shader without any lighting. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.7.4 | 393 | 7/13/2024 |
0.7.3 | 462 | 4/1/2024 |
0.7.2 | 610 | 3/9/2024 |
0.7.1 | 246 | 3/8/2024 |
0.7.0 | 481 | 2/27/2024 |
0.6.0 | 3,041 | 11/15/2023 |
0.5.1 | 444 | 9/27/2023 |
0.5.0 | 242 | 9/26/2023 |
0.4.5 | 293 | 9/1/2023 |
0.4.4 | 236 | 8/30/2023 |
0.4.3 | 290 | 8/23/2023 |
0.4.2 | 322 | 8/9/2023 |
0.4.1 | 233 | 7/7/2023 |
0.4.0 | 220 | 7/7/2023 |
0.3.3 | 266 | 5/17/2023 |
0.3.2 | 546 | 2/5/2023 |
0.3.1 | 331 | 1/26/2023 |
0.3.0 | 362 | 1/15/2023 |
0.2.2 | 372 | 12/22/2022 |
0.2.1 | 341 | 12/22/2022 |
0.2.0 | 389 | 12/16/2022 |
0.1.0 | 400 | 11/17/2022 |