protected override void OnDisable() { if (feed == null || !feed.isActiveAndEnabled || feed.context.Data != context.Data || feed.Texture == null) { feed = (RealSense.RealSenseInputFeed)RealSense.RealSenseInputFeed.FindInputFeed(context); } feed.ShowInfrared(false); base.OnDisable(); }
protected override void OnEnable() { image = GetComponent <RawImage>(); base.OnEnable(); if (feed == null || !feed.isActiveAndEnabled || feed.context.Data != context.Data || feed.Texture == null) { feed = (RealSense.RealSenseInputFeed)RealSense.RealSenseInputFeed.FindInputFeed(context); } if (feed != null) { feed.ShowInfrared(true); } HandleDataChanged(); }