Loading files
This file is pinned to the selected release. Download the original to open it in your design tool.
3142d0420This file is pinned to the selected release. Download the original to open it in your design tool.
using Leap.Unity.Attributes;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Leap.Unity.Streams {
public class TransformPoseStream : MonoBehaviour, IStream<Pose> {
public event Action OnOpen = () => { };
public event Action<Pose> OnSend = (pose) => { };
public event Action OnClose = () => { };
void OnEnable() {
OnOpen();
}
void Update() {
OnSend(this.transform.ToWorldPose());
}
void OnDisable() {
OnClose();
}
}
}