Instance set changes

Additional animator parameters
Reworked rigidbodies
Update to latest LeapC and LeapCSharp
This commit is contained in:
SDraw 2024-07-20 11:13:51 +03:00
parent 1f0b518761
commit 075ff67304
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
38 changed files with 8310 additions and 8646 deletions

View file

@ -19,16 +19,22 @@ namespace ml_lme
void Awake()
{
if(Instance == null)
Instance = this;
ScriptableObject.CreateInstance<Leap.Unity.UltraleapSettings>().ResetToDefaults();
m_leapController = new Leap.Controller();
m_leapData = new LeapParser.LeapData();
if((Instance != null) && (Instance != this))
{
Object.DestroyImmediate(this);
return;
}
Instance = this;
DontDestroyOnLoad(this);
ScriptableObject.CreateInstance<Leap.Unity.UltraleapSettings>().ResetToDefaults();
m_leapController = new Leap.Controller();
m_leapData = new LeapParser.LeapData();
}
void Start()
{
m_leapController.Device += this.OnLeapDeviceInitialized;
m_leapController.DeviceFailure += this.OnLeapDeviceFailure;
m_leapController.DeviceLost += this.OnLeapDeviceLost;