soundvision/UnityProject/Assets/Scripts/Visualizer/IRPanelBehaviour.cs
2019-10-08 23:01:21 +02:00

25 lines
648 B
C#

using UnityEngine;
using VideoInput;
namespace Visualizer
{
class IRPanelBehaviour : MonoBehaviour
{
[SerializeField] private KinectManagerBehaviour kinectManagerBehaviour = null;
[SerializeField] private GameObject panel = null;
private Renderer renderer_;
private static readonly int KinectTexture = Shader.PropertyToID("_kinectTexture");
void Start()
{
renderer_ = panel.GetComponent<Renderer>();
}
void Update()
{
renderer_.material.SetTexture(KinectTexture, kinectManagerBehaviour.KinectSensor.InfraredCamera.Data);
}
}
}