Skip to content

Commit

Permalink
Heatmap script/scene was still containing debug settings..
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreNicolai committed Jan 22, 2018
1 parent 03db306 commit a1df133
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 86 deletions.
82 changes: 3 additions & 79 deletions unity_pupil_plugin_vr/Assets/Market Scene Demo/Heatmap.unity
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &42777667
MonoBehaviour:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -13746,81 +13746,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
delay: 1
item: {fileID: 11400000, guid: d24caee896ca7114aafaf607d9760c9d, type: 2}
--- !u!1 &650350316
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 1899244996124128, guid: 20acf7dd93e0bfd4899bb7146097c4d7,
type: 2}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 650350317}
- component: {fileID: 650350319}
- component: {fileID: 650350318}
m_Layer: 9
m_Name: RenderingMesh
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &650350317
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 4095804790029882, guid: 20acf7dd93e0bfd4899bb7146097c4d7,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 650350316}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -100, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 907704458}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &650350318
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 23613898281139616, guid: 20acf7dd93e0bfd4899bb7146097c4d7,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 650350316}
m_Enabled: 0
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 0
m_ReflectionProbeUsage: 0
m_Materials:
- {fileID: 2100000, guid: 96218dfc50c3dfa448f8364fc4b4588d, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &650350319
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 33178789646758434, guid: 20acf7dd93e0bfd4899bb7146097c4d7,
type: 2}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 650350316}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &655924177
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -15748,7 +15673,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &873154567
Transform:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -16349,7 +16274,6 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 799716060}
- {fileID: 650350317}
m_Father: {fileID: 873154567}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -20747,7 +20671,7 @@ Prefab:
objectReference: {fileID: 42777666}
- target: {fileID: 1508411167041054, guid: 1a363ebd9791e7d48a02435c46d956ab, type: 2}
propertyPath: m_IsActive
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 114039770744552444, guid: 1a363ebd9791e7d48a02435c46d956ab,
type: 2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ void Update ()
// Keep heatmap collider rotation constant. '-90' derives from the sphere mesh normals we construct above
transform.eulerAngles = Vector3.up * -90f;

// if (PupilTools.IsConnected && PupilTools.DataProcessState == EStatus.ProcessingGaze)
// {
// Vector2 gazePosition = PupilData._2D.GetEyeGaze (GazeSource.BothEyes);
if (PupilTools.IsConnected && PupilTools.DataProcessState == EStatus.ProcessingGaze)
{
Vector2 gazePosition = PupilData._2D.GetEyeGaze (GazeSource.BothEyes);

RaycastHit hit;
if (Input.GetMouseButton(0) && Physics.Raycast(cam.ScreenPointToRay (Input.mousePosition), out hit, 1f, (int) collisionLayer))
// if (Physics.Raycast(cam.ViewportPointToRay (gazePosition), out hit, 1f, (int)collisionLayer))
// if (Input.GetMouseButton(0) && Physics.Raycast(cam.ScreenPointToRay (Input.mousePosition), out hit, 1f, (int) collisionLayer))
if (Physics.Raycast(cam.ViewportPointToRay (gazePosition), out hit, 1f, (int)collisionLayer))
{
if ( hit.collider.gameObject != gameObject )
return;
Expand All @@ -230,7 +230,7 @@ void Update ()
highlightPixelsToBeRemoved.Add (pixelUV, Time.time + removeHighlightPixelsAfterTimeInterval);
}
}
// }
}
var removablePixels = highlightPixelsToBeRemoved.Where(p => p.Value < Time.time);
for (int i = 0; i < removablePixels.Count() ; i++)
{
Expand All @@ -254,7 +254,6 @@ void Update ()

if (recording)
{

if (infoText.gameObject.activeInHierarchy)
infoText.gameObject.SetActive (false);

Expand Down

0 comments on commit a1df133

Please sign in to comment.