Skip to content

Commit a76c00b

Browse files
committed
A dded a camera component to VRDisplayTracked prefab and tagged it "MainCamera". This will be our dummy MainCamera instead of creating one at runtime on a Viewer. This forces us to move our EndOfFrame corotuine and OnPreCull() to DisplayController.cs, rather than VRViewer.cs. This is a better move anyway.
1 parent 40ed05f commit a76c00b

2 files changed

Lines changed: 116 additions & 53 deletions

File tree

OSVR-Unity/Assets/OSVRUnity/Prefabs/VRDisplayTracked.prefab

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ GameObject:
88
serializedVersion: 4
99
m_Component:
1010
- 4: {fileID: 431736}
11+
- 20: {fileID: 2065472}
1112
- 114: {fileID: 11463916}
1213
m_Layer: 0
1314
m_Name: VRDisplayTracked
14-
m_TagString: Untagged
15+
m_TagString: MainCamera
1516
m_Icon: {fileID: 0}
1617
m_NavMeshLayer: 0
1718
m_StaticEditorFlags: 0
@@ -28,6 +29,38 @@ Transform:
2829
m_Children: []
2930
m_Father: {fileID: 0}
3031
m_RootOrder: 0
32+
--- !u!20 &2065472
33+
Camera:
34+
m_ObjectHideFlags: 1
35+
m_PrefabParentObject: {fileID: 0}
36+
m_PrefabInternal: {fileID: 100100000}
37+
m_GameObject: {fileID: 131736}
38+
m_Enabled: 1
39+
serializedVersion: 2
40+
m_ClearFlags: 1
41+
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
42+
m_NormalizedViewPortRect:
43+
serializedVersion: 2
44+
x: 0
45+
y: 0
46+
width: 1
47+
height: 1
48+
near clip plane: .00999999978
49+
far clip plane: 1000
50+
field of view: 60
51+
orthographic: 0
52+
orthographic size: 5
53+
m_Depth: 0
54+
m_CullingMask:
55+
serializedVersion: 2
56+
m_Bits: 4294967295
57+
m_RenderingPath: -1
58+
m_TargetTexture: {fileID: 0}
59+
m_TargetDisplay: 0
60+
m_HDR: 0
61+
m_OcclusionCulling: 1
62+
m_StereoConvergence: 10
63+
m_StereoSeparation: .0219999999
3164
--- !u!114 &11463916
3265
MonoBehaviour:
3366
m_ObjectHideFlags: 1
@@ -39,8 +72,6 @@ MonoBehaviour:
3972
m_Script: {fileID: 11500000, guid: c2b982789045b4641a4c4898908314b3, type: 3}
4073
m_Name:
4174
m_EditorClassIdentifier:
42-
nearClippingPlane: .00999999978
43-
farClippingPlane: 1000
4475
--- !u!1001 &100100000
4576
Prefab:
4677
m_ObjectHideFlags: 1

OSVR-Unity/Assets/OSVRUnity/Sample/Demo/Scenes/OSVRDemo2.unity

