Skip to content

Commit d9e0d24

Browse files
fixed issue with rendering both controllers at once
1 parent 9b9bd53 commit d9e0d24

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Assets/MixedRealityToolkit/_Core/Devices/BaseController.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,16 @@ protected IMixedRealityInputSystem InputSystem
8585
/// <param name="controllerType"></param>
8686
public void SetupConfiguration(Type controllerType)
8787
{
88+
8889
if (MixedRealityManager.Instance.ActiveProfile.IsControllerMappingEnabled)
8990
{
91+
if (MixedRealityManager.Instance.ActiveProfile.ControllerMappingProfile.RenderMotionControllers)
92+
{
93+
TryRenderControllerModel(controllerType);
94+
}
95+
9096
// We can only enable controller profiles if mappings exist.
9197
var controllerMappings = MixedRealityManager.Instance.ActiveProfile.ControllerMappingProfile.MixedRealityControllerMappingProfiles;
92-
var renderControllers = MixedRealityManager.Instance.ActiveProfile.ControllerMappingProfile.RenderMotionControllers;
93-
var renderDefaultControllerModels = MixedRealityManager.Instance.ActiveProfile.ControllerMappingProfile.UseDefaultModels;
9498

9599
// Have to test that a controller type has been registered in the profiles,
96100
// else it's Unity Input manager mappings will not have been setup by the inspector
@@ -130,8 +134,6 @@ public void SetupConfiguration(Type controllerType)
130134
Enabled = false;
131135
}
132136
}
133-
134-
TryRenderControllerModel(controllerMappings[i].ControllerType.Type);
135137
}
136138
}
137139
}

0 commit comments

Comments
 (0)