Skip to content

Commit

Permalink
Merge pull request #708 from mrbobbybobberson/InputUpdates
Browse files Browse the repository at this point in the history
Input updates
  • Loading branch information
keveleigh authored Jun 13, 2017
2 parents c3139ec + bc3ed7f commit e95caff
Show file tree
Hide file tree
Showing 26 changed files with 888 additions and 171 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OcclusionCullingSettings:
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
serializedVersion: 8
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
Expand All @@ -25,6 +25,7 @@ RenderSettings:
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
Expand All @@ -37,11 +38,11 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657868, g: 0.49641263, b: 0.57481706, a: 1}
m_IndirectSpecularColor: {r: 0.44657886, g: 0.4964128, b: 0.57481706, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 7
serializedVersion: 9
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
Expand All @@ -53,7 +54,7 @@ LightmapSettings:
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 4
serializedVersion: 8
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
Expand All @@ -66,13 +67,27 @@ LightmapSettings:
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_DirectLightInLightProbes: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 1
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFiltering: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0}
m_RuntimeCPUUsage: 25
m_ShadowMaskMode: 2
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
Expand All @@ -89,6 +104,8 @@ NavMeshSettings:
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &81406031
Expand Down Expand Up @@ -185,6 +202,7 @@ MeshRenderer:
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &87500976
GameObject:
Expand Down Expand Up @@ -493,6 +511,7 @@ MeshRenderer:
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &381623879
GameObject:
Expand Down Expand Up @@ -1059,6 +1078,7 @@ MeshRenderer:
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &903006227
GameObject:
Expand Down Expand Up @@ -1305,6 +1325,16 @@ Prefab:
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114742747811649402, guid: 3eddd1c29199313478dd3f912bfab2ab,
type: 2}
propertyPath: m_Enabled
value: 0
objectReference: {fileID: 0}
- target: {fileID: 114708646396671696, guid: 3eddd1c29199313478dd3f912bfab2ab,
type: 2}
propertyPath: autoRegisterGazePointerIfNoPointersRegistered
value: 1
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 3eddd1c29199313478dd3f912bfab2ab, type: 2}
m_IsPrefabParent: 0
Expand Down Expand Up @@ -1403,6 +1433,7 @@ MeshRenderer:
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!1 &1283525608
GameObject:
Expand Down Expand Up @@ -1665,6 +1696,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fb69de839bd015f4099b5bd2c45e53e5, type: 3}
m_Name:
m_EditorClassIdentifier:
UseUnscaledTime: 1
PositionPerSecond: 30
RotationDegreesPerSecond: 720
RotationSpeedScaler: 0
Expand Down Expand Up @@ -2226,7 +2258,7 @@ Canvas:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1850738765}
m_Enabled: 1
serializedVersion: 2
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
Expand All @@ -2235,6 +2267,7 @@ Canvas:
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
Expand All @@ -2249,6 +2282,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: fb69de839bd015f4099b5bd2c45e53e5, type: 3}
m_Name:
m_EditorClassIdentifier:
UseUnscaledTime: 1
PositionPerSecond: 30
RotationDegreesPerSecond: 720
RotationSpeedScaler: 0
Expand Down Expand Up @@ -2473,7 +2507,7 @@ Light:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1991503800}
m_Enabled: 1
serializedVersion: 7
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
Expand All @@ -2498,6 +2532,8 @@ Light:
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1991503802
Expand All @@ -2506,7 +2542,7 @@ Transform:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1991503800}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalRotation: {x: 0.4082179, y: -0.23456971, z: 0.10938164, w: 0.8754262}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
Expand Down
59 changes: 58 additions & 1 deletion Assets/HoloToolkit/Input/Prefabs/InputManager.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ GameObject:
- component: {fileID: 114000012434513746}
- component: {fileID: 114000013868099214}
- component: {fileID: 114708646396671696}
- component: {fileID: 114742747811649402}
m_Layer: 0
m_Name: InputManager
m_TagString: Untagged
Expand Down Expand Up @@ -64,6 +65,22 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1834357620357688
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4532035439910448}
- component: {fileID: 114345042324023316}
m_Layer: 0
m_Name: ControllerPointerStabilizer
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4000010261267946
Transform:
m_ObjectHideFlags: 1
Expand All @@ -89,6 +106,7 @@ Transform:
m_Children:
- {fileID: 4000013985985722}
- {fileID: 4000010261267946}
- {fileID: 4532035439910448}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand All @@ -105,6 +123,19 @@ Transform:
m_Father: {fileID: 4000011656901714}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4532035439910448
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1834357620357688}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4000011656901714}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &114000011980027866
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -179,6 +210,18 @@ MonoBehaviour:
UseGazeManager: 1
DefaultPlaneDistance: 2
DrawGizmos: 0
--- !u!114 &114345042324023316
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1834357620357688}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b81e3e700505863408cacaa0346cb1a6, type: 3}
m_Name:
m_EditorClassIdentifier:
StoredStabilitySamples: 60
--- !u!114 &114708646396671696
MonoBehaviour:
m_ObjectHideFlags: 1
Expand All @@ -195,10 +238,24 @@ MonoBehaviour:
- serializedVersion: 2
m_Bits: 4294967291
autoRegisteredPointers: []
autoRegisterGazePointerIfNoPointersRegistered: 1
autoRegisterGazePointerIfNoPointersRegistered: 0
autoRegisteredPointableCanvases: []
DebugDrawPointingRays: 0
DebugDrawPointingRayColors: []
--- !u!114 &114742747811649402
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1000011070707148}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3a23bf9a6a8497a4490fdbd42c41357e, type: 3}
m_Name:
m_EditorClassIdentifier:
ControllerPointerStabilizer: {fileID: 114345042324023316}
Cursor: {fileID: 0}
SearchForCursorIfUnset: 1
--- !u!114 &114902642943532050
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down
17 changes: 3 additions & 14 deletions Assets/HoloToolkit/Input/Scripts/Cursor/Cursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,10 @@ public enum CursorStateEnum
public CursorStateEnum CursorState { get { return cursorState; } }
private CursorStateEnum cursorState = CursorStateEnum.None;

#pragma warning disable 0649
[Tooltip("Set this in the editor to an object with a component that implements IPointerSource to tell this"
+ " cursor which pointer to follow. To set the pointer programmatically, set Pointer directly.")]
[SerializeField]
private GameObject loadPointer;
#pragma warning restore 0649
protected GameObject loadPointer;

/// <summary>
/// The pointer that this cursor should follow and process input from.
Expand Down Expand Up @@ -230,10 +228,7 @@ protected virtual void RegisterManagers()
InputManager.Instance.InputEnabled += OnInputEnabled;
InputManager.Instance.InputDisabled += OnInputDisabled;

if (FocusManager.IsInitialized)
{
FocusManager.Instance.PointerSpecificFocusChanged += OnPointerSpecificFocusChanged;
}
FocusManager.Instance.PointerSpecificFocusChanged += OnPointerSpecificFocusChanged;
}

/// <summary>
Expand Down Expand Up @@ -278,16 +273,10 @@ private void TryLoadPointerIfNeeded()
// pointer currently registered with FocusManager, we use it.

Pointer = FocusManager.Instance.TryGetSinglePointer();

if (Pointer == null)
{
Pointer = GazeManager.Instance;
}
}
else
{
gameObject.AddComponent<FocusManager>();
Pointer = FocusManager.Instance.TryGetSinglePointer();
// No options available, so we leave Pointer unset. It will need to be set programmatically later.
}
}

Expand Down
Loading

0 comments on commit e95caff

Please sign in to comment.