Skip to content

Commit fbf44fb

Browse files
authored
fix(SDK): ensure custom Daydream code only executes when SDK selected
The Daydream SDK used code that was specific to the Google Daydream SDK but did now have scripting defines surrounding it meaning it would create an error unless the Google Daydream SDK was installed. This has been resolved. Plus, the unwanted commented out code has been removed and the xml documentation has been added to the Daydream SDK. The documentation has also been auto generated for the Daydream SDK.
1 parent 9b29f3a commit fbf44fb

File tree

10 files changed

+763
-313
lines changed

10 files changed

+763
-313
lines changed

Assets/VRTK/SDK/Daydream/DaydreamControllerLog.cs

Lines changed: 0 additions & 172 deletions
This file was deleted.

Assets/VRTK/SDK/Daydream/DaydreamControllerLog.cs.meta

Lines changed: 0 additions & 12 deletions
This file was deleted.

Assets/VRTK/SDK/Daydream/DaydreamReach.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
1-
namespace VRTK
1+
#if VRTK_SDK_DAYDREAM
2+
namespace VRTK
23
{
34
using UnityEngine;
4-
using System.Collections;
55

66
/// <summary>
77
/// DaydreamReach component uses touchpad to extend controller position out in front of user
88
/// along the current controller orientation plane
99
/// </summary>
1010
public class DaydreamReach : MonoBehaviour
1111
{
12-
// controller to track, defaults to ./Controller but probably want a Pointer Joint like GvrControllerPointer/Laser
12+
[Tooltip("Controller to track, defaults to ./Controller but probably want a Pointer Joint like GvrControllerPointer/Laser")]
1313
public Transform controller;
14-
15-
// maximum reach distance from controller origin
14+
[Tooltip("Maximum reach distance from controller origin.")]
1615
public float reachDistance = 0.5f;
1716

1817
private Vector3 positionOrigin;
@@ -79,10 +78,10 @@ private Vector2 GetTouch(int origin = 5)
7978
touch.y = touch.y * 2f - 1f;
8079
touch.x = touch.x * 2f - 1f;
8180
break;
82-
// todo...
8381
}
8482

8583
return touch;
8684
}
8785
}
88-
}
86+
}
87+
#endif

Assets/VRTK/SDK/Daydream/SDK_DaydreamBoundaries.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace VRTK
55
using UnityEngine;
66

77
/// <summary>
8-
/// The Sim Boundaries SDK script provides dummy functions for the play area bounderies.
8+
/// The Daydream Boundaries SDK script provides dummy functions for the play area bounderies.
99
/// </summary>
1010
public class SDK_DaydreamBoundaries : SDK_BaseBoundaries
1111
{

0 commit comments

Comments
 (0)