Created
September 25, 2016 14:17
-
-
Save migueldeicaza/8de4f89b182588927ba16f31b214e35a to your computer and use it in GitHub Desktop.
Minimal HoloLens app with UrhoSharp.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Windows.ApplicationModel.Core; | |
using Urho; | |
using Urho.Holographics; | |
using Urho.HoloLens; | |
internal class Program | |
{ | |
[MTAThread] | |
private static void Main() | |
{ | |
CoreApplication.Run(new AppViewSource()); | |
} | |
class AppViewSource : IFrameworkViewSource | |
{ | |
public IFrameworkView CreateView() => UrhoAppView.Create<HelloWorldApplication>(null); | |
} | |
} | |
public class HelloWorldApplication : HoloApplication | |
{ | |
public HelloWorldApplication(string pak, bool emulator) : base(pak, emulator) { } | |
protected override void Start() | |
{ | |
base.Start(); | |
var boxNode = Scene.CreateChild(); | |
boxNode.Position = new Vector3(0, 0, 1); //one meter away | |
boxNode.SetScale(0.2f); //20cm | |
boxNode.CreateComponent<Urho.Shapes.Box>(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment