Skip to content
This repository was archived by the owner on Nov 8, 2019. It is now read-only.

Commit d514121

Browse files
committed
GVR SDK for Unity v1.0.0
1 parent 5a02da7 commit d514121

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1247
-660
lines changed

GoogleVR/DemoScenes/ControllerDemo/ControllerDebugInfo.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
// See the License for the specific language governing permissioßns and
1313
// limitations under the License.
1414

15+
// The controller is not available for versions of Unity without the
16+
// // GVR native integration.
17+
#if UNITY_HAS_GOOGLEVR && (UNITY_ANDROID || UNITY_EDITOR)
18+
1519
using UnityEngine;
1620
using UnityEngine.UI;
1721

@@ -76,3 +80,5 @@ void Update() {
7680
}
7781
}
7882
}
83+
84+
#endif // UNITY_HAS_GOOGLEVR && (UNITY_ANDROID || UNITY_EDITOR)

GoogleVR/DemoScenes/ControllerDemo/ControllerDemo.unity

Lines changed: 57 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ RectTransform:
175175
m_LocalScale: {x: 1, y: 1, z: 1}
176176
m_Children: []
177177
m_Father: {fileID: 892995910}
178-
m_RootOrder: 1
178+
m_RootOrder: 0
179179
m_AnchorMin: {x: 0, y: 1}
180180
m_AnchorMax: {x: 0, y: 1}
181181
m_AnchoredPosition: {x: 35, y: -98}
@@ -418,7 +418,8 @@ MonoBehaviour:
418418
m_HorizontalOverflow: 0
419419
m_VerticalOverflow: 0
420420
m_LineSpacing: 1
421-
m_Text: (Status Message Here)
421+
m_Text: To use the controller, please upgrade to a version of Unity with the GVR
422+
native integration
422423
--- !u!222 &243068557
423424
CanvasRenderer:
424425
m_ObjectHideFlags: 0
@@ -623,91 +624,6 @@ Transform:
623624
m_Children: []
624625
m_Father: {fileID: 1741037407}
625626
m_RootOrder: 0
626-
--- !u!1 &564964838
627-
GameObject:
628-
m_ObjectHideFlags: 0
629-
m_PrefabParentObject: {fileID: 0}
630-
m_PrefabInternal: {fileID: 0}
631-
serializedVersion: 4
632-
m_Component:
633-
- 224: {fileID: 564964841}
634-
- 222: {fileID: 564964840}
635-
- 114: {fileID: 564964839}
636-
- 114: {fileID: 564964842}
637-
m_Layer: 5
638-
m_Name: FPS
639-
m_TagString: Untagged
640-
m_Icon: {fileID: 0}
641-
m_NavMeshLayer: 0
642-
m_StaticEditorFlags: 0
643-
m_IsActive: 1
644-
--- !u!114 &564964839
645-
MonoBehaviour:
646-
m_ObjectHideFlags: 0
647-
m_PrefabParentObject: {fileID: 0}
648-
m_PrefabInternal: {fileID: 0}
649-
m_GameObject: {fileID: 564964838}
650-
m_Enabled: 1
651-
m_EditorHideFlags: 0
652-
m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
653-
m_Name:
654-
m_EditorClassIdentifier:
655-
m_Material: {fileID: 0}
656-
m_Color: {r: 1, g: 1, b: 1, a: 1}
657-
m_RaycastTarget: 1
658-
m_OnCullStateChanged:
659-
m_PersistentCalls:
660-
m_Calls: []
661-
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
662-
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
663-
m_FontData:
664-
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
665-
m_FontSize: 30
666-
m_FontStyle: 0
667-
m_BestFit: 0
668-
m_MinSize: 10
669-
m_MaxSize: 40
670-
m_Alignment: 6
671-
m_AlignByGeometry: 0
672-
m_RichText: 1
673-
m_HorizontalOverflow: 1
674-
m_VerticalOverflow: 0
675-
m_LineSpacing: 1
676-
m_Text: FPS
677-
--- !u!222 &564964840
678-
CanvasRenderer:
679-
m_ObjectHideFlags: 0
680-
m_PrefabParentObject: {fileID: 0}
681-
m_PrefabInternal: {fileID: 0}
682-
m_GameObject: {fileID: 564964838}
683-
--- !u!224 &564964841
684-
RectTransform:
685-
m_ObjectHideFlags: 0
686-
m_PrefabParentObject: {fileID: 0}
687-
m_PrefabInternal: {fileID: 0}
688-
m_GameObject: {fileID: 564964838}
689-
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
690-
m_LocalPosition: {x: 0, y: 0, z: 0}
691-
m_LocalScale: {x: 1, y: 1, z: 1}
692-
m_Children: []
693-
m_Father: {fileID: 892995910}
694-
m_RootOrder: 0
695-
m_AnchorMin: {x: 0, y: 0}
696-
m_AnchorMax: {x: 0, y: 0}
697-
m_AnchoredPosition: {x: 101, y: 70}
698-
m_SizeDelta: {x: 176, y: 68}
699-
m_Pivot: {x: 0.5, y: 0.5}
700-
--- !u!114 &564964842
701-
MonoBehaviour:
702-
m_ObjectHideFlags: 0
703-
m_PrefabParentObject: {fileID: 0}
704-
m_PrefabInternal: {fileID: 0}
705-
m_GameObject: {fileID: 564964838}
706-
m_Enabled: 1
707-
m_EditorHideFlags: 0
708-
m_Script: {fileID: 11500000, guid: 11534fd325088423a9e85baae960115b, type: 3}
709-
m_Name:
710-
m_EditorClassIdentifier:
711627
--- !u!1 &659110375
712628
GameObject:
713629
m_ObjectHideFlags: 0
@@ -1019,7 +935,6 @@ RectTransform:
1019935
m_LocalPosition: {x: 0, y: 0, z: 0}
1020936
m_LocalScale: {x: 0, y: 0, z: 0}
1021937
m_Children:
1022-
- {fileID: 564964841}
1023938
- {fileID: 154946723}
1024939
m_Father: {fileID: 0}
1025940
m_RootOrder: 6
@@ -1095,20 +1010,6 @@ RectTransform:
10951010
m_AnchoredPosition: {x: 0, y: 0}
10961011
m_SizeDelta: {x: 0, y: 0}
10971012
m_Pivot: {x: 0.5, y: 0.5}
1098-
--- !u!1001 &1102362478
1099-
Prefab:
1100-
m_ObjectHideFlags: 0
1101-
serializedVersion: 2
1102-
m_Modification:
1103-
m_TransformParent: {fileID: 0}
1104-
m_Modifications:
1105-
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1106-
propertyPath: m_RootOrder
1107-
value: 7
1108-
objectReference: {fileID: 0}
1109-
m_RemovedComponents: []
1110-
m_ParentPrefab: {fileID: 100100000, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1111-
m_IsPrefabParent: 0
11121013
--- !u!1 &1113738064
11131014
GameObject:
11141015
m_ObjectHideFlags: 0
@@ -1151,8 +1052,6 @@ MonoBehaviour:
11511052
m_Name:
11521053
m_EditorClassIdentifier:
11531054
vrModeOnly: 0
1154-
clickTime: 0.1
1155-
hotspot: {x: 0.5, y: 0.5}
11561055
--- !u!114 &1113738067
11571056
MonoBehaviour:
11581057
m_ObjectHideFlags: 0
@@ -1769,6 +1668,60 @@ Transform:
17691668
- {fileID: 450623411}
17701669
m_Father: {fileID: 0}
17711670
m_RootOrder: 9
1671+
--- !u!1001 &1782151970
1672+
Prefab:
1673+
m_ObjectHideFlags: 0
1674+
serializedVersion: 2
1675+
m_Modification:
1676+
m_TransformParent: {fileID: 0}
1677+
m_Modifications:
1678+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1679+
propertyPath: m_LocalPosition.x
1680+
value: 6.66
1681+
objectReference: {fileID: 0}
1682+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1683+
propertyPath: m_LocalPosition.y
1684+
value: 10.48
1685+
objectReference: {fileID: 0}
1686+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1687+
propertyPath: m_LocalPosition.z
1688+
value: 22.1
1689+
objectReference: {fileID: 0}
1690+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1691+
propertyPath: m_LocalRotation.x
1692+
value: 0
1693+
objectReference: {fileID: 0}
1694+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1695+
propertyPath: m_LocalRotation.y
1696+
value: 0
1697+
objectReference: {fileID: 0}
1698+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1699+
propertyPath: m_LocalRotation.z
1700+
value: 0
1701+
objectReference: {fileID: 0}
1702+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1703+
propertyPath: m_LocalRotation.w
1704+
value: 1
1705+
objectReference: {fileID: 0}
1706+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1707+
propertyPath: m_RootOrder
1708+
value: 9
1709+
objectReference: {fileID: 0}
1710+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1711+
propertyPath: m_LocalScale.x
1712+
value: 3
1713+
objectReference: {fileID: 0}
1714+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1715+
propertyPath: m_LocalScale.y
1716+
value: 3
1717+
objectReference: {fileID: 0}
1718+
- target: {fileID: 498412, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1719+
propertyPath: m_LocalScale.z
1720+
value: 3
1721+
objectReference: {fileID: 0}
1722+
m_RemovedComponents: []
1723+
m_ParentPrefab: {fileID: 100100000, guid: 970dd4b9371394fb4890965f608d46fd, type: 2}
1724+
m_IsPrefabParent: 0
17721725
--- !u!1 &2040484735
17731726
GameObject:
17741727
m_ObjectHideFlags: 0

GoogleVR/DemoScenes/ControllerDemo/ControllerDemoManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public class ControllerDemoManager : MonoBehaviour {
3232
// True if we are dragging the currently selected GameObject.
3333
private bool dragging;
3434

35+
#if UNITY_HAS_GOOGLEVR && (UNITY_ANDROID || UNITY_EDITOR)
3536
void Awake() {
3637
}
3738

@@ -126,4 +127,5 @@ private void UpdateStatusMessage() {
126127
break;
127128
}
128129
}
130+
#endif // UNITY_HAS_GOOGLEVR && (UNITY_ANDROID || UNITY_EDITOR)
129131
}

0 commit comments

Comments
 (0)