Last active
January 25, 2017 22:37
-
-
Save CameronVetter/518efba38a0a55dd44ff1c91899cb87d to your computer and use it in GitHub Desktop.
Version 1 for HoloLens Tutorial
This file contains 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.Collections.Generic; | |
using HoloToolkit.Unity; | |
using UnityEngine; | |
public class ObjectPlacer : MonoBehaviour | |
{ | |
public SpatialUnderstandingCustomMesh SpatialUnderstandingMesh; | |
private bool _timeToHideMesh; | |
// Use this for initialization | |
void Start() | |
{ | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
if (_timeToHideMesh) | |
{ | |
SpatialUnderstandingState.Instance.HideText = true; | |
HideGridEnableOcclulsion(); | |
_timeToHideMesh = false; | |
} | |
} | |
private void HideGridEnableOcclulsion() | |
{ | |
SpatialUnderstandingMesh.DrawProcessedMesh = false; | |
} | |
public void CreateScene() | |
{ | |
// Only if we're enabled | |
if (!SpatialUnderstanding.Instance.AllowSpatialUnderstanding) | |
{ | |
return; | |
} | |
_timeToHideMesh = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment