Skip to content

Commit

Permalink
Merge pull request #25 from provencher/v0.4.6-Fixes
Browse files Browse the repository at this point in the history
V0.4.6 fixes
  • Loading branch information
provencher authored Feb 24, 2020
2 parents f329838 + 887ec79 commit 5f17cdf
Show file tree
Hide file tree
Showing 7 changed files with 618 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 3}
propertyPath: useRecommendedMSAALevel
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 3}
--- !u!4 &2343937678421142819 stripped
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ public int CPULevel
set
{
defaultCpuLevel = value;
#if !UNITY_EDITOR
OVRManager.cpuLevel = defaultCpuLevel;
#endif
}
}

Expand All @@ -89,7 +91,9 @@ public int GPULevel
set
{
defaultGpuLevel = value;
#if !UNITY_EDITOR
OVRManager.gpuLevel = defaultGpuLevel;
#endif
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@ private void SetupInput()

private void ConfigurePerformancePreferences()
{
OVRManager.cpuLevel = MRTKOculusConfig.Instance.CPULevel;
#if !UNITY_EDITOR
OVRManager.cpuLevel = MRTKOculusConfig.Instance.CPULevel;
OVRManager.gpuLevel = MRTKOculusConfig.Instance.GPULevel;
#endif
}

public override void Disable()
Expand Down Expand Up @@ -213,7 +215,10 @@ private void RemoveControllerDevice(Handedness handedness)

private void RemoveAllControllerDevices()
{
foreach (var controller in trackedControllers.Values)
if (trackedControllers.Count == 0) return;

// Create a new list to avoid causing an error removing items from a list currently being iterated on.
foreach (var controller in new List<OculusQuestController>(trackedControllers.Values))
{
RemoveControllerDevice(controller);
}
Expand Down Expand Up @@ -297,7 +302,10 @@ private void RemoveHandDevice(Handedness handedness)

private void RemoveAllHandDevices()
{
foreach (var hand in trackedHands.Values)
if(trackedHands.Count == 0) return;

// Create a new list to avoid causing an error removing items from a list currently being iterated on.
foreach (var hand in new List<OculusQuestHand>(trackedHands.Values))
{
RemoveHandDevice(hand);
}
Expand Down
Loading

0 comments on commit 5f17cdf

Please sign in to comment.