Lines changed: 82 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -781,50 +781,6 @@ Transform:
781781
- {fileID: 878689437}
782782
m_Father: {fileID: 0}
783783
m_RootOrder: 2
784-
--- !u!1001 &584116468
785-
Prefab:
786-
m_ObjectHideFlags: 0
787-
serializedVersion: 2
788-
m_Modification:
789-
m_TransformParent: {fileID: 0}
790-
m_Modifications:
791-
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
792-
propertyPath: m_LocalPosition.x
793-
value: 0
794-
objectReference: {fileID: 0}
795-
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
796-
propertyPath: m_LocalPosition.y
797-
value: 0
798-
objectReference: {fileID: 0}
799-
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
800-
propertyPath: m_LocalPosition.z
801-
value: 0
802-
objectReference: {fileID: 0}
803-
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
804-
propertyPath: m_LocalRotation.x
805-
value: 0
806-
objectReference: {fileID: 0}
807-
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
808-
propertyPath: m_LocalRotation.y
809-
value: 0
810-
objectReference: {fileID: 0}
811-
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
812-
propertyPath: m_LocalRotation.z
813-
value: 0
814-
objectReference: {fileID: 0}
815-
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
816-
propertyPath: m_LocalRotation.w
817-
value: 1
818-
objectReference: {fileID: 0}
819-
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
820-
propertyPath: m_RootOrder
821-
value: 1
822-
objectReference: {fileID: 0}
823-
m_RemovedComponents: []
824-
m_ParentPrefab: {fileID: 100100000, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
825-
m_RootGameObject: {fileID: 1959319991}
826-
m_IsPrefabParent: 0
827-
m_IsExploded: 1
828784
--- !u!1 &620304906
829785
GameObject:
830786
m_ObjectHideFlags: 0
@@ -1424,6 +1380,50 @@ Transform:
14241380
m_Children: []
14251381
m_Father: {fileID: 561713191}
14261382
m_RootOrder: 22
1383+
--- !u!1001 &949264008
1384+
Prefab:
1385+
m_ObjectHideFlags: 0
1386+
serializedVersion: 2
1387+
m_Modification:
1388+
m_TransformParent: {fileID: 0}
1389+
m_Modifications:
1390+
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1391+
propertyPath: m_LocalPosition.x
1392+
value: 0
1393+
objectReference: {fileID: 0}
1394+
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1395+
propertyPath: m_LocalPosition.y
1396+
value: 0
1397+
objectReference: {fileID: 0}
1398+
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1399+
propertyPath: m_LocalPosition.z
1400+
value: 0
1401+
objectReference: {fileID: 0}
1402+
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1403+
propertyPath: m_LocalRotation.x
1404+
value: 0
1405+
objectReference: {fileID: 0}
1406+
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1407+
propertyPath: m_LocalRotation.y
1408+
value: 0
1409+
objectReference: {fileID: 0}
1410+
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1411+
propertyPath: m_LocalRotation.z
1412+
value: 0
1413+
objectReference: {fileID: 0}
1414+
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1415+
propertyPath: m_LocalRotation.w
1416+
value: 1
1417+
objectReference: {fileID: 0}
1418+
- target: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1419+
propertyPath: m_RootOrder
1420+
value: 1
1421+
objectReference: {fileID: 0}
1422+
m_RemovedComponents: []
1423+
m_ParentPrefab: {fileID: 100100000, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
1424+
m_RootGameObject: {fileID: 1959319991}
1425+
m_IsPrefabParent: 0
1426+
m_IsExploded: 1
14271427
--- !u!1 &1021825778
14281428
GameObject:
14291429
m_ObjectHideFlags: 0
@@ -2331,14 +2331,15 @@ Transform:
23312331
GameObject:
23322332
m_ObjectHideFlags: 0
23332333
m_PrefabParentObject: {fileID: 131736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
2334-
m_PrefabInternal: {fileID: 584116468}
2334+
m_PrefabInternal: {fileID: 949264008}
23352335
serializedVersion: 4
23362336
m_Component:
23372337
- 4: {fileID: 1959319995}
2338+
- 20: {fileID: 1959319993}
23382339
- 114: {fileID: 1959319992}
23392340
m_Layer: 0
23402341
m_Name: VRDisplayTracked
2341-
m_TagString: Untagged
2342+
m_TagString: MainCamera
23422343
m_Icon: {fileID: 0}
23432344
m_NavMeshLayer: 0
23442345
m_StaticEditorFlags: 0
@@ -2348,20 +2349,51 @@ MonoBehaviour:
23482349
m_ObjectHideFlags: 0
23492350
m_PrefabParentObject: {fileID: 11463916, guid: bcbb49b5078d05d498ef83a6373ba939,
23502351
type: 2}
2351-
m_PrefabInternal: {fileID: 584116468}
2352+
m_PrefabInternal: {fileID: 949264008}
23522353
m_GameObject: {fileID: 1959319991}
23532354
m_Enabled: 1
23542355
m_EditorHideFlags: 0
23552356
m_Script: {fileID: 11500000, guid: c2b982789045b4641a4c4898908314b3, type: 3}
23562357
m_Name:
23572358
m_EditorClassIdentifier:
2358-
nearClippingPlane: .00999999978
2359-
farClippingPlane: 1000
2359+
--- !u!20 &1959319993
2360+
Camera:
2361+
m_ObjectHideFlags: 0
2362+
m_PrefabParentObject: {fileID: 2065472, guid: bcbb49b5078d05d498ef83a6373ba939,
2363+
type: 2}
2364+
m_PrefabInternal: {fileID: 949264008}
2365+
m_GameObject: {fileID: 1959319991}
2366+
m_Enabled: 1
2367+
serializedVersion: 2
2368+
m_ClearFlags: 1
2369+
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
2370+
m_NormalizedViewPortRect:
2371+
serializedVersion: 2
2372+
x: 0
2373+
y: 0
2374+
width: 1
2375+
height: 1
2376+
near clip plane: .00999999978
2377+
far clip plane: 1000
2378+
field of view: 60
2379+
orthographic: 0
2380+
orthographic size: 5
2381+
m_Depth: 0
2382+
m_CullingMask:
2383+
serializedVersion: 2
2384+
m_Bits: 4294967295
2385+
m_RenderingPath: -1
2386+
m_TargetTexture: {fileID: 0}
2387+
m_TargetDisplay: 0
2388+
m_HDR: 0
2389+
m_OcclusionCulling: 1
2390+
m_StereoConvergence: 10
2391+
m_StereoSeparation: .0219999999
23602392
--- !u!4 &1959319995
23612393
Transform:
23622394
m_ObjectHideFlags: 0
23632395
m_PrefabParentObject: {fileID: 431736, guid: bcbb49b5078d05d498ef83a6373ba939, type: 2}
2364-
m_PrefabInternal: {fileID: 584116468}
2396+
m_PrefabInternal: {fileID: 949264008}
23652397
m_GameObject: {fileID: 1959319991}
23662398
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
23672399
m_LocalPosition: {x: 0, y: 0, z: 0}

0 commit comments

Comments
 (0)