Skip to content

Instantly share code, notes, and snippets.

@CameronVetter
Last active January 25, 2017 22:37
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/518efba38a0a55dd44ff1c91899cb87d to your computer and use it in GitHub Desktop.
Save CameronVetter/518efba38a0a55dd44ff1c91899cb87d to your computer and use it in GitHub Desktop.
Version 1 for HoloLens Tutorial
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