Skip to content

Instantly share code, notes, and snippets.

@CameronVetter
Last active January 25, 2017 22:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CameronVetter/3f1d20fd6e5330f22135421b265a23d2 to your computer and use it in GitHub Desktop.
Save CameronVetter/3f1d20fd6e5330f22135421b265a23d2 to your computer and use it in GitHub Desktop.
SpatialUnderstandingState.cs - Part 1
using UnityEngine;
using HoloToolkit.Unity;
using HoloToolkit.Unity.SpatialMapping;
public class SpatialUnderstandingState : Singleton<SpatialUnderstandingState>
{
public TextMesh DebugDisplay;
public TextMesh DebugSubDisplay;
private bool _triggered;
public string PrimaryText
{
get
{
return "PrimaryText";
}
}
public Color PrimaryColor
{
get
{
return Color.white;
}
}
public string DetailsText
{
get
{
return "DetailsText";
}
}
private void Update_DebugDisplay()
{
// Basic checks
if (DebugDisplay == null)
{
return;
}
// Update display text
DebugDisplay.text = PrimaryText;
DebugDisplay.color = PrimaryColor;
DebugSubDisplay.text = DetailsText;
}
// Update is called once per frame
private void Update()
{
// Updates
Update_DebugDisplay();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment