soundvision/UnityProject/Assets/Scripts/Visualizer/IRPanelBehaviour.cs
2019-10-04 21:52:26 +02:00

27 lines
No EOL
703 B
C#

using UnityEngine;
using VideoInput;
namespace Visualizer
{
class IRPanelBehaviour : MonoBehaviour
{
#pragma warning disable 649
[SerializeField] private KinectManagerBehaviour kinectManagerBehaviour;
[SerializeField] private GameObject panel;
#pragma warning restore 649
private Renderer renderer_;
private Texture2D texture2D_;
void Start()
{
renderer_ = panel.GetComponent<Renderer>();
texture2D_ = new Texture2D(512, 512);
}
void Update()
{
renderer_.material.SetTexture("_BaseColorMap", kinectManagerBehaviour.KinectSensor.InfraredCamera.Data);
}
}
}