mirror of
https://github.com/xiaopeng12138/MaiDXR.git
synced 2024-11-27 20:40:48 +01:00
Add Oculus MR
This commit is contained in:
parent
d6127070a9
commit
3f894f9ba1
578
Assets/MRCHelpers/Prefabs/Oculus_MRC_XRT_Manager_Full.prefab
Normal file
578
Assets/MRCHelpers/Prefabs/Oculus_MRC_XRT_Manager_Full.prefab
Normal file
@ -0,0 +1,578 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &122432412
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 122432413}
|
||||||
|
- component: {fileID: 122432414}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightEyeAnchor
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &122432413
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 122432412}
|
||||||
|
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: 1654481609}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!20 &122432414
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 122432412}
|
||||||
|
m_Enabled: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 2
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!1 &608780163
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 608780164}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TrackerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &608780164
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 608780163}
|
||||||
|
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: 1654481609}
|
||||||
|
m_RootOrder: 5
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1010144588
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1010144589}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightControllerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1010144589
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1010144588}
|
||||||
|
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: 1521644926}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1103977314
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1103977315}
|
||||||
|
- component: {fileID: 1103977316}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftEyeAnchor
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1103977315
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1103977314}
|
||||||
|
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: 1654481609}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!20 &1103977316
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1103977314}
|
||||||
|
m_Enabled: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 1
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!1 &1174096078
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1174096079}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftControllerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1174096079
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1174096078}
|
||||||
|
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: 1814618716}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1255382394
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1255382395}
|
||||||
|
- component: {fileID: 1255382396}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: CenterEyeAnchor
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1255382395
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1255382394}
|
||||||
|
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: 1654481609}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!20 &1255382396
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1255382394}
|
||||||
|
m_Enabled: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!1 &1521644925
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1521644926}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightHandAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1521644926
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1521644925}
|
||||||
|
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:
|
||||||
|
- {fileID: 1010144589}
|
||||||
|
m_Father: {fileID: 1654481609}
|
||||||
|
m_RootOrder: 4
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1654481608
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1654481609}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TrackingSpace
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1654481609
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1654481608}
|
||||||
|
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:
|
||||||
|
- {fileID: 1103977315}
|
||||||
|
- {fileID: 1255382395}
|
||||||
|
- {fileID: 122432413}
|
||||||
|
- {fileID: 1814618716}
|
||||||
|
- {fileID: 1521644926}
|
||||||
|
- {fileID: 608780164}
|
||||||
|
m_Father: {fileID: 7449411159797096978}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1814618715
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1814618716}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftHandAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1814618716
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1814618715}
|
||||||
|
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:
|
||||||
|
- {fileID: 1174096079}
|
||||||
|
m_Father: {fileID: 1654481609}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &342779316052413363
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6020623325241151543}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Oculus_MRC_XRT_Manager_Full
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6020623325241151543
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 342779316052413363}
|
||||||
|
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:
|
||||||
|
- {fileID: 7449411159797096978}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &7449411159797096982
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 7449411159797096978}
|
||||||
|
- component: {fileID: 7449411159797096981}
|
||||||
|
- component: {fileID: 7449411159797096980}
|
||||||
|
- component: {fileID: 7449411159797096983}
|
||||||
|
- component: {fileID: 1089416225}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRManager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &7449411159797096978
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7449411159797096982}
|
||||||
|
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:
|
||||||
|
- {fileID: 1654481609}
|
||||||
|
m_Father: {fileID: 6020623325241151543}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &7449411159797096981
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7449411159797096982}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7e933e81d3c20c74ea6fdc708a67e3a5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
useRecommendedMSAALevel: 1
|
||||||
|
_monoscopic: 0
|
||||||
|
enableAdaptiveResolution: 0
|
||||||
|
_colorGamut: 4
|
||||||
|
minRenderScale: 0.7
|
||||||
|
maxRenderScale: 1
|
||||||
|
_headPoseRelativeOffsetRotation: {x: 0, y: 0, z: 0}
|
||||||
|
_headPoseRelativeOffsetTranslation: {x: 0, y: 0, z: 0}
|
||||||
|
profilerTcpPort: 32419
|
||||||
|
expandMixedRealityCapturePropertySheet: 0
|
||||||
|
enableMixedReality: 0
|
||||||
|
compositionMethod: 0
|
||||||
|
extraHiddenLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
extraVisibleLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
dynamicCullingMask: 1
|
||||||
|
externalCompositionBackdropColorRift: {r: 0, g: 1, b: 0, a: 1}
|
||||||
|
externalCompositionBackdropColorQuest: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
capturingCameraDevice: 0
|
||||||
|
flipCameraFrameHorizontally: 0
|
||||||
|
flipCameraFrameVertically: 0
|
||||||
|
handPoseStateLatency: 0
|
||||||
|
sandwichCompositionRenderLatency: 0
|
||||||
|
sandwichCompositionBufferedFrames: 8
|
||||||
|
chromaKeyColor: {r: 0, g: 1, b: 0, a: 1}
|
||||||
|
chromaKeySimilarity: 0.6
|
||||||
|
chromaKeySmoothRange: 0.03
|
||||||
|
chromaKeySpillRange: 0.06
|
||||||
|
useDynamicLighting: 0
|
||||||
|
depthQuality: 1
|
||||||
|
dynamicLightingSmoothFactor: 8
|
||||||
|
dynamicLightingDepthVariationClampingValue: 0.001
|
||||||
|
virtualGreenScreenType: 0
|
||||||
|
virtualGreenScreenTopY: 10
|
||||||
|
virtualGreenScreenBottomY: -10
|
||||||
|
virtualGreenScreenApplyDepthCulling: 0
|
||||||
|
virtualGreenScreenDepthTolerance: 0.2
|
||||||
|
mrcActivationMode: 0
|
||||||
|
_trackingOriginType: 2
|
||||||
|
usePositionTracking: 1
|
||||||
|
useRotationTracking: 1
|
||||||
|
useIPDInPositionTracking: 1
|
||||||
|
resetTrackerOnLoad: 0
|
||||||
|
AllowRecenter: 0
|
||||||
|
LateControllerUpdate: 1
|
||||||
|
--- !u!114 &7449411159797096980
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7449411159797096982}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7b7741adcaae3294c84769ebcfc8e8db, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_originalTransform: {fileID: 0}
|
||||||
|
--- !u!114 &7449411159797096983
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7449411159797096982}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 651f9b800d6cfba42a29be5f69653f86, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!114 &1089416225
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7449411159797096982}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: df9f338034892c44ebb62d97894772f1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
usePerEyeCameras: 0
|
||||||
|
useFixedUpdateForTracking: 0
|
||||||
|
disableEyeAnchorCameras: 1
|
30
Assets/MRCHelpers/Scripts/CopyTransform.cs
Normal file
30
Assets/MRCHelpers/Scripts/CopyTransform.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace MRCHelpers
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Copies the position of a transform every frame
|
||||||
|
/// </summary>
|
||||||
|
public class CopyTransform : MonoBehaviour
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The transform to follow
|
||||||
|
/// </summary>
|
||||||
|
[SerializeField]
|
||||||
|
private Transform m_originalTransform;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Update
|
||||||
|
/// </summary>
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
//copy the pose of the other transform each frame
|
||||||
|
transform.position = m_originalTransform.position;
|
||||||
|
transform.rotation = m_originalTransform.rotation;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
165
Assets/MRCHelpers/Scripts/OVRMixedRealityCaptureTestMod.cs
Normal file
165
Assets/MRCHelpers/Scripts/OVRMixedRealityCaptureTestMod.cs
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||||
|
#define OVR_ANDROID_MRC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace MRCHelpers
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Triggers the Oculus MRC tracking engine if the scene uses the XR Interaction Toolkit.
|
||||||
|
/// The code is modified from the file OVRMixedRealityCaptureTest in Oculus plugin
|
||||||
|
/// </summary>
|
||||||
|
public class OVRMixedRealityCaptureTestMod : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
bool inited = false;
|
||||||
|
|
||||||
|
public Camera defaultExternalCamera;
|
||||||
|
OVRPlugin.Fovf defaultFov;
|
||||||
|
|
||||||
|
// Use this for initialization
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || OVR_ANDROID_MRC
|
||||||
|
if (!defaultExternalCamera)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("defaultExternalCamera undefined");
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !OVR_ANDROID_MRC
|
||||||
|
// On Quest, we enable MRC automatically through the configuration
|
||||||
|
if (!OVRManager.instance.enableMixedReality)
|
||||||
|
{
|
||||||
|
OVRManager.instance.enableMixedReality = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void Initialize()
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || OVR_ANDROID_MRC
|
||||||
|
if (inited)
|
||||||
|
return;
|
||||||
|
|
||||||
|
#if OVR_ANDROID_MRC
|
||||||
|
if (!OVRPlugin.Media.GetInitialized())
|
||||||
|
return;
|
||||||
|
#else
|
||||||
|
if (!OVRPlugin.IsMixedRealityInitialized())
|
||||||
|
return;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
OVRPlugin.ResetDefaultExternalCamera();
|
||||||
|
Debug.LogFormat("GetExternalCameraCount before adding manual external camera {0}", OVRPlugin.GetExternalCameraCount());
|
||||||
|
UpdateDefaultExternalCamera();
|
||||||
|
Debug.LogFormat("GetExternalCameraCount after adding manual external camera {0}", OVRPlugin.GetExternalCameraCount());
|
||||||
|
|
||||||
|
// obtain default FOV
|
||||||
|
{
|
||||||
|
OVRPlugin.CameraIntrinsics cameraIntrinsics;
|
||||||
|
OVRPlugin.CameraExtrinsics cameraExtrinsics;
|
||||||
|
OVRPlugin.GetMixedRealityCameraInfo(0, out cameraExtrinsics, out cameraIntrinsics);
|
||||||
|
defaultFov = cameraIntrinsics.FOVPort;
|
||||||
|
}
|
||||||
|
|
||||||
|
inited = true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateDefaultExternalCamera()
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || OVR_ANDROID_MRC
|
||||||
|
// always build a 1080p external camera
|
||||||
|
const int cameraPixelWidth = 1920;
|
||||||
|
const int cameraPixelHeight = 1080;
|
||||||
|
const float cameraAspect = (float)cameraPixelWidth / cameraPixelHeight;
|
||||||
|
|
||||||
|
|
||||||
|
string cameraName = "UnityExternalCamera";
|
||||||
|
OVRPlugin.CameraIntrinsics cameraIntrinsics = new OVRPlugin.CameraIntrinsics();
|
||||||
|
OVRPlugin.CameraExtrinsics cameraExtrinsics = new OVRPlugin.CameraExtrinsics();
|
||||||
|
|
||||||
|
// intrinsics
|
||||||
|
|
||||||
|
cameraIntrinsics.IsValid = OVRPlugin.Bool.True;
|
||||||
|
cameraIntrinsics.LastChangedTimeSeconds = Time.time;
|
||||||
|
|
||||||
|
float vFov = defaultExternalCamera.fieldOfView * Mathf.Deg2Rad;
|
||||||
|
float hFov = Mathf.Atan(Mathf.Tan(vFov * 0.5f) * cameraAspect) * 2.0f;
|
||||||
|
OVRPlugin.Fovf fov = new OVRPlugin.Fovf();
|
||||||
|
fov.UpTan = fov.DownTan = Mathf.Tan(vFov * 0.5f);
|
||||||
|
fov.LeftTan = fov.RightTan = Mathf.Tan(hFov * 0.5f);
|
||||||
|
|
||||||
|
cameraIntrinsics.FOVPort = fov;
|
||||||
|
cameraIntrinsics.VirtualNearPlaneDistanceMeters = defaultExternalCamera.nearClipPlane;
|
||||||
|
cameraIntrinsics.VirtualFarPlaneDistanceMeters = defaultExternalCamera.farClipPlane;
|
||||||
|
cameraIntrinsics.ImageSensorPixelResolution.w = cameraPixelWidth;
|
||||||
|
cameraIntrinsics.ImageSensorPixelResolution.h = cameraPixelHeight;
|
||||||
|
|
||||||
|
// extrinsics
|
||||||
|
|
||||||
|
cameraExtrinsics.IsValid = OVRPlugin.Bool.True;
|
||||||
|
cameraExtrinsics.LastChangedTimeSeconds = Time.time;
|
||||||
|
cameraExtrinsics.CameraStatusData = OVRPlugin.CameraStatus.CameraStatus_Calibrated;
|
||||||
|
cameraExtrinsics.AttachedToNode = OVRPlugin.Node.None;
|
||||||
|
|
||||||
|
Camera mainCamera = Camera.main;
|
||||||
|
|
||||||
|
Transform trackingSpace = Camera.main.transform.parent;
|
||||||
|
OVRPose trackingSpacePose = trackingSpace.ToOVRPose(false);
|
||||||
|
OVRPose cameraPose = defaultExternalCamera.transform.ToOVRPose(false);
|
||||||
|
OVRPose relativePose = trackingSpacePose.Inverse() * cameraPose;
|
||||||
|
#if OVR_ANDROID_MRC
|
||||||
|
OVRPose stageToLocalPose = OVRPlugin.GetTrackingTransformRelativePose(OVRPlugin.TrackingOrigin.Stage).ToOVRPose();
|
||||||
|
OVRPose localToStagePose = stageToLocalPose.Inverse();
|
||||||
|
relativePose = localToStagePose * relativePose;
|
||||||
|
#endif
|
||||||
|
cameraExtrinsics.RelativePose = relativePose.ToPosef();
|
||||||
|
|
||||||
|
if (!OVRPlugin.SetDefaultExternalCamera(cameraName, ref cameraIntrinsics, ref cameraExtrinsics))
|
||||||
|
{
|
||||||
|
Debug.LogError("SetDefaultExternalCamera() failed");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || OVR_ANDROID_MRC
|
||||||
|
if (!inited)
|
||||||
|
{
|
||||||
|
Initialize();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!defaultExternalCamera)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if OVR_ANDROID_MRC
|
||||||
|
if (!OVRPlugin.Media.GetInitialized())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (!OVRPlugin.IsMixedRealityInitialized())
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
UpdateDefaultExternalCamera();
|
||||||
|
OVRPlugin.OverrideExternalCameraFov(0, false, new OVRPlugin.Fovf());
|
||||||
|
OVRPlugin.OverrideExternalCameraStaticPose(0, false, OVRPlugin.Posef.identity);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
59
Assets/MRCHelpers/Scripts/RemoveMRCamerasTracking.cs
Normal file
59
Assets/MRCHelpers/Scripts/RemoveMRCamerasTracking.cs
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.SpatialTracking;
|
||||||
|
|
||||||
|
namespace MRCHelpers
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Removes the tracked pose driver in the cameras used for mixed reality capture.
|
||||||
|
/// Unity automatically adds it, and this way, the cameras follow the head of the
|
||||||
|
/// user, while they should be fixed in the world
|
||||||
|
/// </summary>
|
||||||
|
public class RemoveMRCamerasTracking : MonoBehaviour
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Start
|
||||||
|
/// </summary>
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
StartCoroutine(RemoveCamerasTracking());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Coroutine to remove tracking scripts from cameras
|
||||||
|
/// </summary>
|
||||||
|
private IEnumerator RemoveCamerasTracking()
|
||||||
|
{
|
||||||
|
//get the tracking space child
|
||||||
|
Transform trackingSpaceTransform = transform.Find("TrackingSpace");
|
||||||
|
|
||||||
|
//the names of the cameras that Oculus adds for MRC
|
||||||
|
string[] camerasNames = new string[] { "OculusMRC_BackgroundCamera", "OculusMRC_ForgroundCamera" };
|
||||||
|
Transform tr = null;
|
||||||
|
|
||||||
|
//let everything initialize
|
||||||
|
yield return null;
|
||||||
|
var waiter = new WaitForSeconds(0.5f);
|
||||||
|
|
||||||
|
//I have noticed the system may re-created the cameras in some conditions
|
||||||
|
//(e.g. the player disconnects and reconnects with OBS), so we must keep deleting them forever
|
||||||
|
while (true)
|
||||||
|
{
|
||||||
|
//for each camera
|
||||||
|
foreach (string cameraName in camerasNames)
|
||||||
|
{
|
||||||
|
//find the camera, and destroy its TrackedPoseDriver if there is one attached
|
||||||
|
if ((tr = trackingSpaceTransform.Find(cameraName)) != null)
|
||||||
|
if (tr.GetComponent<TrackedPoseDriver>() != null)
|
||||||
|
Destroy(tr.GetComponent<TrackedPoseDriver>());
|
||||||
|
}
|
||||||
|
|
||||||
|
//wait a bit before looking again
|
||||||
|
yield return waiter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
31
Assets/Oculus/OculusProjectConfig.asset
Normal file
31
Assets/Oculus/OculusProjectConfig.asset
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 05d394ae2a81edd4cbc3c51917e766e3, type: 3}
|
||||||
|
m_Name: OculusProjectConfig
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
targetDeviceTypes: 0100000002000000
|
||||||
|
allowOptional3DofHeadTracking: 0
|
||||||
|
handTrackingSupport: 1
|
||||||
|
handTrackingFrequency: 2
|
||||||
|
handTrackingVersion: 2
|
||||||
|
anchorSupport: 0
|
||||||
|
renderModelSupport: 0
|
||||||
|
trackedKeyboardSupport: 0
|
||||||
|
disableBackups: 1
|
||||||
|
enableNSCConfig: 1
|
||||||
|
securityXmlPath:
|
||||||
|
skipUnneededShaders: 0
|
||||||
|
focusAware: 1
|
||||||
|
requiresSystemKeyboard: 0
|
||||||
|
experimentalFeaturesEnabled: 0
|
||||||
|
insightPassthroughEnabled: 1
|
||||||
|
systemSplashScreen: {fileID: 0}
|
BIN
Assets/Oculus/VR/AudioClips/sfx_belt_in.wav
Normal file
BIN
Assets/Oculus/VR/AudioClips/sfx_belt_in.wav
Normal file
Binary file not shown.
21
Assets/Oculus/VR/Editor/AndroidManifest.OVRSubmission.xml
Normal file
21
Assets/Oculus/VR/Editor/AndroidManifest.OVRSubmission.xml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||||
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:installLocation="auto">
|
||||||
|
<application
|
||||||
|
android:label="@string/app_name"
|
||||||
|
android:icon="@mipmap/app_icon">
|
||||||
|
<activity
|
||||||
|
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
|
||||||
|
android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
|
||||||
|
android:launchMode="singleTask"
|
||||||
|
android:name="com.unity3d.player.UnityPlayerActivity"
|
||||||
|
android:excludeFromRecents="true">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="android.intent.action.MAIN"/>
|
||||||
|
<category android:name="android.intent.category.LAUNCHER"/>
|
||||||
|
</intent-filter>
|
||||||
|
</activity>
|
||||||
|
<meta-data android:name="unityplayer.SkipPermissionsDialog" android:value="false" />
|
||||||
|
<meta-data android:name="com.samsung.android.vr.application.mode" android:value="vr_only"/>
|
||||||
|
</application>
|
||||||
|
</manifest>
|
261
Assets/Oculus/VR/Editor/OVRADBTool.cs
Normal file
261
Assets/Oculus/VR/Editor/OVRADBTool.cs
Normal file
@ -0,0 +1,261 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
using Debug = UnityEngine.Debug;
|
||||||
|
|
||||||
|
public class OVRADBTool
|
||||||
|
{
|
||||||
|
public bool isReady;
|
||||||
|
|
||||||
|
public string androidSdkRoot;
|
||||||
|
public string androidPlatformToolsPath;
|
||||||
|
public string adbPath;
|
||||||
|
|
||||||
|
public OVRADBTool(string androidSdkRoot)
|
||||||
|
{
|
||||||
|
if (!String.IsNullOrEmpty(androidSdkRoot))
|
||||||
|
{
|
||||||
|
this.androidSdkRoot = androidSdkRoot;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.androidSdkRoot = String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.androidSdkRoot.EndsWith("\\") || this.androidSdkRoot.EndsWith("/"))
|
||||||
|
{
|
||||||
|
this.androidSdkRoot = this.androidSdkRoot.Remove(this.androidSdkRoot.Length - 1);
|
||||||
|
}
|
||||||
|
androidPlatformToolsPath = Path.Combine(this.androidSdkRoot, "platform-tools");
|
||||||
|
adbPath = Path.Combine(androidPlatformToolsPath, "adb.exe");
|
||||||
|
isReady = File.Exists(adbPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsAndroidSdkRootValid(string androidSdkRoot)
|
||||||
|
{
|
||||||
|
OVRADBTool tool = new OVRADBTool(androidSdkRoot);
|
||||||
|
return tool.isReady;
|
||||||
|
}
|
||||||
|
|
||||||
|
public delegate void WaitingProcessToExitCallback();
|
||||||
|
|
||||||
|
public int StartServer(WaitingProcessToExitCallback waitingProcessToExitCallback)
|
||||||
|
{
|
||||||
|
string outputString;
|
||||||
|
string errorString;
|
||||||
|
|
||||||
|
int exitCode = RunCommand(new string[] { "start-server" }, waitingProcessToExitCallback, out outputString, out errorString);
|
||||||
|
return exitCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int KillServer(WaitingProcessToExitCallback waitingProcessToExitCallback)
|
||||||
|
{
|
||||||
|
string outputString;
|
||||||
|
string errorString;
|
||||||
|
|
||||||
|
int exitCode = RunCommand(new string[] { "kill-server" }, waitingProcessToExitCallback, out outputString, out errorString);
|
||||||
|
return exitCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ForwardPort(int port, WaitingProcessToExitCallback waitingProcessToExitCallback)
|
||||||
|
{
|
||||||
|
string outputString;
|
||||||
|
string errorString;
|
||||||
|
|
||||||
|
string portString = string.Format("tcp:{0}", port);
|
||||||
|
|
||||||
|
int exitCode = RunCommand(new string[] { "forward", portString, portString }, waitingProcessToExitCallback, out outputString, out errorString);
|
||||||
|
return exitCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int ReleasePort(int port, WaitingProcessToExitCallback waitingProcessToExitCallback)
|
||||||
|
{
|
||||||
|
string outputString;
|
||||||
|
string errorString;
|
||||||
|
|
||||||
|
string portString = string.Format("tcp:{0}", port);
|
||||||
|
|
||||||
|
int exitCode = RunCommand(new string[] { "forward", "--remove", portString }, waitingProcessToExitCallback, out outputString, out errorString);
|
||||||
|
return exitCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> GetDevices()
|
||||||
|
{
|
||||||
|
string outputString;
|
||||||
|
string errorString;
|
||||||
|
|
||||||
|
RunCommand(new string[] { "devices" }, null, out outputString, out errorString);
|
||||||
|
string[] devices = outputString.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
|
||||||
|
List<string> deviceList = new List<string>(devices);
|
||||||
|
deviceList.RemoveAt(0);
|
||||||
|
|
||||||
|
for(int i = 0; i < deviceList.Count; i++)
|
||||||
|
{
|
||||||
|
string deviceName = deviceList[i];
|
||||||
|
int index = deviceName.IndexOf('\t');
|
||||||
|
if (index >= 0)
|
||||||
|
deviceList[i] = deviceName.Substring(0, index);
|
||||||
|
else
|
||||||
|
deviceList[i] = "";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return deviceList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private StringBuilder outputStringBuilder = null;
|
||||||
|
private StringBuilder errorStringBuilder = null;
|
||||||
|
|
||||||
|
public int RunCommand(string[] arguments, WaitingProcessToExitCallback waitingProcessToExitCallback, out string outputString, out string errorString)
|
||||||
|
{
|
||||||
|
int exitCode = -1;
|
||||||
|
|
||||||
|
if (!isReady)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("OVRADBTool not ready");
|
||||||
|
outputString = string.Empty;
|
||||||
|
errorString = "OVRADBTool not ready";
|
||||||
|
return exitCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
string args = string.Join(" ", arguments);
|
||||||
|
|
||||||
|
ProcessStartInfo startInfo = new ProcessStartInfo(adbPath, args);
|
||||||
|
startInfo.WorkingDirectory = androidSdkRoot;
|
||||||
|
startInfo.CreateNoWindow = true;
|
||||||
|
startInfo.UseShellExecute = false;
|
||||||
|
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.RedirectStandardOutput = true;
|
||||||
|
startInfo.RedirectStandardError = true;
|
||||||
|
|
||||||
|
outputStringBuilder = new StringBuilder("");
|
||||||
|
errorStringBuilder = new StringBuilder("");
|
||||||
|
|
||||||
|
Process process = Process.Start(startInfo);
|
||||||
|
process.OutputDataReceived += new DataReceivedEventHandler(OutputDataReceivedHandler);
|
||||||
|
process.ErrorDataReceived += new DataReceivedEventHandler(ErrorDataReceivedHandler);
|
||||||
|
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
do
|
||||||
|
{
|
||||||
|
if (waitingProcessToExitCallback != null)
|
||||||
|
{
|
||||||
|
waitingProcessToExitCallback();
|
||||||
|
}
|
||||||
|
} while (!process.WaitForExit(100));
|
||||||
|
|
||||||
|
process.WaitForExit();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.LogWarningFormat("[OVRADBTool.RunCommand] exception {0}", e.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
exitCode = process.ExitCode;
|
||||||
|
|
||||||
|
process.Close();
|
||||||
|
|
||||||
|
outputString = outputStringBuilder.ToString();
|
||||||
|
errorString = errorStringBuilder.ToString();
|
||||||
|
|
||||||
|
outputStringBuilder = null;
|
||||||
|
errorStringBuilder = null;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(errorString))
|
||||||
|
{
|
||||||
|
if (errorString.Contains("Warning"))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning("OVRADBTool " + errorString);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("OVRADBTool " + errorString);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return exitCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Process RunCommandAsync(string[] arguments, DataReceivedEventHandler outputDataRecievedHandler)
|
||||||
|
{
|
||||||
|
if (!isReady)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("OVRADBTool not ready");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
string args = string.Join(" ", arguments);
|
||||||
|
|
||||||
|
ProcessStartInfo startInfo = new ProcessStartInfo(adbPath, args);
|
||||||
|
startInfo.WorkingDirectory = androidSdkRoot;
|
||||||
|
startInfo.CreateNoWindow = true;
|
||||||
|
startInfo.UseShellExecute = false;
|
||||||
|
startInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||||
|
startInfo.RedirectStandardOutput = true;
|
||||||
|
startInfo.RedirectStandardError = true;
|
||||||
|
|
||||||
|
Process process = Process.Start(startInfo);
|
||||||
|
if (outputDataRecievedHandler != null)
|
||||||
|
{
|
||||||
|
process.OutputDataReceived += new DataReceivedEventHandler(outputDataRecievedHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
process.BeginOutputReadLine();
|
||||||
|
process.BeginErrorReadLine();
|
||||||
|
|
||||||
|
return process;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OutputDataReceivedHandler(object sendingProcess, DataReceivedEventArgs args)
|
||||||
|
{
|
||||||
|
// Collect the sort command output.
|
||||||
|
if (!string.IsNullOrEmpty(args.Data))
|
||||||
|
{
|
||||||
|
// Add the text to the collected output.
|
||||||
|
outputStringBuilder.Append(args.Data);
|
||||||
|
outputStringBuilder.Append(Environment.NewLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ErrorDataReceivedHandler(object sendingProcess, DataReceivedEventArgs args)
|
||||||
|
{
|
||||||
|
// Collect the sort command output.
|
||||||
|
if (!string.IsNullOrEmpty(args.Data))
|
||||||
|
{
|
||||||
|
// Add the text to the collected output.
|
||||||
|
errorStringBuilder.Append(args.Data);
|
||||||
|
errorStringBuilder.Append(Environment.NewLine);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
880
Assets/Oculus/VR/Editor/OVRBuild.cs
Normal file
880
Assets/Oculus/VR/Editor/OVRBuild.cs
Normal file
@ -0,0 +1,880 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if USING_XR_MANAGEMENT && (USING_XR_SDK_OCULUS || USING_XR_SDK_OPENXR)
|
||||||
|
#define USING_XR_SDK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_2020_1_OR_NEWER
|
||||||
|
#define REQUIRES_XR_SDK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Unit made a change that broke `BuildOptions.AcceptExternalModificationsToPlayer`
|
||||||
|
// Thread detailing issue: https://forum.unity.com/threads/oculus-build-invalidoperationexception-the-build-target-does-not-support-build-appending.994930/
|
||||||
|
#if UNITY_2020_1_OR_NEWER || UNITY_2019_4_OR_NEWER
|
||||||
|
#define DONT_USE_BUILD_OPTIONS_EXTERNAL_MODIFICATIONS_FLAG
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Allows Oculus to build apps from the command line.
|
||||||
|
/// </summary>
|
||||||
|
[InitializeOnLoadAttribute]
|
||||||
|
partial class OculusBuildApp : EditorWindow
|
||||||
|
{
|
||||||
|
static void SetPCTarget()
|
||||||
|
{
|
||||||
|
if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.StandaloneWindows)
|
||||||
|
{
|
||||||
|
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Standalone, BuildTarget.StandaloneWindows);
|
||||||
|
}
|
||||||
|
#if !USING_XR_SDK && !REQUIRES_XR_SDK
|
||||||
|
UnityEditorInternal.VR.VREditor.SetVREnabledOnTargetGroup(BuildTargetGroup.Standalone, true);
|
||||||
|
#pragma warning disable 618
|
||||||
|
PlayerSettings.virtualRealitySupported = true;
|
||||||
|
#pragma warning restore 618
|
||||||
|
#endif
|
||||||
|
AssetDatabase.SaveAssets();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void SetAndroidTarget()
|
||||||
|
{
|
||||||
|
EditorUserBuildSettings.androidBuildSubtarget = MobileTextureSubtarget.ASTC;
|
||||||
|
EditorUserBuildSettings.androidBuildSystem = AndroidBuildSystem.Gradle;
|
||||||
|
|
||||||
|
if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android)
|
||||||
|
{
|
||||||
|
EditorUserBuildSettings.SwitchActiveBuildTarget(BuildTargetGroup.Android, BuildTarget.Android);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !USING_XR_SDK && !REQUIRES_XR_SDK
|
||||||
|
UnityEditorInternal.VR.VREditor.SetVREnabledOnTargetGroup(BuildTargetGroup.Standalone, true);
|
||||||
|
#pragma warning disable 618
|
||||||
|
PlayerSettings.virtualRealitySupported = true;
|
||||||
|
#pragma warning restore 618
|
||||||
|
#endif
|
||||||
|
AssetDatabase.SaveAssets();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if UNITY_EDITOR_WIN && UNITY_ANDROID
|
||||||
|
// Build setting constants
|
||||||
|
const string REMOTE_APK_PATH = "/data/local/tmp";
|
||||||
|
const float USB_TRANSFER_SPEED_THRES = 25.0f;
|
||||||
|
const float USB_3_TRANSFER_SPEED = 32.0f;
|
||||||
|
const float TRANSFER_SPEED_CHECK_THRESHOLD = 4.0f;
|
||||||
|
const int NUM_BUILD_AND_RUN_STEPS = 9;
|
||||||
|
const int BYTES_TO_MEGABYTES = 1048576;
|
||||||
|
|
||||||
|
// Build window variables (not saved)
|
||||||
|
GUIStyle windowStyle;
|
||||||
|
GUIStyle calloutStyle;
|
||||||
|
string currConnectedDevice;
|
||||||
|
Vector2 scrollViewPos;
|
||||||
|
|
||||||
|
// Build window variables (saved)
|
||||||
|
static bool saveKeystorePasswords;
|
||||||
|
static bool isRunOnDevice;
|
||||||
|
static string outputApkPath;
|
||||||
|
|
||||||
|
// Progress bar variables
|
||||||
|
static int totalBuildSteps;
|
||||||
|
static int currentStep;
|
||||||
|
static string progressMessage;
|
||||||
|
|
||||||
|
// Build setting varaibles
|
||||||
|
static string gradlePath;
|
||||||
|
static string jdkPath;
|
||||||
|
static string androidSdkPath;
|
||||||
|
static string applicationIdentifier;
|
||||||
|
static bool isDevelopmentBuild;
|
||||||
|
static string productName;
|
||||||
|
static string dataPath;
|
||||||
|
|
||||||
|
static string gradleTempExport;
|
||||||
|
static string gradleExport;
|
||||||
|
static bool showCancel;
|
||||||
|
static bool buildInProgress;
|
||||||
|
|
||||||
|
static DirectorySyncer.CancellationTokenSource syncCancelToken;
|
||||||
|
static Process gradleBuildProcess;
|
||||||
|
static Thread buildThread;
|
||||||
|
|
||||||
|
static bool? apkOutputSuccessful;
|
||||||
|
|
||||||
|
[MenuItem("Oculus/OVR Build/OVR Build APK... %#k", false, 20)]
|
||||||
|
static void Init()
|
||||||
|
{
|
||||||
|
EditorWindow.GetWindow<OculusBuildApp>(false, "OVR Build APK", true);
|
||||||
|
OnBuildComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MenuItem("Oculus/OVR Build/OVR Build APK And Run %k", false, 21)]
|
||||||
|
static void InitAndRun()
|
||||||
|
{
|
||||||
|
var window = EditorWindow.GetWindow<OculusBuildApp>(false, "OVR Build APK", true);
|
||||||
|
isRunOnDevice = true; // make sure the "And Run" part of the menu name is true
|
||||||
|
window.StartBuild();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
isRunOnDevice = EditorPrefs.GetBool("OVRBuild_RunOnDevice", false);
|
||||||
|
saveKeystorePasswords = EditorPrefs.GetBool("OVRBuild_SaveKeystorePasswords", false);
|
||||||
|
if (saveKeystorePasswords)
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRBuild_KeystorePassword"))
|
||||||
|
PlayerSettings.Android.keystorePass = EditorPrefs.GetString("OVRBuild_KeystorePassword");
|
||||||
|
if (EditorPrefs.HasKey("OVRBuild_KeyAliasPassword"))
|
||||||
|
PlayerSettings.Android.keyaliasPass = EditorPrefs.GetString("OVRBuild_KeyAliasPassword");
|
||||||
|
}
|
||||||
|
outputApkPath = EditorPrefs.GetString("OVRBuild_BuiltAPKPath", "");
|
||||||
|
|
||||||
|
CheckADBDevices(out currConnectedDevice);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDisable()
|
||||||
|
{
|
||||||
|
EditorPrefs.SetBool("OVRBuild_RunOnDevice", isRunOnDevice);
|
||||||
|
EditorPrefs.SetBool("OVRBuild_SaveKeystorePasswords", saveKeystorePasswords);
|
||||||
|
if (saveKeystorePasswords)
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRBuild_KeystorePassword", PlayerSettings.Android.keystorePass);
|
||||||
|
EditorPrefs.SetString("OVRBuild_KeyAliasPassword", PlayerSettings.Android.keyaliasPass);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EditorPrefs.DeleteKey("OVRBuild_KeystorePassword");
|
||||||
|
EditorPrefs.DeleteKey("OVRBuild_KeyAliasPassword");
|
||||||
|
}
|
||||||
|
EditorPrefs.SetString("OVRBuild_BuiltAPKPath", outputApkPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGUI()
|
||||||
|
{
|
||||||
|
if (windowStyle == null)
|
||||||
|
{
|
||||||
|
windowStyle = new GUIStyle();
|
||||||
|
windowStyle.margin = new RectOffset(10, 10, 10, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (calloutStyle == null)
|
||||||
|
{
|
||||||
|
calloutStyle = new GUIStyle(EditorStyles.label);
|
||||||
|
calloutStyle.richText = true;
|
||||||
|
calloutStyle.wordWrap = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fix progress bar window size
|
||||||
|
minSize = new Vector2(500, 305);
|
||||||
|
|
||||||
|
float oldLabelWidth = EditorGUIUtility.labelWidth;
|
||||||
|
EditorGUIUtility.labelWidth = 160;
|
||||||
|
|
||||||
|
EditorGUILayout.BeginVertical(windowStyle);
|
||||||
|
|
||||||
|
GUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||||
|
GUILayout.BeginVertical();
|
||||||
|
EditorGUILayout.LabelField("Builds created in the <b>OVR Build APK</b> window are identical to Unity-built APKs, but use the Gradle cache to only touch changed files, resulting in shorter build times.",
|
||||||
|
calloutStyle);
|
||||||
|
|
||||||
|
#if UNITY_2021_1_OR_NEWER
|
||||||
|
if (EditorGUILayout.LinkButton("Documentation"))
|
||||||
|
#else
|
||||||
|
if (GUILayout.Button("Documentation", GUILayout.ExpandWidth(false)))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
Application.OpenURL("https://developer.oculus.com/documentation/unity/unity-build-android-tools/");
|
||||||
|
}
|
||||||
|
GUILayout.EndVertical();
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
EditorGUILayout.Space(15f);
|
||||||
|
|
||||||
|
scrollViewPos = EditorGUILayout.BeginScrollView(scrollViewPos, GUIStyle.none, GUI.skin.verticalScrollbar);
|
||||||
|
using (new EditorGUI.DisabledScope(buildInProgress))
|
||||||
|
{
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
outputApkPath = EditorGUILayout.TextField("Built APK Path", outputApkPath);
|
||||||
|
if (GUILayout.Button("Browse...", GUILayout.Width(80)))
|
||||||
|
DisplayAPKPathDialog();
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
|
||||||
|
PlayerSettings.Android.bundleVersionCode = EditorGUILayout.IntField(new GUIContent("Version Number",
|
||||||
|
"Builds uploaded to the Oculus storefront are required to have incrementing version numbers.\nThis value is exposed to players."),
|
||||||
|
PlayerSettings.Android.bundleVersionCode, GUILayout.Width(220));
|
||||||
|
|
||||||
|
EditorGUI.BeginChangeCheck();
|
||||||
|
bool isAutoIncrement = PlayerPrefs.GetInt(OVRGradleGeneration.prefName, 0) != 0;
|
||||||
|
isAutoIncrement = EditorGUILayout.ToggleLeft(new GUIContent("Auto-Increment?",
|
||||||
|
"If true, version number will be automatically incremented after every successful build."),
|
||||||
|
isAutoIncrement, EditorStyles.miniLabel, GUILayout.Width(120));
|
||||||
|
if (EditorGUI.EndChangeCheck())
|
||||||
|
OVRGradleGeneration.ToggleUtilities();
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.Space(15f);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
using (new EditorGUI.DisabledScope(string.IsNullOrEmpty(currConnectedDevice)))
|
||||||
|
{
|
||||||
|
isRunOnDevice = EditorGUILayout.Toggle("Install & Run on Device?", isRunOnDevice);
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
EditorGUILayout.LabelField(string.IsNullOrEmpty(currConnectedDevice) ? "No device connected" : $"Device: {currConnectedDevice}");
|
||||||
|
}
|
||||||
|
if (GUILayout.Button("Refresh", GUILayout.Width(80)))
|
||||||
|
CheckADBDevices(out currConnectedDevice);
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorUserBuildSettings.development = EditorGUILayout.Toggle(new GUIContent("Development Build?",
|
||||||
|
"Development builds allow you to debug scripts. However, they're slightly slower, and they're not allowed on the Oculus storefront."),
|
||||||
|
EditorUserBuildSettings.development);
|
||||||
|
|
||||||
|
EditorGUILayout.Space(15f);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
saveKeystorePasswords = EditorGUILayout.Toggle(new GUIContent("Save Keystore Passwords?",
|
||||||
|
"These values are also found in Project Settings > Player > [Android] > Publishing Settings > Project Keystore.\nStoring passwords is convenient, but reduces security."),
|
||||||
|
saveKeystorePasswords);
|
||||||
|
if (GUILayout.Button("Select Keystore...", GUILayout.Width(150)))
|
||||||
|
SettingsService.OpenProjectSettings("Project/Player");
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
if (saveKeystorePasswords)
|
||||||
|
{
|
||||||
|
EditorGUI.indentLevel++;
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("Keystore Path", PlayerSettings.Android.keystoreName);
|
||||||
|
PlayerSettings.Android.keystorePass = EditorGUILayout.PasswordField("Keystore Password", PlayerSettings.Android.keystorePass);
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("Key Alias Name", PlayerSettings.Android.keyaliasName);
|
||||||
|
PlayerSettings.Android.keyaliasPass = EditorGUILayout.PasswordField("Alias Password", PlayerSettings.Android.keyaliasPass);
|
||||||
|
|
||||||
|
EditorGUI.indentLevel--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndScrollView();
|
||||||
|
EditorGUILayout.Space(10);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
|
||||||
|
//better to perform these at end of GUI
|
||||||
|
bool shouldCancel = false;
|
||||||
|
bool shouldBuild = false;
|
||||||
|
if (showCancel)
|
||||||
|
shouldCancel = GUILayout.Button("Cancel", GUILayout.Height(30), GUILayout.Width(100));
|
||||||
|
else
|
||||||
|
{
|
||||||
|
using (new EditorGUI.DisabledScope(buildInProgress))
|
||||||
|
{
|
||||||
|
shouldBuild = GUILayout.Button("Build", GUILayout.Height(30), GUILayout.Width(100));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
EditorGUILayout.Space(10);
|
||||||
|
|
||||||
|
// Show progress bar
|
||||||
|
Rect progressRect = EditorGUILayout.GetControlRect(GUILayout.Height(25));
|
||||||
|
float progress = currentStep / (float)totalBuildSteps;
|
||||||
|
EditorGUI.ProgressBar(progressRect, progress, progressMessage);
|
||||||
|
|
||||||
|
EditorGUIUtility.labelWidth = oldLabelWidth;
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
if (shouldBuild)
|
||||||
|
StartBuild();
|
||||||
|
else if (shouldCancel)
|
||||||
|
CancelBuild();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
// Force window update if not in focus to ensure progress bar still updates
|
||||||
|
var window = EditorWindow.focusedWindow;
|
||||||
|
if (window != null && window.ToString().Contains("OculusBuildApp"))
|
||||||
|
{
|
||||||
|
Repaint();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DisplayAPKPathDialog()
|
||||||
|
{
|
||||||
|
string fileName = "build.apk";
|
||||||
|
string path = "";
|
||||||
|
if (!string.IsNullOrEmpty(outputApkPath))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
path = Path.GetDirectoryName(outputApkPath);
|
||||||
|
fileName = Path.GetFileName(outputApkPath);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
//do nothing, we just have a malformed apkPath and should accept defaults
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
outputApkPath = EditorUtility.SaveFilePanel("APK Path", path, fileName, "apk");
|
||||||
|
Repaint();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CancelBuild()
|
||||||
|
{
|
||||||
|
SetProgressBarMessage("Canceling . . .");
|
||||||
|
|
||||||
|
if (syncCancelToken != null)
|
||||||
|
{
|
||||||
|
syncCancelToken.Cancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (apkOutputSuccessful.HasValue && apkOutputSuccessful.Value)
|
||||||
|
{
|
||||||
|
buildThread.Abort();
|
||||||
|
OnBuildComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gradleBuildProcess != null && !gradleBuildProcess.HasExited)
|
||||||
|
{
|
||||||
|
var cancelThread = new Thread(delegate ()
|
||||||
|
{
|
||||||
|
CancelGradleBuild();
|
||||||
|
});
|
||||||
|
cancelThread.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CancelGradleBuild()
|
||||||
|
{
|
||||||
|
Process cancelGradleProcess = new Process();
|
||||||
|
string arguments = "-Xmx1024m -classpath \"" + gradlePath +
|
||||||
|
"\" org.gradle.launcher.GradleMain --stop";
|
||||||
|
var processInfo = new System.Diagnostics.ProcessStartInfo
|
||||||
|
{
|
||||||
|
WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal,
|
||||||
|
FileName = jdkPath,
|
||||||
|
Arguments = arguments,
|
||||||
|
RedirectStandardInput = true,
|
||||||
|
UseShellExecute = false,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
RedirectStandardError = true,
|
||||||
|
RedirectStandardOutput = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
cancelGradleProcess.StartInfo = processInfo;
|
||||||
|
cancelGradleProcess.EnableRaisingEvents = true;
|
||||||
|
|
||||||
|
cancelGradleProcess.OutputDataReceived += new DataReceivedEventHandler(
|
||||||
|
(s, e) =>
|
||||||
|
{
|
||||||
|
if (e != null && e.Data != null && e.Data.Length != 0)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogFormat("Gradle: {0}", e.Data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
apkOutputSuccessful = false;
|
||||||
|
|
||||||
|
cancelGradleProcess.Start();
|
||||||
|
cancelGradleProcess.BeginOutputReadLine();
|
||||||
|
cancelGradleProcess.WaitForExit();
|
||||||
|
|
||||||
|
OnBuildComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StartBuild()
|
||||||
|
{
|
||||||
|
showCancel = false;
|
||||||
|
buildInProgress = true;
|
||||||
|
|
||||||
|
InitializeProgressBar(NUM_BUILD_AND_RUN_STEPS);
|
||||||
|
IncrementProgressBar("Exporting Unity Project . . .");
|
||||||
|
|
||||||
|
apkOutputSuccessful = null;
|
||||||
|
syncCancelToken = null;
|
||||||
|
gradleBuildProcess = null;
|
||||||
|
|
||||||
|
UnityEngine.Debug.Log("OVRBuild: Starting Unity build ...");
|
||||||
|
|
||||||
|
SetupDirectories();
|
||||||
|
|
||||||
|
// 1. Get scenes to build in Unity, and export gradle project
|
||||||
|
var buildResult = UnityBuildPlayer();
|
||||||
|
|
||||||
|
if (buildResult.summary.result == UnityEditor.Build.Reporting.BuildResult.Succeeded)
|
||||||
|
{
|
||||||
|
// Set static variables so build thread has updated data
|
||||||
|
showCancel = true;
|
||||||
|
gradlePath = OVRConfig.Instance.GetGradlePath();
|
||||||
|
jdkPath = OVRConfig.Instance.GetJDKPath();
|
||||||
|
androidSdkPath = OVRConfig.Instance.GetAndroidSDKPath();
|
||||||
|
applicationIdentifier = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android);
|
||||||
|
isDevelopmentBuild = EditorUserBuildSettings.development;
|
||||||
|
#if UNITY_2019_3_OR_NEWER
|
||||||
|
productName = "launcher";
|
||||||
|
#else
|
||||||
|
productName = Application.productName;
|
||||||
|
#endif
|
||||||
|
dataPath = Application.dataPath;
|
||||||
|
|
||||||
|
buildThread = new Thread(delegate ()
|
||||||
|
{
|
||||||
|
OVRBuildRun();
|
||||||
|
});
|
||||||
|
buildThread.Start();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else if (buildResult.summary.result == UnityEditor.Build.Reporting.BuildResult.Cancelled)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("Build cancelled.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("Build failed.");
|
||||||
|
}
|
||||||
|
OnBuildComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
private UnityEditor.Build.Reporting.BuildReport UnityBuildPlayer()
|
||||||
|
{
|
||||||
|
// Unity introduced a possible bug with Unity 2020.1.10f1 that causes an exception
|
||||||
|
// when building with the option 'BuildOptions.AcceptExternalModificationsToPlayer'
|
||||||
|
// In order to maintain the same logic, we are using `EditorUserBuildSettings.exportAsGoogleAndroidProject`
|
||||||
|
#if DONT_USE_BUILD_OPTIONS_EXTERNAL_MODIFICATIONS_FLAG
|
||||||
|
bool previousExportAsGoogleAndroidProject = EditorUserBuildSettings.exportAsGoogleAndroidProject;
|
||||||
|
EditorUserBuildSettings.exportAsGoogleAndroidProject = true;
|
||||||
|
#endif
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var sceneList = GetScenesToBuild();
|
||||||
|
|
||||||
|
var buildOptions = BuildOptions.None;
|
||||||
|
if (isDevelopmentBuild)
|
||||||
|
buildOptions |= (BuildOptions.Development | BuildOptions.AllowDebugging);
|
||||||
|
if (isRunOnDevice)
|
||||||
|
buildOptions |= BuildOptions.AutoRunPlayer;
|
||||||
|
#if !DONT_USE_BUILD_OPTIONS_EXTERNAL_MODIFICATIONS_FLAG
|
||||||
|
buildOptions |= BuildOptions.AcceptExternalModificationsToPlayer;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
var buildPlayerOptions = new BuildPlayerOptions
|
||||||
|
{
|
||||||
|
scenes = sceneList.ToArray(),
|
||||||
|
locationPathName = gradleTempExport,
|
||||||
|
target = BuildTarget.Android,
|
||||||
|
options = buildOptions
|
||||||
|
};
|
||||||
|
|
||||||
|
var buildResult = BuildPipeline.BuildPlayer(buildPlayerOptions);
|
||||||
|
|
||||||
|
UnityEngine.Debug.Log(UnityBuildPlayerSummary(buildResult));
|
||||||
|
|
||||||
|
return buildResult;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
#if DONT_USE_BUILD_OPTIONS_EXTERNAL_MODIFICATIONS_FLAG
|
||||||
|
EditorUserBuildSettings.exportAsGoogleAndroidProject = previousExportAsGoogleAndroidProject;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string UnityBuildPlayerSummary(UnityEditor.Build.Reporting.BuildReport report)
|
||||||
|
{
|
||||||
|
var sb = new System.Text.StringBuilder();
|
||||||
|
|
||||||
|
sb.Append($"Unity Build Player: Build {report.summary.result} ({report.summary.totalSize} bytes) in {report.summary.totalTime.TotalSeconds:0.00}s");
|
||||||
|
|
||||||
|
foreach (var step in report.steps)
|
||||||
|
{
|
||||||
|
sb.AppendLine();
|
||||||
|
if (step.depth > 0)
|
||||||
|
{
|
||||||
|
sb.Append(new String('-', step.depth));
|
||||||
|
sb.Append(' ');
|
||||||
|
}
|
||||||
|
sb.Append($"{step.name}: {step.duration:g}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OVRBuildRun()
|
||||||
|
{
|
||||||
|
// 2. Process gradle project
|
||||||
|
IncrementProgressBar("Processing gradle project . . .");
|
||||||
|
if (ProcessGradleProject())
|
||||||
|
{
|
||||||
|
// 3. Build gradle project
|
||||||
|
IncrementProgressBar("Starting gradle build . . .");
|
||||||
|
if (BuildGradleProject())
|
||||||
|
{
|
||||||
|
CopyAPK();
|
||||||
|
|
||||||
|
// 4. Deploy and run
|
||||||
|
if (isRunOnDevice)
|
||||||
|
DeployAPK();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OnBuildComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool BuildGradleProject()
|
||||||
|
{
|
||||||
|
gradleBuildProcess = new Process();
|
||||||
|
string arguments = "-Xmx4096m -classpath \"" + gradlePath + "\" org.gradle.launcher.GradleMain --profile ";
|
||||||
|
if (isDevelopmentBuild)
|
||||||
|
arguments += "assembleDebug -x validateSigningDebug";
|
||||||
|
else
|
||||||
|
arguments += "assembleRelease -x verifyReleaseResources";
|
||||||
|
|
||||||
|
#if UNITY_2019_3_OR_NEWER
|
||||||
|
var gradleProjectPath = gradleExport;
|
||||||
|
#else
|
||||||
|
var gradleProjectPath = Path.Combine(gradleExport, productName);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
var processInfo = new System.Diagnostics.ProcessStartInfo
|
||||||
|
{
|
||||||
|
WorkingDirectory = gradleProjectPath,
|
||||||
|
WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal,
|
||||||
|
FileName = jdkPath,
|
||||||
|
Arguments = arguments,
|
||||||
|
RedirectStandardInput = true,
|
||||||
|
UseShellExecute = false,
|
||||||
|
CreateNoWindow = true,
|
||||||
|
RedirectStandardError = true,
|
||||||
|
RedirectStandardOutput = true,
|
||||||
|
};
|
||||||
|
|
||||||
|
gradleBuildProcess.StartInfo = processInfo;
|
||||||
|
gradleBuildProcess.EnableRaisingEvents = true;
|
||||||
|
|
||||||
|
DateTime gradleStartTime = System.DateTime.Now;
|
||||||
|
DateTime gradleEndTime = System.DateTime.MinValue;
|
||||||
|
|
||||||
|
gradleBuildProcess.Exited += new System.EventHandler(
|
||||||
|
(s, e) =>
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("Gradle: Exited");
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
gradleBuildProcess.OutputDataReceived += new DataReceivedEventHandler(
|
||||||
|
(s, e) =>
|
||||||
|
{
|
||||||
|
if (e != null && e.Data != null &&
|
||||||
|
e.Data.Length != 0 &&
|
||||||
|
(e.Data.Contains("BUILD") || e.Data.StartsWith("See the profiling report at:")))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogFormat("Gradle: {0}", e.Data);
|
||||||
|
if (e.Data.Contains("SUCCESSFUL"))
|
||||||
|
{
|
||||||
|
string buildFlavor = isDevelopmentBuild ? "debug" : "release";
|
||||||
|
UnityEngine.Debug.LogFormat("APK Build Completed: {0}",
|
||||||
|
Path.Combine(gradleExport, $"build\\outputs\\apk\\{buildFlavor}", productName + $"-{buildFlavor}.apk").Replace("/", "\\"));
|
||||||
|
if (!apkOutputSuccessful.HasValue)
|
||||||
|
{
|
||||||
|
apkOutputSuccessful = true;
|
||||||
|
}
|
||||||
|
gradleEndTime = System.DateTime.Now;
|
||||||
|
}
|
||||||
|
else if (e.Data.Contains("FAILED"))
|
||||||
|
{
|
||||||
|
apkOutputSuccessful = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
gradleBuildProcess.ErrorDataReceived += new DataReceivedEventHandler(
|
||||||
|
(s, e) =>
|
||||||
|
{
|
||||||
|
if (e != null && e.Data != null &&
|
||||||
|
e.Data.Length != 0)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogErrorFormat("Gradle: {0}", e.Data);
|
||||||
|
}
|
||||||
|
apkOutputSuccessful = false;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
gradleBuildProcess.Start();
|
||||||
|
gradleBuildProcess.BeginOutputReadLine();
|
||||||
|
IncrementProgressBar("Building gradle project . . .");
|
||||||
|
|
||||||
|
gradleBuildProcess.WaitForExit();
|
||||||
|
|
||||||
|
// Add a timeout for if gradle unexpectedlly exits or errors out
|
||||||
|
Stopwatch timeout = new Stopwatch();
|
||||||
|
timeout.Start();
|
||||||
|
while (apkOutputSuccessful == null)
|
||||||
|
{
|
||||||
|
if (timeout.ElapsedMilliseconds > 5000)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("Gradle has exited unexpectedly.");
|
||||||
|
apkOutputSuccessful = false;
|
||||||
|
}
|
||||||
|
System.Threading.Thread.Sleep(100);
|
||||||
|
}
|
||||||
|
|
||||||
|
return apkOutputSuccessful.HasValue && apkOutputSuccessful.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool ProcessGradleProject()
|
||||||
|
{
|
||||||
|
DateTime syncStartTime = System.DateTime.Now;
|
||||||
|
DateTime syncEndTime = System.DateTime.MinValue;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var ps = System.Text.RegularExpressions.Regex.Escape("" + Path.DirectorySeparatorChar);
|
||||||
|
// ignore files .gradle/** build/** foo/.gradle/** and bar/build/**
|
||||||
|
var ignorePattern = string.Format("^([^{0}]+{0})?(\\.gradle|build){0}", ps);
|
||||||
|
|
||||||
|
var syncer = new DirectorySyncer(gradleTempExport,
|
||||||
|
gradleExport, ignorePattern);
|
||||||
|
|
||||||
|
syncCancelToken = new DirectorySyncer.CancellationTokenSource();
|
||||||
|
var syncResult = syncer.Synchronize(syncCancelToken.Token);
|
||||||
|
syncEndTime = System.DateTime.Now;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("OVRBuild: Processing gradle project failed with exception: " +
|
||||||
|
e.Message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (syncCancelToken.IsCancellationRequested)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static List<string> GetScenesToBuild()
|
||||||
|
{
|
||||||
|
var sceneList = new List<string>();
|
||||||
|
foreach (var scene in EditorBuildSettings.scenes)
|
||||||
|
{
|
||||||
|
// Enumerate scenes in project and check if scene is enabled to build
|
||||||
|
if (scene.enabled)
|
||||||
|
{
|
||||||
|
sceneList.Add(scene.path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sceneList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool CopyAPK()
|
||||||
|
{
|
||||||
|
string buildFlavor = isDevelopmentBuild ? "debug" : "release";
|
||||||
|
string apkPathLocal = Path.Combine(gradleExport, productName, $"build\\outputs\\apk\\{buildFlavor}", productName + $"-{buildFlavor}.apk");
|
||||||
|
if (File.Exists(apkPathLocal))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File.Copy(apkPathLocal, outputApkPath, true);
|
||||||
|
UnityEngine.Debug.Log($"OVRBuild: Output APK generated at {outputApkPath}");
|
||||||
|
Process.Start("explorer.exe", Path.GetDirectoryName(outputApkPath));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool DeployAPK()
|
||||||
|
{
|
||||||
|
// Create new instance of ADB Tool
|
||||||
|
var adbTool = new OVRADBTool(androidSdkPath);
|
||||||
|
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
string apkPathLocal;
|
||||||
|
string buildFlavor = isDevelopmentBuild ? "debug" : "release";
|
||||||
|
string gradleExportFolder = Path.Combine(gradleExport, productName, $"build\\outputs\\apk\\{buildFlavor}");
|
||||||
|
|
||||||
|
// Check to see if gradle output directory exists
|
||||||
|
gradleExportFolder = gradleExportFolder.Replace("/", "\\");
|
||||||
|
if (!Directory.Exists(gradleExportFolder))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("Could not find the gradle project at the expected path: " + gradleExportFolder);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Search for output APK in gradle output directory
|
||||||
|
apkPathLocal = Path.Combine(gradleExportFolder, productName + $"-{buildFlavor}.apk");
|
||||||
|
if (!System.IO.File.Exists(apkPathLocal))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError(string.Format("Could not find {0} in the gradle project.", productName + $"-{buildFlavor}.apk"));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
string output, error;
|
||||||
|
DateTime timerStart;
|
||||||
|
|
||||||
|
// Ensure that the Oculus temp directory is on the device by making it
|
||||||
|
IncrementProgressBar("Making Temp directory on device");
|
||||||
|
string[] mkdirCommand = { "-d shell", "mkdir -p", REMOTE_APK_PATH };
|
||||||
|
if (adbTool.RunCommand(mkdirCommand, null, out output, out error) != 0) return false;
|
||||||
|
|
||||||
|
// Push APK to device, also time how long it takes
|
||||||
|
timerStart = System.DateTime.Now;
|
||||||
|
IncrementProgressBar("Pushing APK to device . . .");
|
||||||
|
string[] pushCommand = { "-d push", "\"" + apkPathLocal + "\"", REMOTE_APK_PATH };
|
||||||
|
if (adbTool.RunCommand(pushCommand, null, out output, out error) != 0) return false;
|
||||||
|
|
||||||
|
// Calculate the transfer speed and determine if user is using USB 2.0 or 3.0
|
||||||
|
// Only bother informing the user on non-trivial transfers, as for very short
|
||||||
|
// periods of time, things like process creation overhead can dwarf the actual
|
||||||
|
// transfer time.
|
||||||
|
TimeSpan pushTime = System.DateTime.Now - timerStart;
|
||||||
|
bool trivialPush = pushTime.TotalSeconds < TRANSFER_SPEED_CHECK_THRESHOLD;
|
||||||
|
long? apkSize = (trivialPush ? (long?)null : new System.IO.FileInfo(apkPathLocal).Length);
|
||||||
|
double? transferSpeed = (apkSize / pushTime.TotalSeconds) / BYTES_TO_MEGABYTES;
|
||||||
|
bool informLog = transferSpeed.HasValue && transferSpeed.Value < USB_TRANSFER_SPEED_THRES;
|
||||||
|
UnityEngine.Debug.Log("OVRADBTool: Push Success");
|
||||||
|
|
||||||
|
// Install the APK package on the device
|
||||||
|
IncrementProgressBar("Installing APK . . .");
|
||||||
|
string apkPath = REMOTE_APK_PATH + "/" + productName + "-debug.apk";
|
||||||
|
apkPath = apkPath.Replace(" ", "\\ ");
|
||||||
|
string[] installCommand = { "-d shell", "pm install -r", apkPath };
|
||||||
|
|
||||||
|
timerStart = System.DateTime.Now;
|
||||||
|
if (adbTool.RunCommand(installCommand, null, out output, out error) != 0) return false;
|
||||||
|
TimeSpan installTime = System.DateTime.Now - timerStart;
|
||||||
|
UnityEngine.Debug.Log("OVRADBTool: Install Success");
|
||||||
|
|
||||||
|
// Start the application on the device
|
||||||
|
IncrementProgressBar("Launching application on device . . .");
|
||||||
|
#if UNITY_2019_3_OR_NEWER
|
||||||
|
string playerActivityName = "\"" + applicationIdentifier + "/com.unity3d.player.UnityPlayerActivity\"";
|
||||||
|
#else
|
||||||
|
string playerActivityName = "\"" + applicationIdentifier + "/" + applicationIdentifier + ".UnityPlayerActivity\"";
|
||||||
|
#endif
|
||||||
|
string[] appStartCommand = { "-d shell", "am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -S -f 0x10200000 -n", playerActivityName };
|
||||||
|
if (adbTool.RunCommand(appStartCommand, null, out output, out error) != 0) return false;
|
||||||
|
UnityEngine.Debug.Log("OVRADBTool: Application Start Success");
|
||||||
|
|
||||||
|
IncrementProgressBar("Success!");
|
||||||
|
|
||||||
|
// If the user is using a USB 2.0 cable, inform them about improved transfer speeds and estimate time saved
|
||||||
|
if (informLog)
|
||||||
|
{
|
||||||
|
float usb3Time = apkSize.Value / (USB_3_TRANSFER_SPEED * BYTES_TO_MEGABYTES); // `informLog` can't be true if `apkSize` is null.
|
||||||
|
UnityEngine.Debug.Log(string.Format("OVRBuild has detected slow transfer speeds. A USB 3.0 cable is recommended to reduce the time it takes to deploy your project by approximatly {0:0.0} seconds", pushTime.TotalSeconds - usb3Time));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("Could not find the ADB executable in the specified Android SDK directory.");
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OnBuildComplete()
|
||||||
|
{
|
||||||
|
showCancel = false;
|
||||||
|
buildInProgress = false;
|
||||||
|
currentStep = 0;
|
||||||
|
SetProgressBarMessage("Waiting to build . . .", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool CheckADBDevices(out string connectedDeviceName)
|
||||||
|
{
|
||||||
|
// Check if there are any ADB devices connected before starting the build process
|
||||||
|
var adbTool = new OVRADBTool(OVRConfig.Instance.GetAndroidSDKPath());
|
||||||
|
connectedDeviceName = null;
|
||||||
|
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
List<string> devices = adbTool.GetDevices();
|
||||||
|
if (devices.Count == 0)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("No ADB devices connected. Connect a device to this computer to run APK.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (devices.Count > 1)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("Multiple ADB devices connected. Disconnect extra devices from this computer to run APK.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
connectedDeviceName = devices[0];
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("OVR ADB Tool failed to initialize. Check the Android SDK path in [Edit -> Preferences -> External Tools]");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void SetupDirectories()
|
||||||
|
{
|
||||||
|
gradleTempExport = Path.Combine(Path.Combine(Application.dataPath, "../Temp"), "OVRGradleTempExport");
|
||||||
|
gradleExport = Path.Combine(Path.Combine(Application.dataPath, "../Temp"), "OVRGradleExport");
|
||||||
|
if (!Directory.Exists(gradleExport))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(gradleExport);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void InitializeProgressBar(int stepCount)
|
||||||
|
{
|
||||||
|
currentStep = 0;
|
||||||
|
totalBuildSteps = stepCount;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void IncrementProgressBar(string message)
|
||||||
|
{
|
||||||
|
currentStep++;
|
||||||
|
progressMessage = message;
|
||||||
|
UnityEngine.Debug.Log("OVRBuild: " + message);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void SetProgressBarMessage(string message, bool log = true)
|
||||||
|
{
|
||||||
|
progressMessage = message;
|
||||||
|
if (log)
|
||||||
|
UnityEngine.Debug.Log("OVRBuild: " + message);
|
||||||
|
}
|
||||||
|
#endif //UNITY_EDITOR_WIN && UNITY_ANDROID
|
||||||
|
}
|
716
Assets/Oculus/VR/Editor/OVRBundleManager.cs
Normal file
716
Assets/Oculus/VR/Editor/OVRBundleManager.cs
Normal file
@ -0,0 +1,716 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if UNITY_EDITOR_WIN && UNITY_ANDROID
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEditor.Build.Reporting;
|
||||||
|
|
||||||
|
public class OVRBundleManager
|
||||||
|
{
|
||||||
|
public const string TRANSITION_APK_VERSION_NAME = "OVRTransitionAPKVersion";
|
||||||
|
public const string BUNDLE_MANAGER_OUTPUT_PATH = "OVRAssetBundles";
|
||||||
|
private const int BUNDLE_CHUNK_SIZE = 30;
|
||||||
|
private const string TRANSITION_SCENE_RELATIVE_PATH = "Scenes/OVRTransitionScene.unity";
|
||||||
|
private const string BUNDLE_MANAGER_MASTER_BUNDLE = "OVRMasterBundle";
|
||||||
|
|
||||||
|
private const string EXTERNAL_STORAGE_PATH = "/sdcard/Android/data";
|
||||||
|
private const string ADB_TOOL_INITIALIZE_ERROR = "Failed to initialize ADB Tool. Please check Android SDK path in Preferences -> External Tools";
|
||||||
|
|
||||||
|
private static string externalSceneCache;
|
||||||
|
private static string transitionScenePath;
|
||||||
|
|
||||||
|
private static string projectDefaultAppIdentifier;
|
||||||
|
private static string projectDefaultVersion;
|
||||||
|
private static AndroidArchitecture projectAndroidArchitecture;
|
||||||
|
private static ScriptingImplementation projectScriptImplementation;
|
||||||
|
private static ManagedStrippingLevel projectManagedStrippingLevel;
|
||||||
|
private static bool projectStripEngineCode;
|
||||||
|
|
||||||
|
public static void BuildDeployTransitionAPK()
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintLog("Building and deploying transition APK . . .\n", true);
|
||||||
|
|
||||||
|
PrebuildProjectSettingUpdate();
|
||||||
|
|
||||||
|
var buildPlayerOptions = CalculateBundleBuildPlayerOptions();
|
||||||
|
if (!buildPlayerOptions.HasValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime apkBuildStart = DateTime.Now;
|
||||||
|
BuildReport report = BuildPipeline.BuildPlayer(buildPlayerOptions.Value);
|
||||||
|
|
||||||
|
if (report.summary.result == BuildResult.Succeeded)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintSuccess();
|
||||||
|
}
|
||||||
|
else if (report.summary.result == BuildResult.Failed)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError();
|
||||||
|
}
|
||||||
|
|
||||||
|
PostbuildProjectSettingUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PrebuildProjectSettingUpdate()
|
||||||
|
{
|
||||||
|
// Save existing settings as some modifications can change other settings
|
||||||
|
projectDefaultAppIdentifier = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android);
|
||||||
|
projectDefaultVersion = PlayerSettings.bundleVersion;
|
||||||
|
projectAndroidArchitecture = PlayerSettings.Android.targetArchitectures;
|
||||||
|
projectScriptImplementation = PlayerSettings.GetScriptingBackend(EditorUserBuildSettings.selectedBuildTargetGroup);
|
||||||
|
projectManagedStrippingLevel = PlayerSettings.GetManagedStrippingLevel(BuildTargetGroup.Android);
|
||||||
|
projectStripEngineCode = PlayerSettings.stripEngineCode;
|
||||||
|
|
||||||
|
// Modify application identifier for transition APK
|
||||||
|
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android,
|
||||||
|
projectDefaultAppIdentifier + GetTransitionApkOptionalIdentifier());
|
||||||
|
|
||||||
|
// Set VersionCode as a unique identifier for transition APK
|
||||||
|
PlayerSettings.bundleVersion = TRANSITION_APK_VERSION_NAME;
|
||||||
|
|
||||||
|
// Modify Android target architecture as ARM64 does not support Mono.
|
||||||
|
if (projectAndroidArchitecture != AndroidArchitecture.ARMv7)
|
||||||
|
{
|
||||||
|
// Show message in console to make it more clear to developers
|
||||||
|
OVRBundleTool.PrintLog("Build will use ARMv7 as Android architecture.");
|
||||||
|
PlayerSettings.Android.targetArchitectures = AndroidArchitecture.ARMv7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Modify IL2CPP option as it strips script symbols that are necessary for the scenes at runtime
|
||||||
|
if (projectScriptImplementation != ScriptingImplementation.Mono2x)
|
||||||
|
{
|
||||||
|
// Show message in console to make it more clear to developers
|
||||||
|
OVRBundleTool.PrintLog("Build will use Mono as scripting backend.");
|
||||||
|
PlayerSettings.SetScriptingBackend(EditorUserBuildSettings.selectedBuildTargetGroup, ScriptingImplementation.Mono2x);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Avoid stripping managed code that are necessary for the scenes at runtime
|
||||||
|
if (projectManagedStrippingLevel != ManagedStrippingLevel.Disabled)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintLog("Build will set Managed Stripping Level to Disabled.");
|
||||||
|
PlayerSettings.SetManagedStrippingLevel(BuildTargetGroup.Android, ManagedStrippingLevel.Disabled);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (projectStripEngineCode)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintLog("Build will set Strip Engine Code to Disabled.");
|
||||||
|
PlayerSettings.stripEngineCode = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static BuildPlayerOptions? CalculateBundleBuildPlayerOptions()
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(BUNDLE_MANAGER_OUTPUT_PATH))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(BUNDLE_MANAGER_OUTPUT_PATH);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (String.IsNullOrEmpty(transitionScenePath))
|
||||||
|
{
|
||||||
|
// Get current editor script's directory as base path
|
||||||
|
string[] res = System.IO.Directory.GetFiles(Application.dataPath, "OVRBundleManager.cs", SearchOption.AllDirectories);
|
||||||
|
if (res.Length > 1)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError("More than one OVRBundleManager editor script has been found, please double check your Oculus SDK import.");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Append Transition Scene's relative path to base path
|
||||||
|
var OVREditorScript = Path.GetDirectoryName(res[0]);
|
||||||
|
transitionScenePath = Path.Combine(OVREditorScript, TRANSITION_SCENE_RELATIVE_PATH);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string[] buildScenes = new string[1] { transitionScenePath };
|
||||||
|
string apkOutputPath = Path.Combine(BUNDLE_MANAGER_OUTPUT_PATH, "OVRTransition.apk");
|
||||||
|
|
||||||
|
return new BuildPlayerOptions
|
||||||
|
{
|
||||||
|
scenes = buildScenes,
|
||||||
|
locationPathName = apkOutputPath,
|
||||||
|
target = BuildTarget.Android,
|
||||||
|
options = BuildOptions.Development |
|
||||||
|
BuildOptions.AutoRunPlayer
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PostbuildProjectSettingUpdate()
|
||||||
|
{
|
||||||
|
// Restore application identifier
|
||||||
|
PlayerSettings.SetApplicationIdentifier(BuildTargetGroup.Android,
|
||||||
|
projectDefaultAppIdentifier);
|
||||||
|
|
||||||
|
// Restore version setting
|
||||||
|
PlayerSettings.bundleVersion = projectDefaultVersion;
|
||||||
|
|
||||||
|
// Restore scripting backend option
|
||||||
|
if (PlayerSettings.GetScriptingBackend(EditorUserBuildSettings.selectedBuildTargetGroup) != projectScriptImplementation)
|
||||||
|
{
|
||||||
|
PlayerSettings.SetScriptingBackend(EditorUserBuildSettings.selectedBuildTargetGroup, projectScriptImplementation);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Restore managed stripping level
|
||||||
|
if (PlayerSettings.GetManagedStrippingLevel(BuildTargetGroup.Android) != projectManagedStrippingLevel)
|
||||||
|
{
|
||||||
|
PlayerSettings.SetManagedStrippingLevel(BuildTargetGroup.Android, projectManagedStrippingLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Restore Strip Engine Code
|
||||||
|
if (PlayerSettings.stripEngineCode != projectStripEngineCode)
|
||||||
|
{
|
||||||
|
PlayerSettings.stripEngineCode = projectStripEngineCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Restore Android Architecture
|
||||||
|
if (PlayerSettings.Android.targetArchitectures != projectAndroidArchitecture)
|
||||||
|
{
|
||||||
|
PlayerSettings.Android.targetArchitectures = projectAndroidArchitecture;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build and deploy a list of scenes. It's suggested to only build and deploy one active scene that's being modified and
|
||||||
|
// its dependencies such as scenes that are loaded additively
|
||||||
|
public static void BuildDeployScenes(List<OVRBundleTool.EditorSceneInfo> sceneList, bool forceRestart)
|
||||||
|
{
|
||||||
|
externalSceneCache = EXTERNAL_STORAGE_PATH + "/" + PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android)
|
||||||
|
+ GetTransitionApkOptionalIdentifier() + "/cache/scenes";
|
||||||
|
|
||||||
|
for (int i = 0; i < sceneList.Count; i++)
|
||||||
|
{
|
||||||
|
if (!sceneList[i].shouldDeploy) continue;
|
||||||
|
sceneList[i].buildStatus = OVRBundleTool.SceneBundleStatus.QUEUED;
|
||||||
|
}
|
||||||
|
|
||||||
|
BuildSceneBundles(sceneList);
|
||||||
|
if (DeploySceneBundles(sceneList))
|
||||||
|
{
|
||||||
|
if (forceRestart)
|
||||||
|
{
|
||||||
|
LaunchApplication();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
OVRBundleTool.PrintSuccess();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build assets that are used by scenes from the given list.
|
||||||
|
// This function will automatically de-duplicated same asset file being referenced in multiple scenes.
|
||||||
|
// Scene bundles will be created with name pattern: <SceneName>_<AssetTypeExtention><ChunckNumber>
|
||||||
|
private static void BuildSceneBundles(List<OVRBundleTool.EditorSceneInfo> sceneList)
|
||||||
|
{
|
||||||
|
DateTime totalStart = DateTime.Now;
|
||||||
|
// Keeps track of dependent assets across scenes
|
||||||
|
// to ensure each asset is only packaged once in one of the scene bundles.
|
||||||
|
// uniqueAssetInSceneBundle is a map from "asset unique identifier" to the first scene that references the asset.
|
||||||
|
// It supports different assets with same file name as "asset unique identifier" contain full qualified asset file path
|
||||||
|
Dictionary<string, string> uniqueAssetInSceneBundle = new Dictionary<string, string>();
|
||||||
|
|
||||||
|
// List of bundle targets for Unity's build pipeline to package
|
||||||
|
List<AssetBundleBuild> assetBundleBuilds = new List<AssetBundleBuild>();
|
||||||
|
// Map that contains "asset type" to list of assets that are of the asset type
|
||||||
|
Dictionary<string, List<string>> extToAssetList = new Dictionary<string, List<string>>();
|
||||||
|
|
||||||
|
// Check if assets in Resources need to be packaged
|
||||||
|
if (CheckForResources())
|
||||||
|
{
|
||||||
|
var resourceDirectories = Directory.GetDirectories("Assets", "Resources", SearchOption.AllDirectories).ToArray();
|
||||||
|
// Fetch a list of all files in resource directory
|
||||||
|
string[] resourceAssetPaths = AssetDatabase.FindAssets("", resourceDirectories).Select(x => AssetDatabase.GUIDToAssetPath(x)).ToArray();
|
||||||
|
ProcessAssets(resourceAssetPaths, "resources", ref uniqueAssetInSceneBundle, ref extToAssetList);
|
||||||
|
|
||||||
|
AssetBundleBuild resourceBundle = new AssetBundleBuild();
|
||||||
|
resourceBundle.assetNames = uniqueAssetInSceneBundle.Keys.ToArray();
|
||||||
|
resourceBundle.assetBundleName = OVRSceneLoader.resourceBundleName;
|
||||||
|
assetBundleBuilds.Add(resourceBundle);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create scene bundle output directory
|
||||||
|
string sceneBundleDirectory = Path.Combine(BUNDLE_MANAGER_OUTPUT_PATH, BUNDLE_MANAGER_MASTER_BUNDLE);
|
||||||
|
if (!Directory.Exists(sceneBundleDirectory))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(sceneBundleDirectory);
|
||||||
|
}
|
||||||
|
|
||||||
|
OVRBundleTool.PrintLog("Building scene bundles . . . ");
|
||||||
|
DateTime labelingStart = DateTime.Now;
|
||||||
|
|
||||||
|
for (int i = 0; i < sceneList.Count; ++i)
|
||||||
|
{
|
||||||
|
var scene = sceneList[i];
|
||||||
|
if (!scene.shouldDeploy) continue;
|
||||||
|
|
||||||
|
// Get all the assets that the scene depends on and sort them by type
|
||||||
|
DateTime getDepStart = DateTime.Now;
|
||||||
|
string[] assetDependencies = AssetDatabase.GetDependencies(scene.scenePath);
|
||||||
|
Debug.Log("[OVRBundleManager] - " + scene.sceneName + " - Calculated scene asset dependencies in: " + (DateTime.Now - getDepStart).TotalSeconds);
|
||||||
|
ProcessAssets(assetDependencies, scene.sceneName, ref uniqueAssetInSceneBundle, ref extToAssetList);
|
||||||
|
|
||||||
|
// Add the scene into it's own bundle
|
||||||
|
string[] sceneAsset = new string[1] { scene.scenePath };
|
||||||
|
AssetBundleBuild sceneBuild = new AssetBundleBuild();
|
||||||
|
sceneBuild.assetBundleName = "scene_" + scene.sceneName;
|
||||||
|
sceneBuild.assetNames = sceneAsset;
|
||||||
|
assetBundleBuilds.Add(sceneBuild);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chunk the asset bundles by number of assets
|
||||||
|
foreach (string ext in extToAssetList.Keys)
|
||||||
|
{
|
||||||
|
int assetCount = extToAssetList[ext].Count;
|
||||||
|
int numChunks = (assetCount + BUNDLE_CHUNK_SIZE - 1) / BUNDLE_CHUNK_SIZE;
|
||||||
|
//Debug.Log(ext + " has " + assetCount + " asset(s) that will be split into " + numChunks + " chunk(s)");
|
||||||
|
for (int i = 0; i < numChunks; i++)
|
||||||
|
{
|
||||||
|
List<string> assetChunkList;
|
||||||
|
if (i == numChunks - 1)
|
||||||
|
{
|
||||||
|
int size = BUNDLE_CHUNK_SIZE - (numChunks * BUNDLE_CHUNK_SIZE - assetCount);
|
||||||
|
assetChunkList = extToAssetList[ext].GetRange(i * BUNDLE_CHUNK_SIZE, size);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
assetChunkList = extToAssetList[ext].GetRange(i * BUNDLE_CHUNK_SIZE, BUNDLE_CHUNK_SIZE);
|
||||||
|
}
|
||||||
|
AssetBundleBuild build = new AssetBundleBuild();
|
||||||
|
build.assetBundleName = "asset_" + ext + i;
|
||||||
|
build.assetNames = assetChunkList.ToArray();
|
||||||
|
//Debug.Log("Chunk " + i + " has " + assetChunkList.Count + " asset(s)");
|
||||||
|
assetBundleBuilds.Add(build);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Log("[OVRBundleManager] - Created chucked scene bundles in: " + (DateTime.Now - labelingStart).TotalSeconds);
|
||||||
|
|
||||||
|
// Build asset bundles
|
||||||
|
BuildPipeline.BuildAssetBundles(sceneBundleDirectory, assetBundleBuilds.ToArray(),
|
||||||
|
BuildAssetBundleOptions.UncompressedAssetBundle, BuildTarget.Android);
|
||||||
|
|
||||||
|
double bundleBuildTime = (DateTime.Now - totalStart).TotalSeconds;
|
||||||
|
Debug.Log("[OVRBundleManager] - Total Time: " + bundleBuildTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ProcessAssets(string[] assetPaths,
|
||||||
|
string assetParent,
|
||||||
|
ref Dictionary<string, string> uniqueAssetInSceneBundle,
|
||||||
|
ref Dictionary<string, List<string>> extToAssetList)
|
||||||
|
{
|
||||||
|
foreach (string asset in assetPaths)
|
||||||
|
{
|
||||||
|
string ext = Path.GetExtension(asset);
|
||||||
|
if (!string.IsNullOrEmpty(ext))
|
||||||
|
{
|
||||||
|
ext = ext.Substring(1);
|
||||||
|
if (!ext.Equals("cs") && !ext.Equals("unity"))
|
||||||
|
{
|
||||||
|
// Only process each asset once across all resource and scene bundles
|
||||||
|
// Each asset is keyed by full path as a unique identifier
|
||||||
|
if (!uniqueAssetInSceneBundle.ContainsKey(asset))
|
||||||
|
{
|
||||||
|
var assetObject = (UnityEngine.Object)AssetDatabase.LoadAssetAtPath(asset, typeof(UnityEngine.Object));
|
||||||
|
if (assetObject == null || (assetObject.hideFlags & HideFlags.DontSaveInBuild) == 0)
|
||||||
|
{
|
||||||
|
uniqueAssetInSceneBundle[asset] = assetParent;
|
||||||
|
|
||||||
|
if (assetParent != "resources")
|
||||||
|
{
|
||||||
|
if (!extToAssetList.ContainsKey(ext))
|
||||||
|
{
|
||||||
|
extToAssetList[ext] = new List<string>();
|
||||||
|
}
|
||||||
|
extToAssetList[ext].Add(asset);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool DeploySceneBundles(List<OVRBundleTool.EditorSceneInfo> sceneList)
|
||||||
|
{
|
||||||
|
// Create Temp directory on local machine if it does not exist
|
||||||
|
string tempDirectory = Path.Combine(BUNDLE_MANAGER_OUTPUT_PATH, "Temp");
|
||||||
|
if (!Directory.Exists(tempDirectory))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(tempDirectory);
|
||||||
|
}
|
||||||
|
string absoluteTempPath = Path.Combine(Path.Combine(Application.dataPath, ".."), tempDirectory);
|
||||||
|
|
||||||
|
OVRBundleTool.PrintLog("Deploying scene bundles to device . . . ");
|
||||||
|
|
||||||
|
OVRADBTool adbTool = new OVRADBTool(OVRConfig.Instance.GetAndroidSDKPath());
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
DateTime transferStart = DateTime.Now;
|
||||||
|
|
||||||
|
for (int i = 0; i < sceneList.Count; ++i)
|
||||||
|
{
|
||||||
|
if (!sceneList[i].shouldDeploy) continue;
|
||||||
|
OVRBundleTool.UpdateSceneBuildStatus(OVRBundleTool.SceneBundleStatus.TRANSFERRING, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transfer all scene bundles that are relavent
|
||||||
|
if (!TransferSceneBundles(adbTool, absoluteTempPath, externalSceneCache))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < sceneList.Count; ++i)
|
||||||
|
{
|
||||||
|
if (!sceneList[i].shouldDeploy) continue;
|
||||||
|
OVRBundleTool.UpdateSceneBuildStatus(OVRBundleTool.SceneBundleStatus.DEPLOYED, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create file to tell transition scene APK which scene to load and push it to the device
|
||||||
|
string sceneLoadDataPath = Path.Combine(tempDirectory, OVRSceneLoader.sceneLoadDataName);
|
||||||
|
if (File.Exists(sceneLoadDataPath))
|
||||||
|
{
|
||||||
|
File.Delete(sceneLoadDataPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
StreamWriter writer = new StreamWriter(sceneLoadDataPath, true);
|
||||||
|
// Write version and scene names
|
||||||
|
long unixTime = (int)(DateTimeOffset.UtcNow.ToUniversalTime() - new DateTime(1970, 1, 1, 0, 0, 0)).TotalSeconds;
|
||||||
|
writer.WriteLine(unixTime.ToString());
|
||||||
|
for (int i = 0; i < sceneList.Count; i++)
|
||||||
|
{
|
||||||
|
if (!sceneList[i].shouldDeploy) continue;
|
||||||
|
writer.WriteLine(Path.GetFileNameWithoutExtension(sceneList[i].scenePath));
|
||||||
|
}
|
||||||
|
|
||||||
|
writer.Close();
|
||||||
|
|
||||||
|
string absoluteSceneLoadDataPath = Path.Combine(absoluteTempPath, OVRSceneLoader.sceneLoadDataName);
|
||||||
|
string[] pushCommand = { "-d push", "\"" + absoluteSceneLoadDataPath + "\"", "\"" + externalSceneCache + "\"" };
|
||||||
|
string output, error;
|
||||||
|
if (adbTool.RunCommand(pushCommand, null, out output, out error) == 0)
|
||||||
|
{
|
||||||
|
Debug.Log("[OVRBundleManager] Scene Load Data Pushed to Device.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
OVRBundleTool.PrintError(string.IsNullOrEmpty(error) ? output : error);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError(ADB_TOOL_INITIALIZE_ERROR);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool TransferSceneBundles(OVRADBTool adbTool, string absoluteTempPath, string externalSceneCache)
|
||||||
|
{
|
||||||
|
List<string> bundlesToTransfer = new List<string>();
|
||||||
|
List<string> bundlesToDelete = new List<string>();
|
||||||
|
string manifestFilePath = externalSceneCache + "/" + BUNDLE_MANAGER_MASTER_BUNDLE;
|
||||||
|
|
||||||
|
string[] pullManifestCommand = { "-d pull", "\"" + manifestFilePath + "\"", "\"" + absoluteTempPath + "\"" };
|
||||||
|
|
||||||
|
string output, error;
|
||||||
|
if (adbTool.RunCommand(pullManifestCommand, null, out output, out error) == 0)
|
||||||
|
{
|
||||||
|
// An existing manifest file was found on device. Load hashes and upload bundles that have changed hashes.
|
||||||
|
Debug.Log("[OVRBundleManager] - Scene bundle manifest file found. Decoding changes . . .");
|
||||||
|
|
||||||
|
// Load hashes from remote manifest
|
||||||
|
AssetBundle remoteBundle = AssetBundle.LoadFromFile(Path.Combine(absoluteTempPath, BUNDLE_MANAGER_MASTER_BUNDLE));
|
||||||
|
if (remoteBundle == null)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError("Failed to load remote asset bundle manifest file.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AssetBundleManifest remoteManifest = remoteBundle.LoadAsset<AssetBundleManifest>("AssetBundleManifest");
|
||||||
|
|
||||||
|
Dictionary<string, Hash128> remoteBundleToHash = new Dictionary<string, Hash128>();
|
||||||
|
if (remoteManifest != null)
|
||||||
|
{
|
||||||
|
string[] assetBundles = remoteManifest.GetAllAssetBundles();
|
||||||
|
foreach (string bundleName in assetBundles)
|
||||||
|
{
|
||||||
|
remoteBundleToHash[bundleName] = remoteManifest.GetAssetBundleHash(bundleName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
remoteBundle.Unload(true);
|
||||||
|
|
||||||
|
// Load hashes from local manifest
|
||||||
|
AssetBundle localBundle = AssetBundle.LoadFromFile(BUNDLE_MANAGER_OUTPUT_PATH + "\\" + BUNDLE_MANAGER_MASTER_BUNDLE
|
||||||
|
+ "\\" + BUNDLE_MANAGER_MASTER_BUNDLE);
|
||||||
|
if (localBundle == null)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError("<color=red>Failed to load local asset bundle manifest file.\n</color>");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
AssetBundleManifest localManifest = localBundle.LoadAsset<AssetBundleManifest>("AssetBundleManifest");
|
||||||
|
|
||||||
|
if (localManifest != null)
|
||||||
|
{
|
||||||
|
Hash128 zeroHash = new Hash128(0, 0, 0, 0);
|
||||||
|
|
||||||
|
// Build a list of dirty bundles that will have to be transfered
|
||||||
|
string relativeSceneBundlesPath = Path.Combine(BUNDLE_MANAGER_OUTPUT_PATH, BUNDLE_MANAGER_MASTER_BUNDLE);
|
||||||
|
bundlesToTransfer.Add(Path.Combine(relativeSceneBundlesPath, BUNDLE_MANAGER_MASTER_BUNDLE));
|
||||||
|
string[] assetBundles = localManifest.GetAllAssetBundles();
|
||||||
|
foreach (string bundleName in assetBundles)
|
||||||
|
{
|
||||||
|
if (!remoteBundleToHash.ContainsKey(bundleName))
|
||||||
|
{
|
||||||
|
bundlesToTransfer.Add(Path.Combine(relativeSceneBundlesPath, bundleName));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (remoteBundleToHash[bundleName] != localManifest.GetAssetBundleHash(bundleName))
|
||||||
|
{
|
||||||
|
bundlesToTransfer.Add(Path.Combine(relativeSceneBundlesPath, bundleName));
|
||||||
|
}
|
||||||
|
remoteBundleToHash[bundleName] = zeroHash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OVRBundleTool.PrintLog(bundlesToTransfer.Count + " dirty bundle(s) will be transfered.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (output.Contains("does not exist") || output.Contains("No such file or directory"))
|
||||||
|
{
|
||||||
|
// Fresh install of asset bundles, transfer all asset bundles
|
||||||
|
OVRBundleTool.PrintLog("Manifest file not found. Transfering all bundles . . . ");
|
||||||
|
|
||||||
|
string[] mkdirCommand = { "-d shell", "mkdir -p", "\"" + externalSceneCache + "\"" };
|
||||||
|
if (adbTool.RunCommand(mkdirCommand, null, out output, out error) == 0)
|
||||||
|
{
|
||||||
|
string absoluteSceneBundlePath = Path.Combine(Path.Combine(Application.dataPath, ".."),
|
||||||
|
Path.Combine(BUNDLE_MANAGER_OUTPUT_PATH, BUNDLE_MANAGER_MASTER_BUNDLE));
|
||||||
|
|
||||||
|
string[] assetBundlePaths = Directory.GetFiles(absoluteSceneBundlePath);
|
||||||
|
if (assetBundlePaths.Length != 0)
|
||||||
|
{
|
||||||
|
foreach (string path in assetBundlePaths)
|
||||||
|
{
|
||||||
|
if (!path.Contains(".manifest"))
|
||||||
|
{
|
||||||
|
bundlesToTransfer.Add(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError("Failed to locate scene bundles to transfer.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If any adb error occured during manifest calculation, print it and return false
|
||||||
|
if (!string.IsNullOrEmpty(error) || output.Contains("error"))
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError(string.IsNullOrEmpty(error) ? output : error);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Transfer bundles to device
|
||||||
|
DateTime transferStart = DateTime.Now;
|
||||||
|
foreach (string bundle in bundlesToTransfer)
|
||||||
|
{
|
||||||
|
string absoluteBundlePath = Path.Combine(Path.Combine(Application.dataPath, ".."), bundle);
|
||||||
|
string[] pushBundleCommand = { "-d push", "\"" + absoluteBundlePath + "\"", "\"" + externalSceneCache + "\"" };
|
||||||
|
adbTool.RunCommandAsync(pushBundleCommand, null);
|
||||||
|
}
|
||||||
|
Debug.Log("[OVRBundleManager] - Transfer took " + (DateTime.Now - transferStart).TotalSeconds + " seconds.");
|
||||||
|
|
||||||
|
// Delete stale bundles on device
|
||||||
|
if (bundlesToDelete.Count > 0)
|
||||||
|
{
|
||||||
|
foreach (string bundle in bundlesToDelete)
|
||||||
|
{
|
||||||
|
string bundlePath = externalSceneCache + "/" + bundle;
|
||||||
|
string[] deleteBundleCommand = { "-d shell", "rm", "\"" + bundlePath + "\"" };
|
||||||
|
adbTool.RunCommandAsync(deleteBundleCommand, null);
|
||||||
|
}
|
||||||
|
OVRBundleTool.PrintLog("Deleted " + bundlesToDelete.Count + " bundle(s) that were stale");
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool LaunchApplication()
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintLog("Launching Application . . . ");
|
||||||
|
|
||||||
|
OVRADBTool adbTool = new OVRADBTool(OVRConfig.Instance.GetAndroidSDKPath());
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
string output, error;
|
||||||
|
string appPackagename = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android)
|
||||||
|
+ GetTransitionApkOptionalIdentifier();
|
||||||
|
string playerActivityName = "\"" + appPackagename + "/com.unity3d.player.UnityPlayerActivity\"";
|
||||||
|
string[] appStartCommand = { "-d shell", "am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -S -f 0x10200000 -n", playerActivityName };
|
||||||
|
if (adbTool.RunCommand(appStartCommand, null, out output, out error) == 0)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintSuccess();
|
||||||
|
OVRBundleTool.PrintLog("App package " + appPackagename + " is launched.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
string completeError = "Failed to launch application. Try launching it manually through the device.\n" + (string.IsNullOrEmpty(error) ? output : error);
|
||||||
|
OVRBundleTool.PrintError(completeError);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError(ADB_TOOL_INITIALIZE_ERROR);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool UninstallAPK()
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintLog("Uninstalling Application . . .");
|
||||||
|
|
||||||
|
OVRADBTool adbTool = new OVRADBTool(OVRConfig.Instance.GetAndroidSDKPath());
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
string output, error;
|
||||||
|
string appPackagename = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android)
|
||||||
|
+ GetTransitionApkOptionalIdentifier();
|
||||||
|
string[] appStartCommand = { "-d shell", "pm uninstall", appPackagename };
|
||||||
|
if (adbTool.RunCommand(appStartCommand, null, out output, out error) == 0)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintSuccess();
|
||||||
|
OVRBundleTool.PrintLog("App package " + appPackagename + " is uninstalled.");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
OVRBundleTool.PrintError("Failed to uninstall APK.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError(ADB_TOOL_INITIALIZE_ERROR);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void DeleteRemoteAssetBundles()
|
||||||
|
{
|
||||||
|
OVRADBTool adbTool = new OVRADBTool(OVRConfig.Instance.GetAndroidSDKPath());
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
externalSceneCache = EXTERNAL_STORAGE_PATH + "/" + PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android)
|
||||||
|
+ GetTransitionApkOptionalIdentifier() + "/cache/scenes";
|
||||||
|
|
||||||
|
bool failure = false;
|
||||||
|
string fileExistsError = "No such file or directory";
|
||||||
|
OVRBundleTool.PrintLog("Deleting device bundles . . . ");
|
||||||
|
string output, error;
|
||||||
|
string[] deleteBundleCommand = { "-d shell", "rm -r", externalSceneCache };
|
||||||
|
if (adbTool.RunCommand(deleteBundleCommand, null, out output, out error) != 0)
|
||||||
|
{
|
||||||
|
if (!(output.Contains(fileExistsError) || error.Contains(fileExistsError)))
|
||||||
|
{
|
||||||
|
failure = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failure)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError(string.IsNullOrEmpty(error) ? output : error);
|
||||||
|
OVRBundleTool.PrintError("Failed to delete scene bundle cache directory.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintSuccess();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError(ADB_TOOL_INITIALIZE_ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string[] ListRemoteAssetBundleNames()
|
||||||
|
{
|
||||||
|
OVRADBTool adbTool = new OVRADBTool(OVRConfig.Instance.GetAndroidSDKPath());
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
externalSceneCache = EXTERNAL_STORAGE_PATH + "/" + PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android)
|
||||||
|
+ GetTransitionApkOptionalIdentifier() + "/cache/scenes";
|
||||||
|
|
||||||
|
string output, error;
|
||||||
|
string[] listBundlesCommand = { "-d shell", "ls", externalSceneCache };
|
||||||
|
if (adbTool.RunCommand(listBundlesCommand, null, out output, out error) == 0)
|
||||||
|
{
|
||||||
|
return output.Split(new[]{ '\r', '\n'}, StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void DeleteLocalAssetBundles()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (Directory.Exists(BUNDLE_MANAGER_OUTPUT_PATH))
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintLog("Deleting local bundles . . . ");
|
||||||
|
Directory.Delete(BUNDLE_MANAGER_OUTPUT_PATH, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
OVRBundleTool.PrintError(e.Message);
|
||||||
|
}
|
||||||
|
OVRBundleTool.PrintSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool CheckForResources()
|
||||||
|
{
|
||||||
|
string[] resourceDirectories = Directory.GetDirectories("Assets", "Resources", SearchOption.AllDirectories);
|
||||||
|
return resourceDirectories.Length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetTransitionApkOptionalIdentifier()
|
||||||
|
{
|
||||||
|
string transitionApkOptionalIdentifier;
|
||||||
|
// Check option value from editor UI
|
||||||
|
if (OVRBundleTool.GetUseOptionalTransitionApkPackage())
|
||||||
|
{
|
||||||
|
// Append .transition to default app package name to optionally allow both
|
||||||
|
// full build apk and transition apk to be installed on device
|
||||||
|
transitionApkOptionalIdentifier = ".transition";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
transitionApkOptionalIdentifier = "";
|
||||||
|
}
|
||||||
|
return transitionApkOptionalIdentifier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
647
Assets/Oculus/VR/Editor/OVRBundleTool.cs
Normal file
647
Assets/Oculus/VR/Editor/OVRBundleTool.cs
Normal file
@ -0,0 +1,647 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if UNITY_EDITOR_WIN && UNITY_ANDROID
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
|
public class OVRBundleTool : EditorWindow
|
||||||
|
{
|
||||||
|
private static List<EditorSceneInfo> buildableScenes;
|
||||||
|
private static Vector2 debugLogScroll = new Vector2(0, 0);
|
||||||
|
private static bool invalidBuildableScene;
|
||||||
|
|
||||||
|
private static string toolLog;
|
||||||
|
private static bool deployScenesWhenDeployingApk;
|
||||||
|
private static bool useOptionalTransitionApkPackage;
|
||||||
|
private static GUIStyle windowStyle;
|
||||||
|
private static GUIStyle logBoxStyle;
|
||||||
|
private static GUIStyle statusStyle;
|
||||||
|
private static Vector2 logBoxSize;
|
||||||
|
private static Vector2 sceneScrollViewPos;
|
||||||
|
|
||||||
|
private bool forceRestart = false;
|
||||||
|
private bool showBundleManagement = false;
|
||||||
|
private bool showOther = false;
|
||||||
|
|
||||||
|
// Needed to ensure that APK checking does happen during editor start up, but will still happen when the window is opened/updated
|
||||||
|
private static bool panelInitialized = false;
|
||||||
|
|
||||||
|
const float spacesPerIndent = 12;
|
||||||
|
|
||||||
|
private enum ApkStatus
|
||||||
|
{
|
||||||
|
UNKNOWN,
|
||||||
|
OK,
|
||||||
|
NOT_INSTALLED,
|
||||||
|
DEVICE_NOT_CONNECTED,
|
||||||
|
};
|
||||||
|
|
||||||
|
public enum SceneBundleStatus
|
||||||
|
{
|
||||||
|
[Description("")]
|
||||||
|
UNKNOWN,
|
||||||
|
[Description("Queued")]
|
||||||
|
QUEUED,
|
||||||
|
[Description("Building")]
|
||||||
|
BUILDING,
|
||||||
|
[Description("Done")]
|
||||||
|
DONE,
|
||||||
|
[Description("Transferring")]
|
||||||
|
TRANSFERRING,
|
||||||
|
[Description("Deployed")]
|
||||||
|
DEPLOYED,
|
||||||
|
};
|
||||||
|
|
||||||
|
public class EditorSceneInfo
|
||||||
|
{
|
||||||
|
public string scenePath;
|
||||||
|
public string sceneName;
|
||||||
|
public SceneBundleStatus buildStatus;
|
||||||
|
public bool shouldDeploy;
|
||||||
|
|
||||||
|
public EditorSceneInfo(string path, string name)
|
||||||
|
{
|
||||||
|
scenePath = path;
|
||||||
|
sceneName = name;
|
||||||
|
buildStatus = SceneBundleStatus.UNKNOWN;
|
||||||
|
shouldDeploy = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum GuiAction
|
||||||
|
{
|
||||||
|
None,
|
||||||
|
OpenBuildSettingsWindow,
|
||||||
|
BuildAndDeployScenes,
|
||||||
|
BuildAndDeployApp,
|
||||||
|
ClearDeviceBundles,
|
||||||
|
ClearLocalBundles,
|
||||||
|
LaunchApp,
|
||||||
|
UninstallApk,
|
||||||
|
ClearLog,
|
||||||
|
}
|
||||||
|
|
||||||
|
private GuiAction action = GuiAction.None;
|
||||||
|
|
||||||
|
private static ApkStatus currentApkStatus;
|
||||||
|
|
||||||
|
private const string deployScenesWhenDeployingApkPrefName = "OVRBundleTool_DeployScenesWithAPK";
|
||||||
|
private const string useOptionalTransitionApkPackagePrefName = "OVRBundleTool_UseOptionalPackageName";
|
||||||
|
|
||||||
|
[MenuItem("Oculus/OVR Build/OVR Scene Quick Preview %l", false, 10)]
|
||||||
|
static void Init()
|
||||||
|
{
|
||||||
|
currentApkStatus = ApkStatus.UNKNOWN;
|
||||||
|
|
||||||
|
EditorWindow.GetWindow(typeof(OVRBundleTool));
|
||||||
|
|
||||||
|
invalidBuildableScene = false;
|
||||||
|
InitializePanel();
|
||||||
|
|
||||||
|
OVRPlugin.SetDeveloperMode(OVRPlugin.Bool.True);
|
||||||
|
OVRPlugin.SendEvent("oculus_bundle_tool", "show_window");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnEnable()
|
||||||
|
{
|
||||||
|
InitializePanel();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void InitializePanel()
|
||||||
|
{
|
||||||
|
panelInitialized = true;
|
||||||
|
GetScenesFromBuildSettings();
|
||||||
|
deployScenesWhenDeployingApk = EditorPrefs.GetBool(deployScenesWhenDeployingApkPrefName, true);
|
||||||
|
useOptionalTransitionApkPackage = EditorPrefs.GetBool(useOptionalTransitionApkPackagePrefName, false);
|
||||||
|
EditorBuildSettings.sceneListChanged += GetScenesFromBuildSettings;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnGUI()
|
||||||
|
{
|
||||||
|
this.titleContent.text = "OVR Scene Quick Preview";
|
||||||
|
|
||||||
|
if (panelInitialized)
|
||||||
|
{
|
||||||
|
CheckForTransitionAPK();
|
||||||
|
CheckForDeployedScenes();
|
||||||
|
panelInitialized = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (windowStyle == null)
|
||||||
|
{
|
||||||
|
windowStyle = new GUIStyle();
|
||||||
|
windowStyle.margin = new RectOffset(10, 10, 10, 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (logBoxStyle == null)
|
||||||
|
{
|
||||||
|
logBoxStyle = new GUIStyle();
|
||||||
|
logBoxStyle.margin.left = 5;
|
||||||
|
logBoxStyle.wordWrap = true;
|
||||||
|
logBoxStyle.normal.textColor = logBoxStyle.focused.textColor = EditorStyles.label.normal.textColor;
|
||||||
|
logBoxStyle.richText = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (statusStyle == null)
|
||||||
|
{
|
||||||
|
statusStyle = new GUIStyle(EditorStyles.label);
|
||||||
|
statusStyle.richText = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.BeginVertical(windowStyle);
|
||||||
|
|
||||||
|
GUILayout.BeginHorizontal(EditorStyles.helpBox);
|
||||||
|
GUILayout.BeginVertical();
|
||||||
|
EditorGUILayout.LabelField("OVR Scene Quick Preview generates a version of your app which supports hot-reloading "
|
||||||
|
+ "content changes to individual scenes, reducing iteration time.",
|
||||||
|
EditorStyles.wordWrappedLabel);
|
||||||
|
|
||||||
|
#if UNITY_2021_1_OR_NEWER
|
||||||
|
if (EditorGUILayout.LinkButton("Documentation"))
|
||||||
|
#else
|
||||||
|
if (GUILayout.Button("Documentation", GUILayout.ExpandWidth(false)))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
Application.OpenURL("https://developer.oculus.com/documentation/unity/unity-build-android-tools/");
|
||||||
|
}
|
||||||
|
GUILayout.EndVertical();
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
GUILayout.Space(10f);
|
||||||
|
GUIContent transitionContent = new GUIContent("Modified APK [?]",
|
||||||
|
"Build and deploy an APK that can hot-reload scenes. This enables fast iteration on content changes to scenes.");
|
||||||
|
GUILayout.Label(transitionContent, EditorStyles.boldLabel);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
{
|
||||||
|
GUILayout.Label("Status: ", statusStyle, GUILayout.ExpandWidth(false));
|
||||||
|
|
||||||
|
string statusMesssage;
|
||||||
|
switch (currentApkStatus)
|
||||||
|
{
|
||||||
|
case ApkStatus.OK:
|
||||||
|
statusMesssage = "<color=green>APK installed. Ready to build and deploy scenes.</color>";
|
||||||
|
break;
|
||||||
|
case ApkStatus.NOT_INSTALLED:
|
||||||
|
statusMesssage = "<color=red>APK not installed. Press \"Build and Deploy APK\" to install the modified APK.</color>";
|
||||||
|
break;
|
||||||
|
case ApkStatus.DEVICE_NOT_CONNECTED:
|
||||||
|
statusMesssage = "<color=red>Device not connected via ADB. Please connect device and allow debugging.</color>";
|
||||||
|
break;
|
||||||
|
case ApkStatus.UNKNOWN:
|
||||||
|
default:
|
||||||
|
statusMesssage = "<color=red>Failed to get APK status!</color>";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
GUILayout.Label(statusMesssage, statusStyle, GUILayout.ExpandWidth(true));
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
if (GUILayout.Button("Build and Deploy APK", GUILayout.Width(200)))
|
||||||
|
{
|
||||||
|
action = GuiAction.BuildAndDeployApp;
|
||||||
|
}
|
||||||
|
EditorGUI.BeginDisabledGroup(currentApkStatus != ApkStatus.OK);
|
||||||
|
if (GUILayout.Button("Launch APK", GUILayout.Width(120)))
|
||||||
|
{
|
||||||
|
action = GuiAction.LaunchApp;
|
||||||
|
}
|
||||||
|
EditorGUI.EndDisabledGroup();
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
GUILayout.Space(10f);
|
||||||
|
|
||||||
|
GUIContent scenesContent = new GUIContent("Scenes [?]",
|
||||||
|
"Build and deploy individual scenes, which can be hot-reloaded at runtime by the modified APK.");
|
||||||
|
GUILayout.Label(scenesContent, EditorStyles.boldLabel);
|
||||||
|
|
||||||
|
GUIContent buildSettingsBtnTxt = new GUIContent("Open Build Settings");
|
||||||
|
GUIContent deployLabelTxt = new GUIContent("Deploy?",
|
||||||
|
"If true, this scene will be hot-reloaded. To reduce iteration time, only deploy scenes under active iteration.");
|
||||||
|
if (buildableScenes == null || buildableScenes.Count == 0)
|
||||||
|
{
|
||||||
|
string sceneErrorMessage;
|
||||||
|
if (invalidBuildableScene)
|
||||||
|
{
|
||||||
|
sceneErrorMessage = "Invalid scene selection. \nPlease remove OVRTransitionScene in the project's build settings.";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sceneErrorMessage = "No scenes detected. \nTo get started, add scenes in the project's build settings.";
|
||||||
|
}
|
||||||
|
GUILayout.Label(sceneErrorMessage);
|
||||||
|
|
||||||
|
var buildSettingBtnRt = GUILayoutUtility.GetRect(buildSettingsBtnTxt, GUI.skin.button, GUILayout.Width(150));
|
||||||
|
if (GUI.Button(buildSettingBtnRt, buildSettingsBtnTxt))
|
||||||
|
{
|
||||||
|
action = GuiAction.OpenBuildSettingsWindow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float currWidth = EditorGUIUtility.currentViewWidth;
|
||||||
|
float sceneNameWidth = Math.Max(EditorGUIUtility.currentViewWidth - 170, 60);
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.LabelField("Scene Name", GUI.skin.box, GUILayout.Width(sceneNameWidth));
|
||||||
|
EditorGUILayout.LabelField("Status", GUI.skin.box, GUILayout.Width(80));
|
||||||
|
EditorGUILayout.LabelField(deployLabelTxt, GUI.skin.box, GUILayout.Width(60));
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
int scrollViewHeight = Math.Min(buildableScenes.Count * 21, 200);
|
||||||
|
sceneScrollViewPos = EditorGUILayout.BeginScrollView(sceneScrollViewPos, GUILayout.MaxHeight(scrollViewHeight));
|
||||||
|
foreach (EditorSceneInfo scene in buildableScenes)
|
||||||
|
{
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.LabelField(scene.sceneName, GUILayout.Width(sceneNameWidth + 8));
|
||||||
|
EditorGUILayout.LabelField(GetEnumDescription(scene.buildStatus), GUILayout.Width(80));
|
||||||
|
scene.shouldDeploy = EditorGUILayout.Toggle(scene.shouldDeploy, GUILayout.Width(30));
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndScrollView();
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
{
|
||||||
|
if (GUILayout.Button("Build and Deploy Scene(s)", GUILayout.Width(200)))
|
||||||
|
{
|
||||||
|
action = GuiAction.BuildAndDeployScenes;
|
||||||
|
}
|
||||||
|
GUILayout.Space(10);
|
||||||
|
GUIContent forceRestartLabel = new GUIContent("Force Restart [?]", "Relaunch the application after scene bundles are finished deploying.");
|
||||||
|
forceRestart = GUILayout.Toggle(forceRestart, forceRestartLabel, GUILayout.ExpandWidth(true));
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
|
GUILayout.Space(10.0f);
|
||||||
|
GUILayout.Label("Utilities", EditorStyles.boldLabel);
|
||||||
|
|
||||||
|
showBundleManagement = EditorGUILayout.BeginFoldoutHeaderGroup(showBundleManagement, "Bundle Management", EditorStyles.foldoutHeader);
|
||||||
|
if (showBundleManagement)
|
||||||
|
{
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
{
|
||||||
|
EditorGUILayout.Space(EditorGUI.indentLevel * spacesPerIndent, false); //to match indentLevel
|
||||||
|
GUIContent clearDeviceBundlesTxt = new GUIContent("Delete Device Bundles [?]",
|
||||||
|
"Asset bundles to support hot-reloading are stored in an external location on-device. Click to delete them, freeing up space on-device.");
|
||||||
|
if (GUILayout.Button(clearDeviceBundlesTxt, GUILayout.ExpandWidth(true)))
|
||||||
|
{
|
||||||
|
action = GuiAction.ClearDeviceBundles;
|
||||||
|
}
|
||||||
|
|
||||||
|
GUIContent clearLocalBundlesTxt = new GUIContent("Delete Local Bundles [?]",
|
||||||
|
$"Locally, asset bundles are built into the \"{OVRBundleManager.BUNDLE_MANAGER_OUTPUT_PATH}\" folder at project root. "
|
||||||
|
+ "Click to delete them, freeing up local space.");
|
||||||
|
if (GUILayout.Button(clearLocalBundlesTxt, GUILayout.ExpandWidth(true)))
|
||||||
|
{
|
||||||
|
action = GuiAction.ClearLocalBundles;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||||
|
|
||||||
|
GUILayout.Space(5.0f);
|
||||||
|
showOther = EditorGUILayout.BeginFoldoutHeaderGroup(showOther, "Other", EditorStyles.foldoutHeader);
|
||||||
|
if (showOther)
|
||||||
|
{
|
||||||
|
const float otherLabelsWidth = 240f;
|
||||||
|
EditorGUI.indentLevel++;
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
|
||||||
|
GUIContent deployScenesWithApkLabel = new GUIContent("Deploy scenes with APK deploy [?]",
|
||||||
|
"If checked, all scenes will be built & deployed when pressing \"Build and Deploy APK\". This takes longer, but provides more expected behavior.");
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField(deployScenesWithApkLabel, GUILayout.Width(otherLabelsWidth));
|
||||||
|
bool newToggleValue = EditorGUILayout.Toggle(deployScenesWhenDeployingApk);
|
||||||
|
|
||||||
|
if (newToggleValue != deployScenesWhenDeployingApk)
|
||||||
|
{
|
||||||
|
deployScenesWhenDeployingApk = newToggleValue;
|
||||||
|
EditorPrefs.SetBool(deployScenesWhenDeployingApkPrefName, deployScenesWhenDeployingApk);
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
GUIContent useOptionalTransitionPackageLabel = new GUIContent("Use optional APK package name [?]",
|
||||||
|
"This allows both full build APK and transition APK to be installed on device. However, platform services like Entitlement check may fail.");
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField(useOptionalTransitionPackageLabel, GUILayout.Width(otherLabelsWidth));
|
||||||
|
newToggleValue = EditorGUILayout.Toggle(useOptionalTransitionApkPackage);
|
||||||
|
|
||||||
|
if (newToggleValue != useOptionalTransitionApkPackage)
|
||||||
|
{
|
||||||
|
useOptionalTransitionApkPackage = newToggleValue;
|
||||||
|
EditorPrefs.SetBool(useOptionalTransitionApkPackagePrefName, useOptionalTransitionApkPackage);
|
||||||
|
// New package name = new check for associated data
|
||||||
|
CheckForTransitionAPK();
|
||||||
|
CheckForDeployedScenes();
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.Space(EditorGUI.indentLevel * spacesPerIndent, false); //to match indentLevel
|
||||||
|
if (GUILayout.Button(buildSettingsBtnTxt, GUILayout.ExpandWidth(true)))
|
||||||
|
{
|
||||||
|
action = GuiAction.OpenBuildSettingsWindow;
|
||||||
|
}
|
||||||
|
if (GUILayout.Button("Uninstall APK", GUILayout.ExpandWidth(true)))
|
||||||
|
{
|
||||||
|
action = GuiAction.UninstallApk;
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
EditorGUI.indentLevel--;
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndFoldoutHeaderGroup();
|
||||||
|
|
||||||
|
GUILayout.Space(6f);
|
||||||
|
GUILayout.Label("", GUI.skin.horizontalSlider);
|
||||||
|
GUILayout.Space(10f);
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
GUILayout.Label("Log", EditorStyles.boldLabel);
|
||||||
|
GUILayout.FlexibleSpace();
|
||||||
|
if (GUILayout.Button("Clear Log", EditorStyles.miniButton))
|
||||||
|
{
|
||||||
|
action = GuiAction.ClearLog;
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
debugLogScroll = EditorGUILayout.BeginScrollView(debugLogScroll, EditorStyles.helpBox, GUILayout.ExpandHeight(true));
|
||||||
|
if (!string.IsNullOrEmpty(toolLog))
|
||||||
|
{
|
||||||
|
EditorGUILayout.SelectableLabel(toolLog, logBoxStyle, GUILayout.Height(logBoxSize.y));
|
||||||
|
}
|
||||||
|
EditorGUILayout.EndScrollView();
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
switch (action)
|
||||||
|
{
|
||||||
|
case GuiAction.OpenBuildSettingsWindow:
|
||||||
|
OpenBuildSettingsWindow();
|
||||||
|
break;
|
||||||
|
case GuiAction.BuildAndDeployScenes:
|
||||||
|
OVRBundleManager.BuildDeployScenes(buildableScenes, forceRestart);
|
||||||
|
CheckForDeployedScenes();
|
||||||
|
break;
|
||||||
|
case GuiAction.BuildAndDeployApp:
|
||||||
|
OVRBundleManager.BuildDeployTransitionAPK();
|
||||||
|
CheckForTransitionAPK();
|
||||||
|
if (deployScenesWhenDeployingApk)
|
||||||
|
{
|
||||||
|
buildableScenes.ForEach(x => x.shouldDeploy = true);
|
||||||
|
OVRBundleManager.BuildDeployScenes(buildableScenes, false);
|
||||||
|
CheckForDeployedScenes();
|
||||||
|
}
|
||||||
|
OVRBundleManager.LaunchApplication();
|
||||||
|
break;
|
||||||
|
case GuiAction.ClearDeviceBundles:
|
||||||
|
OVRBundleManager.DeleteRemoteAssetBundles();
|
||||||
|
CheckForDeployedScenes();
|
||||||
|
break;
|
||||||
|
case GuiAction.ClearLocalBundles:
|
||||||
|
OVRBundleManager.DeleteLocalAssetBundles();
|
||||||
|
break;
|
||||||
|
case GuiAction.LaunchApp:
|
||||||
|
OVRBundleManager.LaunchApplication();
|
||||||
|
break;
|
||||||
|
case GuiAction.UninstallApk:
|
||||||
|
OVRBundleManager.UninstallAPK();
|
||||||
|
CheckForTransitionAPK();
|
||||||
|
CheckForDeployedScenes();
|
||||||
|
break;
|
||||||
|
case GuiAction.ClearLog:
|
||||||
|
PrintLog("", true);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
action = GuiAction.None;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void OpenBuildSettingsWindow()
|
||||||
|
{
|
||||||
|
EditorWindow.GetWindow(System.Type.GetType("UnityEditor.BuildPlayerWindow,UnityEditor"));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateSceneBuildStatus(SceneBundleStatus status, int index = -1)
|
||||||
|
{
|
||||||
|
if (buildableScenes == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (index >= 0 && index < buildableScenes.Count)
|
||||||
|
{
|
||||||
|
buildableScenes[index].buildStatus = status;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Update status for all scenes
|
||||||
|
for (int i = 0; i < buildableScenes.Count; i++)
|
||||||
|
{
|
||||||
|
buildableScenes[i].buildStatus = status;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void GetScenesFromBuildSettings()
|
||||||
|
{
|
||||||
|
invalidBuildableScene = false;
|
||||||
|
buildableScenes = new List<EditorSceneInfo>();
|
||||||
|
for (int i = 0; i < EditorBuildSettings.scenes.Length; i++)
|
||||||
|
{
|
||||||
|
EditorBuildSettingsScene scene = EditorBuildSettings.scenes[i];
|
||||||
|
if (scene.enabled)
|
||||||
|
{
|
||||||
|
if (Path.GetFileNameWithoutExtension(scene.path) != "OVRTransitionScene")
|
||||||
|
{
|
||||||
|
EditorSceneInfo sceneInfo = new EditorSceneInfo(scene.path, Path.GetFileNameWithoutExtension(scene.path));
|
||||||
|
buildableScenes.Add(sceneInfo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
buildableScenes = null;
|
||||||
|
invalidBuildableScene = true;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void CheckForTransitionAPK()
|
||||||
|
{
|
||||||
|
OVRADBTool adbTool = new OVRADBTool(OVRConfig.Instance.GetAndroidSDKPath());
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
string matchedPackageList, error;
|
||||||
|
var transitionPackageName = PlayerSettings.GetApplicationIdentifier(BuildTargetGroup.Android);
|
||||||
|
if (useOptionalTransitionApkPackage)
|
||||||
|
{
|
||||||
|
transitionPackageName += ".transition";
|
||||||
|
}
|
||||||
|
string[] packageCheckCommand = new string[] { "-d shell pm list package", transitionPackageName };
|
||||||
|
if (adbTool.RunCommand(packageCheckCommand, null, out matchedPackageList, out error) == 0)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(matchedPackageList))
|
||||||
|
{
|
||||||
|
currentApkStatus = ApkStatus.NOT_INSTALLED;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// adb "list package" command returns all package names that contains the given query package name
|
||||||
|
// Need to check if the transition package name is matched exactly
|
||||||
|
if (matchedPackageList.Contains("package:" + transitionPackageName + "\r\n"))
|
||||||
|
{
|
||||||
|
if (useOptionalTransitionApkPackage)
|
||||||
|
{
|
||||||
|
// If optional package name is used, it is deterministic that the transition apk is installed
|
||||||
|
currentApkStatus = ApkStatus.OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// get package info to check for TRANSITION_APK_VERSION_NAME
|
||||||
|
string[] dumpPackageInfoCommand = new string[] { "-d shell dumpsys package", transitionPackageName };
|
||||||
|
string packageInfo;
|
||||||
|
if (adbTool.RunCommand(dumpPackageInfoCommand, null, out packageInfo, out error) == 0 &&
|
||||||
|
!string.IsNullOrEmpty(packageInfo) &&
|
||||||
|
packageInfo.Contains(OVRBundleManager.TRANSITION_APK_VERSION_NAME))
|
||||||
|
{
|
||||||
|
// Matched package name found, and the package info contains TRANSITION_APK_VERSION_NAME
|
||||||
|
currentApkStatus = ApkStatus.OK;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentApkStatus = ApkStatus.NOT_INSTALLED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// No matached package name returned
|
||||||
|
currentApkStatus = ApkStatus.NOT_INSTALLED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (error.Contains("no devices found"))
|
||||||
|
{
|
||||||
|
currentApkStatus = ApkStatus.DEVICE_NOT_CONNECTED;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentApkStatus = ApkStatus.UNKNOWN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void CheckForDeployedScenes()
|
||||||
|
{
|
||||||
|
if (buildableScenes == null) return;
|
||||||
|
UpdateSceneBuildStatus(SceneBundleStatus.UNKNOWN);
|
||||||
|
|
||||||
|
string[] deployedBundleNames = OVRBundleManager.ListRemoteAssetBundleNames();
|
||||||
|
if (deployedBundleNames == null) return;
|
||||||
|
|
||||||
|
for (int i = 0; i < buildableScenes.Count; ++i)
|
||||||
|
{
|
||||||
|
string sceneBundleName = "scene_" + buildableScenes[i].sceneName;
|
||||||
|
if (Array.FindIndex(deployedBundleNames, x => x.Equals(sceneBundleName, StringComparison.CurrentCultureIgnoreCase)) != -1)
|
||||||
|
{
|
||||||
|
UpdateSceneBuildStatus(SceneBundleStatus.DEPLOYED, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PrintLog(string message, bool clear = false)
|
||||||
|
{
|
||||||
|
if (clear)
|
||||||
|
{
|
||||||
|
toolLog = message;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
toolLog += message + "\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (logBoxStyle != null)
|
||||||
|
{
|
||||||
|
GUIContent logContent = new GUIContent(toolLog);
|
||||||
|
logBoxSize = logBoxStyle.CalcSize(logContent);
|
||||||
|
|
||||||
|
debugLogScroll.y = float.MaxValue; //scroll to bottom on new data
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PrintError(string error = "")
|
||||||
|
{
|
||||||
|
if(!string.IsNullOrEmpty(error))
|
||||||
|
{
|
||||||
|
toolLog += "<color=red>Failed!\n</color>" + error + "\n";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
toolLog += "<color=red>Failed! Check Unity log for more details.\n</color>";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PrintWarning(string warning)
|
||||||
|
{
|
||||||
|
toolLog += "<color=yellow>Warning!\n" + warning + "</color>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PrintSuccess()
|
||||||
|
{
|
||||||
|
toolLog += "<color=green>Success!</color>\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string GetEnumDescription(Enum eEnum)
|
||||||
|
{
|
||||||
|
Type enumType = eEnum.GetType();
|
||||||
|
MemberInfo[] memberInfo = enumType.GetMember(eEnum.ToString());
|
||||||
|
if (memberInfo != null && memberInfo.Length > 0)
|
||||||
|
{
|
||||||
|
var attrs = memberInfo[0].GetCustomAttributes(typeof(DescriptionAttribute), false);
|
||||||
|
if (attrs != null && attrs.Length > 0)
|
||||||
|
{
|
||||||
|
return ((DescriptionAttribute)attrs[0]).Description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return eEnum.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool GetUseOptionalTransitionApkPackage()
|
||||||
|
{
|
||||||
|
return useOptionalTransitionApkPackage;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
203
Assets/Oculus/VR/Editor/OVRConfig.cs
Normal file
203
Assets/Oculus/VR/Editor/OVRConfig.cs
Normal file
@ -0,0 +1,203 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
// OVRConfig inherits from ScriptableObject for legacy reasons. Conceptually,
|
||||||
|
// it's just a static class with path fetching helper methods. However, it
|
||||||
|
// used to serialize path data. When the serialized fields were no longer
|
||||||
|
// needed, we kept the ScriptableObject inheritence so as to not break backwards
|
||||||
|
// compatibility for existing projects that upgrade OVRPlugin versions.
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
[UnityEditor.InitializeOnLoad]
|
||||||
|
#endif
|
||||||
|
public class OVRConfig : ScriptableObject
|
||||||
|
{
|
||||||
|
private static OVRConfig instance;
|
||||||
|
|
||||||
|
public static OVRConfig Instance
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (instance == null)
|
||||||
|
{
|
||||||
|
instance = Resources.Load<OVRConfig>("OVRConfig");
|
||||||
|
if (instance == null)
|
||||||
|
{
|
||||||
|
instance = ScriptableObject.CreateInstance<OVRConfig>();
|
||||||
|
string resourcePath = Path.Combine(UnityEngine.Application.dataPath, "Resources");
|
||||||
|
if (!Directory.Exists(resourcePath))
|
||||||
|
{
|
||||||
|
UnityEditor.AssetDatabase.CreateFolder("Assets", "Resources");
|
||||||
|
}
|
||||||
|
|
||||||
|
string fullPath = Path.Combine(Path.Combine("Assets", "Resources"), "OVRBuildConfig.asset");
|
||||||
|
UnityEditor.AssetDatabase.CreateAsset(instance, fullPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
instance = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the path to the base directory of the Android SDK
|
||||||
|
public string GetAndroidSDKPath(bool throwError = true)
|
||||||
|
{
|
||||||
|
string androidSDKPath = "";
|
||||||
|
#if UNITY_2019_1_OR_NEWER
|
||||||
|
// Check for use of embedded path or user defined
|
||||||
|
bool useEmbedded = EditorPrefs.GetBool("SdkUseEmbedded") || string.IsNullOrEmpty(EditorPrefs.GetString("AndroidSdkRoot"));
|
||||||
|
if (useEmbedded)
|
||||||
|
{
|
||||||
|
androidSDKPath = Path.Combine(BuildPipeline.GetPlaybackEngineDirectory(BuildTarget.Android, BuildOptions.None), "SDK");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
androidSDKPath = EditorPrefs.GetString("AndroidSdkRoot");
|
||||||
|
}
|
||||||
|
|
||||||
|
androidSDKPath = androidSDKPath.Replace("/", "\\");
|
||||||
|
// Validate sdk path and notify user if path does not exist.
|
||||||
|
if (!Directory.Exists(androidSDKPath))
|
||||||
|
{
|
||||||
|
androidSDKPath = Environment.GetEnvironmentVariable("ANDROID_SDK_ROOT");
|
||||||
|
if (!string.IsNullOrEmpty(androidSDKPath))
|
||||||
|
{
|
||||||
|
return androidSDKPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (throwError)
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Android SDK not Found",
|
||||||
|
"Android SDK not found. Please ensure that the path is set correctly in (Edit -> Preferences -> External Tools) or that the Untiy Android module is installed correctly.",
|
||||||
|
"Ok");
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return androidSDKPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns the path to the gradle-launcher-*.jar
|
||||||
|
public string GetGradlePath(bool throwError = true)
|
||||||
|
{
|
||||||
|
string gradlePath = "";
|
||||||
|
string libPath = "";
|
||||||
|
#if UNITY_2019_1_OR_NEWER
|
||||||
|
// Check for use of embedded path or user defined
|
||||||
|
bool useEmbedded = EditorPrefs.GetBool("GradleUseEmbedded") || string.IsNullOrEmpty(EditorPrefs.GetString("GradlePath"));
|
||||||
|
|
||||||
|
if (useEmbedded)
|
||||||
|
{
|
||||||
|
libPath = Path.Combine(BuildPipeline.GetPlaybackEngineDirectory(BuildTarget.Android, BuildOptions.None), "Tools\\gradle\\lib");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
libPath = Path.Combine(EditorPrefs.GetString("GradlePath"), "lib");
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
libPath = Path.Combine(EditorApplication.applicationContentsPath, "PlaybackEngines\\AndroidPlayer\\Tools\\gradle\\lib");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
libPath = libPath.Replace("/", "\\");
|
||||||
|
if (!string.IsNullOrEmpty(libPath) && Directory.Exists(libPath))
|
||||||
|
{
|
||||||
|
string[] gradleJar = Directory.GetFiles(libPath, "gradle-launcher-*.jar");
|
||||||
|
if (gradleJar.Length == 1)
|
||||||
|
{
|
||||||
|
gradlePath = gradleJar[0];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate gradle path and notify user if path does not exist.
|
||||||
|
if (!File.Exists(gradlePath))
|
||||||
|
{
|
||||||
|
if (throwError)
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Gradle not Found",
|
||||||
|
"Gradle not found. Please ensure that the path is set correctly in (Edit -> Preferences -> External Tools) or that the Untiy Android module is installed correctly.",
|
||||||
|
"Ok");
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
|
return gradlePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Returns path to the Java executable in the JDK
|
||||||
|
public string GetJDKPath(bool throwError = true)
|
||||||
|
{
|
||||||
|
string jdkPath = "";
|
||||||
|
#if UNITY_EDITOR_WIN
|
||||||
|
// Check for use of embedded path or user defined
|
||||||
|
bool useEmbedded = EditorPrefs.GetBool("JdkUseEmbedded") || string.IsNullOrEmpty(EditorPrefs.GetString("JdkPath"));
|
||||||
|
|
||||||
|
string exePath = "";
|
||||||
|
if (useEmbedded)
|
||||||
|
{
|
||||||
|
#if UNITY_2019_1_OR_NEWER
|
||||||
|
exePath = Path.Combine(BuildPipeline.GetPlaybackEngineDirectory(BuildTarget.Android, BuildOptions.None), "Tools\\OpenJDK\\Windows\\bin");
|
||||||
|
#else
|
||||||
|
exePath = Path.Combine(EditorApplication.applicationContentsPath, "PlaybackEngines\\AndroidPlayer\\Tools\\OpenJDK\\Windows\\bin");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
exePath = Path.Combine(EditorPrefs.GetString("JdkPath"), "bin");
|
||||||
|
}
|
||||||
|
|
||||||
|
jdkPath = Path.Combine(exePath, "java.exe");
|
||||||
|
jdkPath = jdkPath.Replace("/", "\\");
|
||||||
|
|
||||||
|
// Validate gradle path and notify user if path does not exist.
|
||||||
|
if (!File.Exists(jdkPath))
|
||||||
|
{
|
||||||
|
// Check the enviornment variable as a backup to see if the JDK is there.
|
||||||
|
string javaHome = Environment.GetEnvironmentVariable("JAVA_HOME");
|
||||||
|
if(!string.IsNullOrEmpty(javaHome))
|
||||||
|
{
|
||||||
|
jdkPath = Path.Combine(javaHome, "bin\\java.exe");
|
||||||
|
if(File.Exists(jdkPath))
|
||||||
|
{
|
||||||
|
return jdkPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (throwError)
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("JDK not Found",
|
||||||
|
"JDK not found. Please ensure that the path is set correctly in (Edit -> Preferences -> External Tools) or that the Untiy Android module is installed correctly.",
|
||||||
|
"Ok");
|
||||||
|
}
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
return jdkPath;
|
||||||
|
}
|
||||||
|
}
|
68
Assets/Oculus/VR/Editor/OVRDeviceSelector.cs
Normal file
68
Assets/Oculus/VR/Editor/OVRDeviceSelector.cs
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
#if PRIORITIZE_OCULUS_XR_SETTINGS
|
||||||
|
using Unity.XR.Oculus;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public class OVRDeviceSelector
|
||||||
|
{
|
||||||
|
public static bool isTargetDeviceQuestFamily
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return isTargetDeviceQuest || isTargetDeviceQuest2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static bool isTargetDeviceQuest
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
#if PRIORITIZE_OCULUS_XR_SETTINGS
|
||||||
|
OculusSettings settings;
|
||||||
|
UnityEditor.EditorBuildSettings.TryGetConfigObject<OculusSettings>("Unity.XR.Oculus.Settings", out settings);
|
||||||
|
return settings.TargetQuest;
|
||||||
|
#else
|
||||||
|
OVRProjectConfig projectConfig = OVRProjectConfig.GetProjectConfig();
|
||||||
|
return projectConfig.targetDeviceTypes.Contains(OVRProjectConfig.DeviceType.Quest);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool isTargetDeviceQuest2
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
#if PRIORITIZE_OCULUS_XR_SETTINGS
|
||||||
|
OculusSettings settings;
|
||||||
|
UnityEditor.EditorBuildSettings.TryGetConfigObject<OculusSettings>("Unity.XR.Oculus.Settings", out settings);
|
||||||
|
return settings.TargetQuest2;
|
||||||
|
#else
|
||||||
|
OVRProjectConfig projectConfig = OVRProjectConfig.GetProjectConfig();
|
||||||
|
return projectConfig.targetDeviceTypes.Contains(OVRProjectConfig.DeviceType.Quest2);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
242
Assets/Oculus/VR/Editor/OVRDirectorySyncer.cs
Normal file
242
Assets/Oculus/VR/Editor/OVRDirectorySyncer.cs
Normal file
@ -0,0 +1,242 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public class DirectorySyncer
|
||||||
|
{
|
||||||
|
public delegate void SyncResultDelegate(SyncResult syncResult);
|
||||||
|
|
||||||
|
public readonly string Source;
|
||||||
|
public readonly string Target;
|
||||||
|
public SyncResultDelegate WillPerformOperations;
|
||||||
|
private readonly Regex _ignoreExpression;
|
||||||
|
|
||||||
|
// helper classes to simplify transition beyond .NET runtime 3.5
|
||||||
|
public abstract class CancellationToken
|
||||||
|
{
|
||||||
|
protected abstract bool _IsCancellationRequested();
|
||||||
|
|
||||||
|
public virtual bool IsCancellationRequested
|
||||||
|
{
|
||||||
|
get { return _IsCancellationRequested(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ThrowIfCancellationRequested()
|
||||||
|
{
|
||||||
|
if (IsCancellationRequested)
|
||||||
|
{
|
||||||
|
throw new Exception("Operation Cancelled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly CancellationToken None = new CancellationTokenNone();
|
||||||
|
|
||||||
|
private class CancellationTokenNone : CancellationToken
|
||||||
|
{
|
||||||
|
protected override bool _IsCancellationRequested()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public class CancellationTokenSource : CancellationToken
|
||||||
|
{
|
||||||
|
private bool _isCancelled;
|
||||||
|
|
||||||
|
protected override bool _IsCancellationRequested()
|
||||||
|
{
|
||||||
|
return _isCancelled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Cancel()
|
||||||
|
{
|
||||||
|
_isCancelled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CancellationToken Token
|
||||||
|
{
|
||||||
|
get { return this; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string EnsureTrailingDirectorySeparator(string path)
|
||||||
|
{
|
||||||
|
return path.EndsWith("" + Path.DirectorySeparatorChar)
|
||||||
|
? path
|
||||||
|
: path + Path.DirectorySeparatorChar;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string CheckedDirectory(string nameInExceptionText, string directory)
|
||||||
|
{
|
||||||
|
directory = Path.GetFullPath(directory);
|
||||||
|
if (!Directory.Exists(directory))
|
||||||
|
{
|
||||||
|
throw new ArgumentException(string.Format("{0} is not a valid directory for argument ${1}", directory,
|
||||||
|
nameInExceptionText));
|
||||||
|
}
|
||||||
|
|
||||||
|
return EnsureTrailingDirectorySeparator(directory);
|
||||||
|
}
|
||||||
|
|
||||||
|
public DirectorySyncer(string source, string target, string ignoreRegExPattern = null)
|
||||||
|
{
|
||||||
|
Source = CheckedDirectory("source", source);
|
||||||
|
Target = CheckedDirectory("target", target);
|
||||||
|
if (Source.StartsWith(Target, StringComparison.OrdinalIgnoreCase) ||
|
||||||
|
Target.StartsWith(Source, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
throw new ArgumentException(string.Format("Paths must not contain each other (source: {0}, target: {1}",
|
||||||
|
Source, Target));
|
||||||
|
}
|
||||||
|
|
||||||
|
ignoreRegExPattern = ignoreRegExPattern ?? "^$";
|
||||||
|
_ignoreExpression = new Regex(ignoreRegExPattern, RegexOptions.IgnoreCase);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class SyncResult
|
||||||
|
{
|
||||||
|
public readonly IEnumerable<string> Created;
|
||||||
|
public readonly IEnumerable<string> Updated;
|
||||||
|
public readonly IEnumerable<string> Deleted;
|
||||||
|
|
||||||
|
public SyncResult(IEnumerable<string> created, IEnumerable<string> updated, IEnumerable<string> deleted)
|
||||||
|
{
|
||||||
|
Created = created;
|
||||||
|
Updated = updated;
|
||||||
|
Deleted = deleted;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool RelativeFilePathIsRelevant(string relativeFilename)
|
||||||
|
{
|
||||||
|
return !_ignoreExpression.IsMatch(relativeFilename);
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool RelativeDirectoryPathIsRelevant(string relativeDirName)
|
||||||
|
{
|
||||||
|
// Since our ignore patterns look at file names, they may contain trailing path separators
|
||||||
|
// In order for paths to match those rules, we add a path separator here
|
||||||
|
return !_ignoreExpression.IsMatch(EnsureTrailingDirectorySeparator(relativeDirName));
|
||||||
|
}
|
||||||
|
|
||||||
|
private HashSet<string> RelevantRelativeFilesBeneathDirectory(string path, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
return new HashSet<string>(Directory.GetFiles(path, "*", SearchOption.AllDirectories)
|
||||||
|
.TakeWhile((s) => !cancellationToken.IsCancellationRequested)
|
||||||
|
.Select(p => PathHelper.MakeRelativePath(path, p)).Where(RelativeFilePathIsRelevant));
|
||||||
|
}
|
||||||
|
|
||||||
|
private HashSet<string> RelevantRelativeDirectoriesBeneathDirectory(string path,
|
||||||
|
CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
return new HashSet<string>(Directory.GetDirectories(path, "*", SearchOption.AllDirectories)
|
||||||
|
.TakeWhile((s) => !cancellationToken.IsCancellationRequested)
|
||||||
|
.Select(p => PathHelper.MakeRelativePath(path, p)).Where(RelativeDirectoryPathIsRelevant));
|
||||||
|
}
|
||||||
|
|
||||||
|
public SyncResult Synchronize()
|
||||||
|
{
|
||||||
|
return Synchronize(CancellationToken.None);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeleteOutdatedFilesFromTarget(SyncResult syncResult, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var outdatedFiles = syncResult.Updated.Union(syncResult.Deleted);
|
||||||
|
foreach (var fileName in outdatedFiles)
|
||||||
|
{
|
||||||
|
File.Delete(Path.Combine(Target, fileName));
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "ParameterTypeCanBeEnumerable.Local")]
|
||||||
|
private void DeleteOutdatedEmptyDirectoriesFromTarget(HashSet<string> sourceDirs, HashSet<string> targetDirs,
|
||||||
|
CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var deleted = targetDirs.Except(sourceDirs).OrderByDescending(s => s);
|
||||||
|
|
||||||
|
// By sorting in descending order above, we delete leaf-first,
|
||||||
|
// this is simpler than collapsing the list above (which would also allow us to run these ops in parallel).
|
||||||
|
// Assumption is that there are few empty folders to delete
|
||||||
|
foreach (var dir in deleted)
|
||||||
|
{
|
||||||
|
Directory.Delete(Path.Combine(Target, dir));
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "ParameterTypeCanBeEnumerable.Local")]
|
||||||
|
private void CreateRelevantDirectoriesAtTarget(HashSet<string> sourceDirs, HashSet<string> targetDirs,
|
||||||
|
CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var created = sourceDirs.Except(targetDirs);
|
||||||
|
foreach (var dir in created)
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(Path.Combine(Target, dir));
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void MoveRelevantFilesToTarget(SyncResult syncResult, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
// step 3: we move all new files to target
|
||||||
|
var newFiles = syncResult.Created.Union(syncResult.Updated);
|
||||||
|
foreach (var fileName in newFiles)
|
||||||
|
{
|
||||||
|
var sourceFileName = Path.Combine(Source, fileName);
|
||||||
|
var destFileName = Path.Combine(Target, fileName);
|
||||||
|
// target directory exists due to step CreateRelevantDirectoriesAtTarget()
|
||||||
|
File.Move(sourceFileName, destFileName);
|
||||||
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public SyncResult Synchronize(CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var sourceDirs = RelevantRelativeDirectoriesBeneathDirectory(Source, cancellationToken);
|
||||||
|
var targetDirs = RelevantRelativeDirectoriesBeneathDirectory(Target, cancellationToken);
|
||||||
|
var sourceFiles = RelevantRelativeFilesBeneathDirectory(Source, cancellationToken);
|
||||||
|
var targetFiles = RelevantRelativeFilesBeneathDirectory(Target, cancellationToken);
|
||||||
|
|
||||||
|
var created = sourceFiles.Except(targetFiles).OrderBy(s => s).ToList();
|
||||||
|
var updated = sourceFiles.Intersect(targetFiles).OrderBy(s => s).ToList();
|
||||||
|
var deleted = targetFiles.Except(sourceFiles).OrderBy(s => s).ToList();
|
||||||
|
var syncResult = new SyncResult(created, updated, deleted);
|
||||||
|
|
||||||
|
if (WillPerformOperations != null)
|
||||||
|
{
|
||||||
|
WillPerformOperations.Invoke(syncResult);
|
||||||
|
}
|
||||||
|
|
||||||
|
DeleteOutdatedFilesFromTarget(syncResult, cancellationToken);
|
||||||
|
DeleteOutdatedEmptyDirectoriesFromTarget(sourceDirs, targetDirs, cancellationToken);
|
||||||
|
CreateRelevantDirectoriesAtTarget(sourceDirs, targetDirs, cancellationToken);
|
||||||
|
MoveRelevantFilesToTarget(syncResult, cancellationToken);
|
||||||
|
|
||||||
|
return syncResult;
|
||||||
|
}
|
||||||
|
}
|
199
Assets/Oculus/VR/Editor/OVREngineConfigurationUpdater.cs
Normal file
199
Assets/Oculus/VR/Editor/OVREngineConfigurationUpdater.cs
Normal file
@ -0,0 +1,199 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if USING_XR_MANAGEMENT && (USING_XR_SDK_OCULUS || USING_XR_SDK_OPENXR)
|
||||||
|
#define USING_XR_SDK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_2020_1_OR_NEWER
|
||||||
|
#define REQUIRES_XR_SDK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEditor.Callbacks;
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
[InitializeOnLoad]
|
||||||
|
class OVREngineConfigurationUpdater
|
||||||
|
{
|
||||||
|
private const string prefName = "OVREngineConfigurationUpdater_Enabled";
|
||||||
|
private const string menuItemName = "Oculus/Tools/Use Required Project Settings";
|
||||||
|
private const string androidAssetsPath = "Assets/Plugins/Android/assets";
|
||||||
|
private const string androidManifestPath = "Assets/Plugins/Android/AndroidManifest.xml";
|
||||||
|
static bool setPrefsForUtilities;
|
||||||
|
|
||||||
|
[MenuItem(menuItemName)]
|
||||||
|
static void ToggleUtilities()
|
||||||
|
{
|
||||||
|
setPrefsForUtilities = !setPrefsForUtilities;
|
||||||
|
Menu.SetChecked(menuItemName, setPrefsForUtilities);
|
||||||
|
|
||||||
|
int newValue = (setPrefsForUtilities) ? 1 : 0;
|
||||||
|
PlayerPrefs.SetInt(prefName, newValue);
|
||||||
|
PlayerPrefs.Save();
|
||||||
|
|
||||||
|
Debug.Log("Using required project settings: " + setPrefsForUtilities);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static readonly string dashSupportEnableConfirmedKey = "Oculus_Utilities_OVREngineConfiguration_DashSupportEnableConfirmed_" + Application.unityVersion + OVRManager.utilitiesVersion;
|
||||||
|
private static bool dashSupportEnableConfirmed
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return PlayerPrefs.GetInt(dashSupportEnableConfirmedKey, 0) == 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
PlayerPrefs.SetInt(dashSupportEnableConfirmedKey, value ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static OVREngineConfigurationUpdater()
|
||||||
|
{
|
||||||
|
EditorApplication.delayCall += OnDelayCall;
|
||||||
|
EditorApplication.update += OnUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void OnDelayCall()
|
||||||
|
{
|
||||||
|
setPrefsForUtilities = PlayerPrefs.GetInt(prefName, 1) != 0;
|
||||||
|
Menu.SetChecked(menuItemName, setPrefsForUtilities);
|
||||||
|
|
||||||
|
if (!setPrefsForUtilities)
|
||||||
|
return;
|
||||||
|
|
||||||
|
OVRPlugin.AddCustomMetadata("build_target", EditorUserBuildSettings.activeBuildTarget.ToString());
|
||||||
|
EnforceAndroidSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void OnUpdate()
|
||||||
|
{
|
||||||
|
if (!setPrefsForUtilities)
|
||||||
|
return;
|
||||||
|
|
||||||
|
EnforceBundleId();
|
||||||
|
EnforceVRSupport();
|
||||||
|
EnforceInstallLocation();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void EnforceAndroidSettings()
|
||||||
|
{
|
||||||
|
if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (PlayerSettings.defaultInterfaceOrientation != UIOrientation.LandscapeLeft)
|
||||||
|
{
|
||||||
|
Debug.Log("OVREngineConfigurationUpdater: Setting orientation to Landscape Left");
|
||||||
|
// Default screen orientation must be set to landscape left.
|
||||||
|
PlayerSettings.defaultInterfaceOrientation = UIOrientation.LandscapeLeft;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !USING_XR_SDK && !REQUIRES_XR_SDK
|
||||||
|
#pragma warning disable 618
|
||||||
|
if (!PlayerSettings.virtualRealitySupported)
|
||||||
|
#pragma warning restore 618
|
||||||
|
{
|
||||||
|
// NOTE: This value should not affect the main window surface
|
||||||
|
// when Built-in VR support is enabled.
|
||||||
|
|
||||||
|
// NOTE: On Adreno Lollipop, it is an error to have antiAliasing set on the
|
||||||
|
// main window surface with front buffer rendering enabled. The view will
|
||||||
|
// render black.
|
||||||
|
// On Adreno KitKat, some tiling control modes will cause the view to render
|
||||||
|
// black.
|
||||||
|
if (QualitySettings.antiAliasing != 0 && QualitySettings.antiAliasing != 1)
|
||||||
|
{
|
||||||
|
Debug.Log("OVREngineConfigurationUpdater: Disabling antiAliasing");
|
||||||
|
QualitySettings.antiAliasing = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (QualitySettings.vSyncCount != 0)
|
||||||
|
{
|
||||||
|
Debug.Log("OVREngineConfigurationUpdater: Setting vsyncCount to 0");
|
||||||
|
// We sync in the TimeWarp, so we don't want unity syncing elsewhere.
|
||||||
|
QualitySettings.vSyncCount = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void EnforceVRSupport()
|
||||||
|
{
|
||||||
|
#if !USING_XR_SDK && !REQUIRES_XR_SDK
|
||||||
|
#pragma warning disable 618
|
||||||
|
if (PlayerSettings.virtualRealitySupported)
|
||||||
|
#pragma warning restore 618
|
||||||
|
return;
|
||||||
|
|
||||||
|
var mgrs = GameObject.FindObjectsOfType<OVRManager>();
|
||||||
|
for (int i = 0; i < mgrs.Length; ++i)
|
||||||
|
{
|
||||||
|
if (mgrs [i].isActiveAndEnabled)
|
||||||
|
{
|
||||||
|
Debug.Log ("Enabling Unity VR support");
|
||||||
|
#pragma warning disable 618
|
||||||
|
PlayerSettings.virtualRealitySupported = true;
|
||||||
|
#pragma warning restore 618
|
||||||
|
|
||||||
|
bool oculusFound = false;
|
||||||
|
foreach (var device in UnityEngine.XR.XRSettings.supportedDevices)
|
||||||
|
oculusFound |= (device == "Oculus");
|
||||||
|
|
||||||
|
if (!oculusFound)
|
||||||
|
Debug.LogError("Please add Oculus to the list of supported devices to use the Utilities.");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void EnforceBundleId()
|
||||||
|
{
|
||||||
|
#if !USING_XR_SDK && !REQUIRES_XR_SDK
|
||||||
|
#pragma warning disable 618
|
||||||
|
if (!PlayerSettings.virtualRealitySupported)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#pragma warning restore 618
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USING_XR_SDK || !REQUIRES_XR_SDK
|
||||||
|
if (PlayerSettings.applicationIdentifier == "" || PlayerSettings.applicationIdentifier == "com.Company.ProductName")
|
||||||
|
{
|
||||||
|
string defaultBundleId = "com.oculus.UnitySample";
|
||||||
|
Debug.LogWarning("\"" + PlayerSettings.applicationIdentifier + "\" is not a valid bundle identifier. Defaulting to \"" + defaultBundleId + "\".");
|
||||||
|
PlayerSettings.applicationIdentifier = defaultBundleId;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void EnforceInstallLocation()
|
||||||
|
{
|
||||||
|
if (PlayerSettings.Android.preferredInstallLocation != AndroidPreferredInstallLocation.Auto)
|
||||||
|
PlayerSettings.Android.preferredInstallLocation = AndroidPreferredInstallLocation.Auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
116
Assets/Oculus/VR/Editor/OVRExpansionFileGenerator.cs
Normal file
116
Assets/Oculus/VR/Editor/OVRExpansionFileGenerator.cs
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
|
||||||
|
public class BuildAssetBundles : MonoBehaviour
|
||||||
|
{
|
||||||
|
[MenuItem("Oculus/Tools/Build Mobile-Quest Expansion File", false, 100000)]
|
||||||
|
public static void BuildBundles()
|
||||||
|
{
|
||||||
|
// Create expansion file directory and call build asset bundles
|
||||||
|
string path = Application.dataPath + "/../Asset Bundles/";
|
||||||
|
if (!System.IO.Directory.Exists(path))
|
||||||
|
{
|
||||||
|
System.IO.Directory.CreateDirectory(path);
|
||||||
|
}
|
||||||
|
BuildPipeline.BuildAssetBundles(path, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.Android);
|
||||||
|
|
||||||
|
// Rename asset bundle file to the proper obb string
|
||||||
|
if (File.Exists(path + "Asset Bundles"))
|
||||||
|
{
|
||||||
|
string expansionName = "main." + PlayerSettings.Android.bundleVersionCode + "." + PlayerSettings.applicationIdentifier + ".obb";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (File.Exists(path + expansionName))
|
||||||
|
{
|
||||||
|
File.Delete(path + expansionName);
|
||||||
|
}
|
||||||
|
File.Move(path + "Asset Bundles", path + expansionName);
|
||||||
|
UnityEngine.Debug.Log("OBB expansion file " + expansionName + " has been successfully created at " + path);
|
||||||
|
|
||||||
|
UpdateAndroidManifest();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void UpdateAndroidManifest()
|
||||||
|
{
|
||||||
|
string manifestFolder = Application.dataPath + "/Plugins/Android";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Load android manfiest file
|
||||||
|
XmlDocument doc = new XmlDocument();
|
||||||
|
doc.Load(manifestFolder + "/AndroidManifest.xml");
|
||||||
|
|
||||||
|
string androidNamepsaceURI;
|
||||||
|
XmlElement element = (XmlElement)doc.SelectSingleNode("/manifest");
|
||||||
|
if(element == null)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("Could not find manifest tag in android manifest.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get android namespace URI from the manifest
|
||||||
|
androidNamepsaceURI = element.GetAttribute("xmlns:android");
|
||||||
|
if (!string.IsNullOrEmpty(androidNamepsaceURI))
|
||||||
|
{
|
||||||
|
// Check if the android manifest already has the read external storage permission
|
||||||
|
XmlNodeList nodeList = doc.SelectNodes("/manifest/application/uses-permission");
|
||||||
|
foreach (XmlElement e in nodeList)
|
||||||
|
{
|
||||||
|
string attr = e.GetAttribute("name", androidNamepsaceURI);
|
||||||
|
if (attr == "android.permission.READ_EXTERNAL_STORAGE")
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("Android manifest already has the proper permissions.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
element = (XmlElement)doc.SelectSingleNode("/manifest/application");
|
||||||
|
if (element != null)
|
||||||
|
{
|
||||||
|
// Insert read external storage permission
|
||||||
|
XmlElement newElement = doc.CreateElement("uses-permission");
|
||||||
|
newElement.SetAttribute("name", androidNamepsaceURI, "android.permission.READ_EXTERNAL_STORAGE");
|
||||||
|
element.AppendChild(newElement);
|
||||||
|
|
||||||
|
doc.Save(manifestFolder + "/AndroidManifest.xml");
|
||||||
|
UnityEngine.Debug.Log("Successfully modified android manifest with external storage permission.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
UnityEngine.Debug.LogError("Could not find android naemspace URI in android manifest.");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
449
Assets/Oculus/VR/Editor/OVRGradleGeneration.cs
Normal file
449
Assets/Oculus/VR/Editor/OVRGradleGeneration.cs
Normal file
@ -0,0 +1,449 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
//#define BUILDSESSION
|
||||||
|
|
||||||
|
#if USING_XR_MANAGEMENT && (USING_XR_SDK_OCULUS || USING_XR_SDK_OPENXR)
|
||||||
|
#define USING_XR_SDK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Threading;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Rendering;
|
||||||
|
using UnityEditor.Build;
|
||||||
|
using UnityEditor.Build.Reporting;
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
using UnityEditor.Android;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if USING_XR_SDK_OPENXR
|
||||||
|
using UnityEngine.XR.OpenXR;
|
||||||
|
using UnityEditor.XR.OpenXR.Features;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[InitializeOnLoad]
|
||||||
|
public class OVRGradleGeneration
|
||||||
|
: IPreprocessBuildWithReport, IPostprocessBuildWithReport
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
, IPostGenerateGradleAndroidProject
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
public OVRADBTool adbTool;
|
||||||
|
public Process adbProcess;
|
||||||
|
|
||||||
|
public int callbackOrder { get { return 3; } }
|
||||||
|
static private System.DateTime buildStartTime;
|
||||||
|
static private System.Guid buildGuid;
|
||||||
|
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
public const string prefName = "OVRAutoIncrementVersionCode_Enabled";
|
||||||
|
private const string menuItemAutoIncVersion = "Oculus/Tools/Auto Increment Version Code";
|
||||||
|
static bool autoIncrementVersion = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static OVRGradleGeneration()
|
||||||
|
{
|
||||||
|
EditorApplication.delayCall += OnDelayCall;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void OnDelayCall()
|
||||||
|
{
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
autoIncrementVersion = PlayerPrefs.GetInt(prefName, 0) != 0;
|
||||||
|
Menu.SetChecked(menuItemAutoIncVersion, autoIncrementVersion);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
[MenuItem(menuItemAutoIncVersion)]
|
||||||
|
public static void ToggleUtilities()
|
||||||
|
{
|
||||||
|
autoIncrementVersion = !autoIncrementVersion;
|
||||||
|
Menu.SetChecked(menuItemAutoIncVersion, autoIncrementVersion);
|
||||||
|
|
||||||
|
int newValue = (autoIncrementVersion) ? 1 : 0;
|
||||||
|
PlayerPrefs.SetInt(prefName, newValue);
|
||||||
|
PlayerPrefs.Save();
|
||||||
|
|
||||||
|
UnityEngine.Debug.Log("Auto Increment Version Code: " + autoIncrementVersion);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public void OnPreprocessBuild(BuildReport report)
|
||||||
|
{
|
||||||
|
bool useOpenXR = OVRPluginUpdater.IsOVRPluginOpenXRActivated();
|
||||||
|
|
||||||
|
#if USING_XR_SDK_OPENXR
|
||||||
|
UnityEngine.Debug.LogWarning("The installation of Unity OpenXR Plugin is detected, which should NOT be used in production when developing Oculus apps for production. Please uninstall the package, and install the Oculus XR Plugin from the Package Manager.");
|
||||||
|
|
||||||
|
// OpenXR Plugin will remove all native plugins if they are not under the Feature folder. Include OVRPlugin to the build if OculusXRFeature is enabled.
|
||||||
|
var oculusXRFeature = FeatureHelpers.GetFeatureWithIdForBuildTarget(report.summary.platformGroup, Oculus.XR.OculusXRFeature.featureId);
|
||||||
|
if (oculusXRFeature.enabled)
|
||||||
|
{
|
||||||
|
if (!useOpenXR)
|
||||||
|
{
|
||||||
|
throw new BuildFailedException("OpenXR backend for Oculus Plugin is disabled, which is required to support Unity OpenXR Plugin. Please enable OpenXR backend for Oculus Plugin through the 'Oculus -> Tools -> OpenXR' menu.");
|
||||||
|
}
|
||||||
|
|
||||||
|
string ovrRootPath = OVRPluginUpdater.GetUtilitiesRootPath();
|
||||||
|
var importers = PluginImporter.GetAllImporters();
|
||||||
|
foreach (var importer in importers)
|
||||||
|
{
|
||||||
|
if (!importer.GetCompatibleWithPlatform(report.summary.platform))
|
||||||
|
continue;
|
||||||
|
string fullAssetPath = Path.Combine(Directory.GetCurrentDirectory(), importer.assetPath);
|
||||||
|
#if UNITY_EDITOR_WIN
|
||||||
|
fullAssetPath = fullAssetPath.Replace("/", "\\");
|
||||||
|
#endif
|
||||||
|
if (fullAssetPath.StartsWith(ovrRootPath) && fullAssetPath.Contains("OVRPlugin"))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogFormat("[Oculus] Native plugin included in build because of enabled OculusXRFeature: {0}", importer.assetPath);
|
||||||
|
importer.SetIncludeInBuildDelegate(path => true);
|
||||||
|
}
|
||||||
|
if (!fullAssetPath.StartsWith(ovrRootPath) && fullAssetPath.Contains("libopenxr_loader.so"))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogFormat("[Oculus] libopenxr_loader.so from other packages will be disabled because of enabled OculusXRFeature: {0}", importer.assetPath);
|
||||||
|
importer.SetIncludeInBuildDelegate(path => false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning("OculusXRFeature is not enabled in OpenXR Settings. Oculus Integration scripts will not be functional.");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_ANDROID && !(USING_XR_SDK && UNITY_2019_3_OR_NEWER)
|
||||||
|
// Generate error when Vulkan is selected as the perferred graphics API, which is not currently supported in Unity XR
|
||||||
|
if (!PlayerSettings.GetUseDefaultGraphicsAPIs(BuildTarget.Android))
|
||||||
|
{
|
||||||
|
GraphicsDeviceType[] apis = PlayerSettings.GetGraphicsAPIs(BuildTarget.Android);
|
||||||
|
if (apis.Length >= 1 && apis[0] == GraphicsDeviceType.Vulkan)
|
||||||
|
{
|
||||||
|
throw new BuildFailedException("The Vulkan Graphics API does not support XR in your configuration. To use Vulkan, you must use Unity 2019.3 or newer, and the XR Plugin Management.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
#if USING_XR_SDK
|
||||||
|
if (useOpenXR)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning("Oculus Utilities Plugin with OpenXR is being used, which is under experimental status");
|
||||||
|
|
||||||
|
if (PlayerSettings.colorSpace != ColorSpace.Linear)
|
||||||
|
{
|
||||||
|
throw new BuildFailedException("Oculus Utilities Plugin with OpenXR only supports linear lighting. Please set 'Rendering/Color Space' to 'Linear' in Player Settings");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
if (useOpenXR)
|
||||||
|
{
|
||||||
|
throw new BuildFailedException("Oculus Utilities Plugin with OpenXR only supports XR Plug-in Managmenent with Oculus XR Plugin.");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if UNITY_ANDROID && USING_XR_SDK && !USING_COMPATIBLE_OCULUS_XR_PLUGIN_VERSION
|
||||||
|
if (PlayerSettings.Android.targetArchitectures != AndroidArchitecture.ARM64)
|
||||||
|
throw new BuildFailedException("Your project is using an Oculus XR Plugin version with known issues. Please navigate to the Package Manager and upgrade the Oculus XR Plugin to the latest verified version. When performing the upgrade" +
|
||||||
|
", you must first \"Remove\" the Oculus XR Plugin package, and then \"Install\" the package at the verified version. Be sure to remove, then install, not just upgrade.");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
buildStartTime = System.DateTime.Now;
|
||||||
|
buildGuid = System.Guid.NewGuid();
|
||||||
|
|
||||||
|
#if BUILDSESSION
|
||||||
|
StreamWriter writer = new StreamWriter("build_session", false);
|
||||||
|
UnityEngine.Debug.LogFormat("Build Session: {0}", buildGuid.ToString());
|
||||||
|
writer.WriteLine(buildGuid.ToString());
|
||||||
|
writer.Close();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPostGenerateGradleAndroidProject(string path)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.Log("OVRGradleGeneration triggered.");
|
||||||
|
|
||||||
|
var targetOculusPlatform = new List<string>();
|
||||||
|
if (OVRDeviceSelector.isTargetDeviceQuestFamily)
|
||||||
|
{
|
||||||
|
targetOculusPlatform.Add("quest");
|
||||||
|
}
|
||||||
|
UnityEngine.Debug.LogFormat("QuestFamily = {0}: Quest = {1}, Quest2 = {2}",
|
||||||
|
OVRDeviceSelector.isTargetDeviceQuestFamily,
|
||||||
|
OVRDeviceSelector.isTargetDeviceQuest,
|
||||||
|
OVRDeviceSelector.isTargetDeviceQuest2);
|
||||||
|
|
||||||
|
OVRProjectConfig projectConfig = OVRProjectConfig.GetProjectConfig();
|
||||||
|
if (projectConfig != null && projectConfig.systemSplashScreen != null)
|
||||||
|
{
|
||||||
|
if (PlayerSettings.virtualRealitySplashScreen != null)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogWarning("Virtual Reality Splash Screen (in Player Settings) is active. It would be displayed after the system splash screen, before the first game frame be rendered.");
|
||||||
|
}
|
||||||
|
string splashScreenAssetPath = AssetDatabase.GetAssetPath(projectConfig.systemSplashScreen);
|
||||||
|
if (Path.GetExtension(splashScreenAssetPath).ToLower() != ".png")
|
||||||
|
{
|
||||||
|
throw new BuildFailedException("Invalid file format of System Splash Screen. It has to be a PNG file to be used by the Quest OS. The asset path: " + splashScreenAssetPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string sourcePath = splashScreenAssetPath;
|
||||||
|
string targetFolder = Path.Combine(path, "src/main/assets");
|
||||||
|
string targetPath = targetFolder + "/vr_splash.png";
|
||||||
|
UnityEngine.Debug.LogFormat("Copy splash screen asset from {0} to {1}", sourcePath, targetPath);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
File.Copy(sourcePath, targetPath, true);
|
||||||
|
}
|
||||||
|
catch(Exception e)
|
||||||
|
{
|
||||||
|
throw new BuildFailedException(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PatchAndroidManifest(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void PatchAndroidManifest(string path)
|
||||||
|
{
|
||||||
|
string manifestFolder = Path.Combine(path, "src/main");
|
||||||
|
string file = manifestFolder + "/AndroidManifest.xml";
|
||||||
|
|
||||||
|
bool patchedSecurityConfig = false;
|
||||||
|
// If Enable NSC Config, copy XML file into gradle project
|
||||||
|
OVRProjectConfig projectConfig = OVRProjectConfig.GetProjectConfig();
|
||||||
|
if (projectConfig != null)
|
||||||
|
{
|
||||||
|
if (projectConfig.enableNSCConfig)
|
||||||
|
{
|
||||||
|
// If no custom xml security path is specified, look for the default location in the integrations package.
|
||||||
|
string securityConfigFile = projectConfig.securityXmlPath;
|
||||||
|
if (string.IsNullOrEmpty(securityConfigFile))
|
||||||
|
{
|
||||||
|
securityConfigFile = GetOculusProjectNetworkSecConfigPath();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Uri configUri = new Uri(Path.GetFullPath(securityConfigFile));
|
||||||
|
Uri projectUri = new Uri(Application.dataPath);
|
||||||
|
Uri relativeUri = projectUri.MakeRelativeUri(configUri);
|
||||||
|
securityConfigFile = relativeUri.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
string xmlDirectory = Path.Combine(path, "src/main/res/xml");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!Directory.Exists(xmlDirectory))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(xmlDirectory);
|
||||||
|
}
|
||||||
|
File.Copy(securityConfigFile, Path.Combine(xmlDirectory, "network_sec_config.xml"), true);
|
||||||
|
patchedSecurityConfig = true;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError(e.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
OVRManifestPreprocessor.PatchAndroidManifest(file, enableSecurity: patchedSecurityConfig);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetOculusProjectNetworkSecConfigPath()
|
||||||
|
{
|
||||||
|
var so = ScriptableObject.CreateInstance(typeof(OVRPluginUpdaterStub));
|
||||||
|
var script = MonoScript.FromScriptableObject(so);
|
||||||
|
string assetPath = AssetDatabase.GetAssetPath(script);
|
||||||
|
string editorDir = Directory.GetParent(assetPath).FullName;
|
||||||
|
string configAssetPath = Path.GetFullPath(Path.Combine(editorDir, "network_sec_config.xml"));
|
||||||
|
Uri configUri = new Uri(configAssetPath);
|
||||||
|
Uri projectUri = new Uri(Application.dataPath);
|
||||||
|
Uri relativeUri = projectUri.MakeRelativeUri(configUri);
|
||||||
|
|
||||||
|
return relativeUri.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnPostprocessBuild(BuildReport report)
|
||||||
|
{
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
if(autoIncrementVersion)
|
||||||
|
{
|
||||||
|
if((report.summary.options & BuildOptions.Development) == 0)
|
||||||
|
{
|
||||||
|
PlayerSettings.Android.bundleVersionCode++;
|
||||||
|
UnityEngine.Debug.Log("Incrementing version code to " + PlayerSettings.Android.bundleVersionCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool isExporting = true;
|
||||||
|
foreach (var step in report.steps)
|
||||||
|
{
|
||||||
|
if (step.name.Contains("Compile scripts")
|
||||||
|
|| step.name.Contains("Building scenes")
|
||||||
|
|| step.name.Contains("Writing asset files")
|
||||||
|
|| step.name.Contains("Preparing APK resources")
|
||||||
|
|| step.name.Contains("Creating Android manifest")
|
||||||
|
|| step.name.Contains("Processing plugins")
|
||||||
|
|| step.name.Contains("Exporting project")
|
||||||
|
|| step.name.Contains("Building Gradle project"))
|
||||||
|
{
|
||||||
|
#if BUILDSESSION
|
||||||
|
UnityEngine.Debug.LogFormat("build_step_" + step.name.ToLower().Replace(' ', '_') + ": {0}", step.duration.TotalSeconds.ToString());
|
||||||
|
#endif
|
||||||
|
if(step.name.Contains("Building Gradle project"))
|
||||||
|
{
|
||||||
|
isExporting = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
if (!report.summary.outputPath.Contains("OVRGradleTempExport"))
|
||||||
|
{
|
||||||
|
#if BUILDSESSION
|
||||||
|
UnityEngine.Debug.LogFormat("build_complete: {0}", (System.DateTime.Now - buildStartTime).TotalSeconds.ToString());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
if (!isExporting)
|
||||||
|
{
|
||||||
|
// Get the hosts path to Android SDK
|
||||||
|
if (adbTool == null)
|
||||||
|
{
|
||||||
|
adbTool = new OVRADBTool(OVRConfig.Instance.GetAndroidSDKPath(false));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
// Check to see if there are any ADB devices connected before continuing.
|
||||||
|
List<string> devices = adbTool.GetDevices();
|
||||||
|
if(devices.Count == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear current logs on device
|
||||||
|
Process adbClearProcess;
|
||||||
|
adbClearProcess = adbTool.RunCommandAsync(new string[] { "logcat --clear" }, null);
|
||||||
|
|
||||||
|
// Add a timeout if we cannot get a response from adb logcat --clear in time.
|
||||||
|
Stopwatch timeout = new Stopwatch();
|
||||||
|
timeout.Start();
|
||||||
|
while (!adbClearProcess.WaitForExit(100))
|
||||||
|
{
|
||||||
|
if (timeout.ElapsedMilliseconds > 2000)
|
||||||
|
{
|
||||||
|
adbClearProcess.Kill();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if existing ADB process is still running, kill if needed
|
||||||
|
if (adbProcess != null && !adbProcess.HasExited)
|
||||||
|
{
|
||||||
|
adbProcess.Kill();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Begin thread to time upload and install
|
||||||
|
var thread = new Thread(delegate ()
|
||||||
|
{
|
||||||
|
TimeDeploy();
|
||||||
|
});
|
||||||
|
thread.Start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if UNITY_ANDROID
|
||||||
|
public bool WaitForProcess;
|
||||||
|
public bool TransferStarted;
|
||||||
|
public DateTime UploadStart;
|
||||||
|
public DateTime UploadEnd;
|
||||||
|
public DateTime InstallEnd;
|
||||||
|
|
||||||
|
public void TimeDeploy()
|
||||||
|
{
|
||||||
|
if (adbTool != null)
|
||||||
|
{
|
||||||
|
TransferStarted = false;
|
||||||
|
DataReceivedEventHandler outputRecieved = new DataReceivedEventHandler(
|
||||||
|
(s, e) =>
|
||||||
|
{
|
||||||
|
if (e.Data != null && e.Data.Length != 0 && !e.Data.Contains("\u001b"))
|
||||||
|
{
|
||||||
|
if (e.Data.Contains("free_cache"))
|
||||||
|
{
|
||||||
|
// Device recieved install command and is starting upload
|
||||||
|
UploadStart = System.DateTime.Now;
|
||||||
|
TransferStarted = true;
|
||||||
|
}
|
||||||
|
else if (e.Data.Contains("Running dexopt"))
|
||||||
|
{
|
||||||
|
// Upload has finished and Package Manager is starting install
|
||||||
|
UploadEnd = System.DateTime.Now;
|
||||||
|
}
|
||||||
|
else if (e.Data.Contains("dex2oat took"))
|
||||||
|
{
|
||||||
|
// Package Manager finished install
|
||||||
|
InstallEnd = System.DateTime.Now;
|
||||||
|
WaitForProcess = false;
|
||||||
|
}
|
||||||
|
else if (e.Data.Contains("W PackageManager"))
|
||||||
|
{
|
||||||
|
// Warning from Package Manager is a failure in the install process
|
||||||
|
WaitForProcess = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
WaitForProcess = true;
|
||||||
|
adbProcess = adbTool.RunCommandAsync(new string[] { "logcat" }, outputRecieved);
|
||||||
|
|
||||||
|
Stopwatch transferTimeout = new Stopwatch();
|
||||||
|
transferTimeout.Start();
|
||||||
|
while (adbProcess != null && !adbProcess.WaitForExit(100))
|
||||||
|
{
|
||||||
|
if (!WaitForProcess)
|
||||||
|
{
|
||||||
|
adbProcess.Kill();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!TransferStarted && transferTimeout.ElapsedMilliseconds > 5000)
|
||||||
|
{
|
||||||
|
adbProcess.Kill();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
31
Assets/Oculus/VR/Editor/OVRLayerAttributeEditor.cs
Normal file
31
Assets/Oculus/VR/Editor/OVRLayerAttributeEditor.cs
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
[CustomPropertyDrawer(typeof(OVRLayerAttribute))]
|
||||||
|
class LayerAttributeEditor : PropertyDrawer {
|
||||||
|
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
|
||||||
|
{
|
||||||
|
// One line of oxygen free code.
|
||||||
|
property.intValue = EditorGUI.LayerField(position, label, property.intValue);
|
||||||
|
}
|
||||||
|
}
|
1024
Assets/Oculus/VR/Editor/OVRLint.cs
Normal file
1024
Assets/Oculus/VR/Editor/OVRLint.cs
Normal file
File diff suppressed because it is too large
Load Diff
469
Assets/Oculus/VR/Editor/OVRManifestPreprocessor.cs
Normal file
469
Assets/Oculus/VR/Editor/OVRManifestPreprocessor.cs
Normal file
@ -0,0 +1,469 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
|
public class OVRManifestPreprocessor
|
||||||
|
{
|
||||||
|
[MenuItem("Oculus/Tools/Create store-compatible AndroidManifest.xml", false, 100000)]
|
||||||
|
public static void GenerateManifestForSubmission()
|
||||||
|
{
|
||||||
|
var so = ScriptableObject.CreateInstance(typeof(OVRPluginUpdaterStub));
|
||||||
|
var script = MonoScript.FromScriptableObject(so);
|
||||||
|
string assetPath = AssetDatabase.GetAssetPath(script);
|
||||||
|
string editorDir = Directory.GetParent(assetPath).FullName;
|
||||||
|
string srcFile = editorDir + "/AndroidManifest.OVRSubmission.xml";
|
||||||
|
|
||||||
|
if (!File.Exists(srcFile))
|
||||||
|
{
|
||||||
|
Debug.LogError("Cannot find Android manifest template for submission." +
|
||||||
|
" Please delete the OVR folder and reimport the Oculus Utilities.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
string manifestFolder = Application.dataPath + "/Plugins/Android";
|
||||||
|
|
||||||
|
if (!Directory.Exists(manifestFolder))
|
||||||
|
Directory.CreateDirectory(manifestFolder);
|
||||||
|
|
||||||
|
string dstFile = manifestFolder + "/AndroidManifest.xml";
|
||||||
|
|
||||||
|
if (File.Exists(dstFile))
|
||||||
|
{
|
||||||
|
if (!EditorUtility.DisplayDialog("AndroidManifest.xml Already Exists!", "Would you like to replace the existing manifest with a new one? All modifications will be lost.", "Replace", "Cancel"))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
PatchAndroidManifest(srcFile, dstFile, false);
|
||||||
|
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MenuItem("Oculus/Tools/Update AndroidManifest.xml")]
|
||||||
|
public static void UpdateAndroidManifest()
|
||||||
|
{
|
||||||
|
string manifestFile = "Assets/Plugins/Android/AndroidManifest.xml";
|
||||||
|
|
||||||
|
if (!File.Exists(manifestFile))
|
||||||
|
{
|
||||||
|
Debug.LogError("Unable to update manifest because it does not exist! Run \"Create store-compatible AndroidManifest.xml\" first");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!EditorUtility.DisplayDialog("Update AndroidManifest.xml", "This will overwrite all Oculus specific AndroidManifest Settings. Continue?", "Overwrite", "Cancel"))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PatchAndroidManifest(manifestFile, skipExistingAttributes: false);
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
[MenuItem("Oculus/Tools/Remove AndroidManifest.xml")]
|
||||||
|
public static void RemoveAndroidManifest()
|
||||||
|
{
|
||||||
|
AssetDatabase.DeleteAsset("Assets/Plugins/Android/AndroidManifest.xml");
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void AddOrRemoveTag(XmlDocument doc, string @namespace, string path, string elementName, string name, bool required, bool modifyIfFound, params string[] attrs) // name, value pairs
|
||||||
|
{
|
||||||
|
var nodes = doc.SelectNodes(path + "/" + elementName);
|
||||||
|
XmlElement element = null;
|
||||||
|
foreach (XmlElement e in nodes)
|
||||||
|
{
|
||||||
|
if (name == null || name == e.GetAttribute("name", @namespace))
|
||||||
|
{
|
||||||
|
element = e;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (required)
|
||||||
|
{
|
||||||
|
if (element == null)
|
||||||
|
{
|
||||||
|
var parent = doc.SelectSingleNode(path);
|
||||||
|
element = doc.CreateElement(elementName);
|
||||||
|
element.SetAttribute("name", @namespace, name);
|
||||||
|
parent.AppendChild(element);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < attrs.Length; i += 2)
|
||||||
|
{
|
||||||
|
if (modifyIfFound || string.IsNullOrEmpty(element.GetAttribute(attrs[i], @namespace)))
|
||||||
|
{
|
||||||
|
if (attrs[i + 1] != null)
|
||||||
|
{
|
||||||
|
element.SetAttribute(attrs[i], @namespace, attrs[i + 1]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
element.RemoveAttribute(attrs[i], @namespace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (element != null && modifyIfFound)
|
||||||
|
{
|
||||||
|
element.ParentNode.RemoveChild(element);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void PatchAndroidManifest(string sourceFile, string destinationFile = null, bool skipExistingAttributes = true, bool enableSecurity = false)
|
||||||
|
{
|
||||||
|
if (destinationFile == null)
|
||||||
|
{
|
||||||
|
destinationFile = sourceFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool modifyIfFound = !skipExistingAttributes;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// Load android manfiest file
|
||||||
|
XmlDocument doc = new XmlDocument();
|
||||||
|
doc.Load(sourceFile);
|
||||||
|
|
||||||
|
string androidNamespaceURI;
|
||||||
|
XmlElement element = (XmlElement)doc.SelectSingleNode("/manifest");
|
||||||
|
if (element == null)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("Could not find manifest tag in android manifest.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get android namespace URI from the manifest
|
||||||
|
androidNamespaceURI = element.GetAttribute("xmlns:android");
|
||||||
|
if (string.IsNullOrEmpty(androidNamespaceURI))
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogError("Could not find Android Namespace in manifest.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplyRequiredManfiestTags(doc, androidNamespaceURI, modifyIfFound, enableSecurity);
|
||||||
|
ApplyFeatureManfiestTags(doc, androidNamespaceURI, modifyIfFound);
|
||||||
|
|
||||||
|
// The following manifest entries are all handled through Oculus XR SDK Plugin
|
||||||
|
#if !PRIORITIZE_OCULUS_XR_SETTINGS
|
||||||
|
ApplyOculusXRManifestTags(doc, androidNamespaceURI, modifyIfFound);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
doc.Save(destinationFile);
|
||||||
|
}
|
||||||
|
catch (System.Exception e)
|
||||||
|
{
|
||||||
|
UnityEngine.Debug.LogException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ApplyRequiredManfiestTags(XmlDocument doc, string androidNamespaceURI, bool modifyIfFound, bool enableSecurity)
|
||||||
|
{
|
||||||
|
OVRProjectConfig projectConfig = OVRProjectConfig.GetProjectConfig();
|
||||||
|
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest/application/activity/intent-filter",
|
||||||
|
"category",
|
||||||
|
"android.intent.category.LEANBACK_LAUNCHER",
|
||||||
|
required: false,
|
||||||
|
modifyIfFound: true); // always remove leanback launcher
|
||||||
|
|
||||||
|
// First add or remove headtracking flag if targeting Quest
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-feature",
|
||||||
|
"android.hardware.vr.headtracking",
|
||||||
|
OVRDeviceSelector.isTargetDeviceQuestFamily,
|
||||||
|
true,
|
||||||
|
"version", "1",
|
||||||
|
"required", OVRProjectConfig.GetProjectConfig().allowOptional3DofHeadTracking ? "false" : "true");
|
||||||
|
|
||||||
|
// make sure android label and icon are set in the manifest
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"application",
|
||||||
|
null,
|
||||||
|
true,
|
||||||
|
modifyIfFound,
|
||||||
|
"label", "@string/app_name",
|
||||||
|
"icon", "@mipmap/app_icon",
|
||||||
|
// Disable allowBackup in manifest and add Android NSC XML file
|
||||||
|
"allowBackup", projectConfig.disableBackups ? "false" : "true",
|
||||||
|
"networkSecurityConfig", projectConfig.enableNSCConfig && enableSecurity ? "@xml/network_sec_config" : null
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void ApplyFeatureManfiestTags(XmlDocument doc, string androidNamespaceURI, bool modifyIfFound)
|
||||||
|
{
|
||||||
|
OVRProjectConfig projectConfig = OVRProjectConfig.GetProjectConfig();
|
||||||
|
OVRRuntimeSettings runtimeSettings = OVRRuntimeSettings.GetRuntimeSettings();
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// Hand Tracking
|
||||||
|
// If Quest is the target device, add the handtracking manifest tags if needed
|
||||||
|
// Mapping of project setting to manifest setting:
|
||||||
|
// OVRProjectConfig.HandTrackingSupport.ControllersOnly => manifest entry not present
|
||||||
|
// OVRProjectConfig.HandTrackingSupport.ControllersAndHands => manifest entry present and required=false
|
||||||
|
// OVRProjectConfig.HandTrackingSupport.HandsOnly => manifest entry present and required=true
|
||||||
|
OVRProjectConfig.HandTrackingSupport targetHandTrackingSupport = OVRProjectConfig.GetProjectConfig().handTrackingSupport;
|
||||||
|
OVRProjectConfig.HandTrackingVersion targetHandTrackingVersion = OVRProjectConfig.GetProjectConfig().handTrackingVersion;
|
||||||
|
bool handTrackingEntryNeeded = OVRDeviceSelector.isTargetDeviceQuestFamily && (targetHandTrackingSupport != OVRProjectConfig.HandTrackingSupport.ControllersOnly);
|
||||||
|
bool handTrackingVersionEntryNeeded = handTrackingEntryNeeded && (targetHandTrackingVersion != OVRProjectConfig.HandTrackingVersion.Default);
|
||||||
|
string handTrackingVersionValue = (targetHandTrackingVersion == OVRProjectConfig.HandTrackingVersion.V2) ? "V2.0" : "V1.0";
|
||||||
|
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-feature",
|
||||||
|
"oculus.software.handtracking",
|
||||||
|
handTrackingEntryNeeded,
|
||||||
|
modifyIfFound,
|
||||||
|
"required", (targetHandTrackingSupport == OVRProjectConfig.HandTrackingSupport.HandsOnly) ? "true" : "false");
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-permission",
|
||||||
|
"com.oculus.permission.HAND_TRACKING",
|
||||||
|
handTrackingEntryNeeded,
|
||||||
|
modifyIfFound);
|
||||||
|
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest/application",
|
||||||
|
"meta-data",
|
||||||
|
"com.oculus.handtracking.frequency",
|
||||||
|
handTrackingEntryNeeded,
|
||||||
|
modifyIfFound,
|
||||||
|
"value", projectConfig.handTrackingFrequency.ToString());
|
||||||
|
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest/application",
|
||||||
|
"meta-data",
|
||||||
|
"com.oculus.handtracking.version",
|
||||||
|
handTrackingVersionEntryNeeded,
|
||||||
|
modifyIfFound,
|
||||||
|
"value", handTrackingVersionValue);
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// System Keyboard
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-feature",
|
||||||
|
"oculus.software.overlay_keyboard",
|
||||||
|
projectConfig.requiresSystemKeyboard,
|
||||||
|
modifyIfFound,
|
||||||
|
"required", "false");
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// Experimental Features
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-feature",
|
||||||
|
"com.oculus.experimental.enabled",
|
||||||
|
projectConfig.experimentalFeaturesEnabled,
|
||||||
|
modifyIfFound,
|
||||||
|
"required", "true");
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// Anchor
|
||||||
|
OVRProjectConfig.AnchorSupport targetAnchorSupport = OVRProjectConfig.GetProjectConfig().anchorSupport;
|
||||||
|
bool anchorEntryNeeded = OVRDeviceSelector.isTargetDeviceQuestFamily && (targetAnchorSupport == OVRProjectConfig.AnchorSupport.Enabled);
|
||||||
|
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-permission",
|
||||||
|
"com.oculus.permission.USE_ANCHOR_API",
|
||||||
|
anchorEntryNeeded,
|
||||||
|
modifyIfFound);
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// Passthrough
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-feature",
|
||||||
|
"com.oculus.feature.PASSTHROUGH",
|
||||||
|
projectConfig.insightPassthroughEnabled,
|
||||||
|
modifyIfFound,
|
||||||
|
"required", "true");
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// System Splash Screen
|
||||||
|
if (projectConfig.systemSplashScreen != null)
|
||||||
|
{
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest/application",
|
||||||
|
"meta-data",
|
||||||
|
"com.oculus.ossplash",
|
||||||
|
true,
|
||||||
|
modifyIfFound,
|
||||||
|
"value", "true");
|
||||||
|
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest/application",
|
||||||
|
"meta-data",
|
||||||
|
"com.oculus.ossplash.colorspace",
|
||||||
|
true,
|
||||||
|
modifyIfFound,
|
||||||
|
"value", ColorSpaceToManifestTag(runtimeSettings.colorSpace));
|
||||||
|
}
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// Render Model
|
||||||
|
OVRProjectConfig.RenderModelSupport renderModelSupport = OVRProjectConfig.GetProjectConfig().renderModelSupport;
|
||||||
|
bool renderModelEntryNeeded = OVRDeviceSelector.isTargetDeviceQuestFamily && (renderModelSupport == OVRProjectConfig.RenderModelSupport.Enabled);
|
||||||
|
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-feature",
|
||||||
|
"com.oculus.feature.RENDER_MODEL",
|
||||||
|
renderModelEntryNeeded,
|
||||||
|
modifyIfFound);
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-permission",
|
||||||
|
"com.oculus.permission.RENDER_MODEL",
|
||||||
|
renderModelEntryNeeded,
|
||||||
|
modifyIfFound);
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
// Tracked Keyboard
|
||||||
|
// If Quest is the target device, add the tracked keyboard manifest tags if needed
|
||||||
|
// Mapping of project setting to manifest setting:
|
||||||
|
// OVRProjectConfig.TrackedKeyboardSupport.None => manifest entry not present
|
||||||
|
// OVRProjectConfig.TrackedKeyboardSupport.Supported => manifest entry present and required=false
|
||||||
|
// OVRProjectConfig.TrackedKeyboardSupport.Required => manifest entry present and required=true
|
||||||
|
OVRProjectConfig.TrackedKeyboardSupport targetTrackedKeyboardSupport = OVRProjectConfig.GetProjectConfig().trackedKeyboardSupport;
|
||||||
|
bool trackedKeyboardEntryNeeded = OVRDeviceSelector.isTargetDeviceQuestFamily && (targetTrackedKeyboardSupport != OVRProjectConfig.TrackedKeyboardSupport.None);
|
||||||
|
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-feature",
|
||||||
|
"oculus.software.trackedkeyboard",
|
||||||
|
trackedKeyboardEntryNeeded,
|
||||||
|
modifyIfFound,
|
||||||
|
"required", (targetTrackedKeyboardSupport == OVRProjectConfig.TrackedKeyboardSupport.Required) ? "true" : "false");
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest",
|
||||||
|
"uses-permission",
|
||||||
|
"com.oculus.permission.TRACKED_KEYBOARD",
|
||||||
|
trackedKeyboardEntryNeeded,
|
||||||
|
modifyIfFound);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private static void ApplyOculusXRManifestTags(XmlDocument doc, string androidNamespaceURI, bool modifyIfFound)
|
||||||
|
{
|
||||||
|
// Add focus aware tag if this app is targeting Quest Family
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest/application/activity",
|
||||||
|
"meta-data",
|
||||||
|
"com.oculus.vr.focusaware",
|
||||||
|
OVRDeviceSelector.isTargetDeviceQuestFamily,
|
||||||
|
modifyIfFound,
|
||||||
|
"value", "true");
|
||||||
|
|
||||||
|
// Add support devices manifest according to the target devices
|
||||||
|
if (OVRDeviceSelector.isTargetDeviceQuestFamily)
|
||||||
|
{
|
||||||
|
string targetDeviceValue = "quest";
|
||||||
|
if (OVRDeviceSelector.isTargetDeviceQuest && OVRDeviceSelector.isTargetDeviceQuest2)
|
||||||
|
{
|
||||||
|
targetDeviceValue = "quest|quest2";
|
||||||
|
}
|
||||||
|
else if (OVRDeviceSelector.isTargetDeviceQuest2)
|
||||||
|
{
|
||||||
|
targetDeviceValue = "quest2";
|
||||||
|
}
|
||||||
|
else if (OVRDeviceSelector.isTargetDeviceQuest)
|
||||||
|
{
|
||||||
|
targetDeviceValue = "quest";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogError("Unexpected target devices");
|
||||||
|
}
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest/application",
|
||||||
|
"meta-data",
|
||||||
|
"com.oculus.supportedDevices",
|
||||||
|
true,
|
||||||
|
modifyIfFound,
|
||||||
|
"value", targetDeviceValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add VR intent filter tag in the manifest
|
||||||
|
AddOrRemoveTag(doc,
|
||||||
|
androidNamespaceURI,
|
||||||
|
"/manifest/application/activity/intent-filter",
|
||||||
|
"category",
|
||||||
|
"com.oculus.intent.category.VR",
|
||||||
|
required: true,
|
||||||
|
modifyIfFound: true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string ColorSpaceToManifestTag(OVRManager.ColorSpace colorSpace)
|
||||||
|
{
|
||||||
|
switch (colorSpace)
|
||||||
|
{
|
||||||
|
case OVRManager.ColorSpace.Unmanaged:
|
||||||
|
return "!Unmanaged";
|
||||||
|
case OVRManager.ColorSpace.Rec_2020:
|
||||||
|
return "Rec.2020";
|
||||||
|
case OVRManager.ColorSpace.Rec_709:
|
||||||
|
return "Rec.709";
|
||||||
|
case OVRManager.ColorSpace.Rift_CV1:
|
||||||
|
return "!RiftCV1";
|
||||||
|
case OVRManager.ColorSpace.Rift_S:
|
||||||
|
return "!RiftS";
|
||||||
|
case OVRManager.ColorSpace.Quest:
|
||||||
|
return "!Quest";
|
||||||
|
case OVRManager.ColorSpace.P3:
|
||||||
|
return "P3";
|
||||||
|
case OVRManager.ColorSpace.Adobe_RGB:
|
||||||
|
return "Adobe";
|
||||||
|
default:
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1373
Assets/Oculus/VR/Editor/OVRPlatformTool.cs
Normal file
1373
Assets/Oculus/VR/Editor/OVRPlatformTool.cs
Normal file
File diff suppressed because it is too large
Load Diff
600
Assets/Oculus/VR/Editor/OVRPlatformToolSettings.cs
Normal file
600
Assets/Oculus/VR/Editor/OVRPlatformToolSettings.cs
Normal file
@ -0,0 +1,600 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Runtime.Serialization.Formatters.Binary;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
||||||
|
namespace Assets.Oculus.VR.Editor
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
[UnityEditor.InitializeOnLoad]
|
||||||
|
#endif
|
||||||
|
public sealed class OVRPlatformToolSettings : ScriptableObject
|
||||||
|
{
|
||||||
|
private const string DEFAULT_RELEASE_CHANNEL = "Alpha";
|
||||||
|
|
||||||
|
static OVRPlatformToolSettings()
|
||||||
|
{
|
||||||
|
// BuildPipeline.isBuildingPlayer cannot be called in a static constructor
|
||||||
|
// Run Update once to call TryInitialize then remove delegate
|
||||||
|
EditorApplication.update += Update;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void Update()
|
||||||
|
{
|
||||||
|
// Initialize the instance only if a build is not currently running.
|
||||||
|
TryInitialize();
|
||||||
|
// Stop running Update
|
||||||
|
EditorApplication.update -= Update;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string AppID
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None &&
|
||||||
|
EditorPrefs.HasKey("OVRPlatformToolSettings_AppID" + (int)Instance.targetPlatform))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_AppID" + (int)Instance.targetPlatform);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None)
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_AppID" + (int)Instance.targetPlatform, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ReleaseNote
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None &&
|
||||||
|
EditorPrefs.HasKey("OVRPlatformToolSettings_ReleaseNote" + (int)Instance.targetPlatform))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_ReleaseNote" + (int)Instance.targetPlatform);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None)
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_ReleaseNote" + (int)Instance.targetPlatform, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ReleaseChannel
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None &&
|
||||||
|
EditorPrefs.HasKey("OVRPlatformToolSettings_ReleaseChannel" + (int)Instance.targetPlatform))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_ReleaseChannel" + (int)Instance.targetPlatform);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None)
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_ReleaseChannel" + (int)Instance.targetPlatform, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ApkBuildPath
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None &&
|
||||||
|
EditorPrefs.HasKey("OVRPlatformToolSettings_ApkBuildPath" + (int)Instance.targetPlatform))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_ApkBuildPath" + (int)Instance.targetPlatform);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None)
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_ApkBuildPath" + (int)Instance.targetPlatform, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string ObbFilePath
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None &&
|
||||||
|
EditorPrefs.HasKey("OVRPlatformToolSettings_ObbFilePath" + (int)Instance.targetPlatform))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_ObbFilePath" + (int)Instance.targetPlatform);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None)
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_ObbFilePath" + (int)Instance.targetPlatform, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string AssetsDirectory
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None &&
|
||||||
|
EditorPrefs.HasKey("OVRPlatformToolSettings_AssetsDirectory" + (int)Instance.targetPlatform))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_AssetsDirectory" + (int)Instance.targetPlatform);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None)
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_AssetsDirectory" + (int)Instance.targetPlatform, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RiftBuildDirectory
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_RiftBuildDirectory"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_RiftBuildDirectory");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_RiftBuildDirectory", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RiftBuildVersion
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_RiftBuildVersion"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_RiftBuildVersion");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_RiftBuildVersion", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RiftLaunchFile
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_RiftLaunchFile"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_RiftLaunchFile");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_RiftLaunchFile", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RiftLaunchParams
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_RiftLaunchParams"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_RiftLaunchParams");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_RiftLaunchParams", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Rift2DLaunchFile
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_Rift2DLaunchFile"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_Rift2DLaunchFile");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_Rift2DLaunchFile", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string Rift2DLaunchParams
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_Rift2DLaunchParams"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_Rift2DLaunchParams");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_Rift2DLaunchParams", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool RiftFirewallException
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_RiftFirewallException"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetBool("OVRPlatformToolSettings_RiftFirewallException");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetBool("OVRPlatformToolSettings_RiftFirewallException", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OVRPlatformTool.GamepadType RiftGamepadEmulation
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_RiftGamepadEmulation"))
|
||||||
|
{
|
||||||
|
return (OVRPlatformTool.GamepadType)EditorPrefs.GetInt("OVRPlatformToolSettings_RiftGamepadEmulation");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return OVRPlatformTool.GamepadType.OFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetInt("OVRPlatformToolSettings_RiftGamepadEmulation", (int)value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<RedistPackage> RiftRedistPackages
|
||||||
|
{
|
||||||
|
get { return Instance.riftRedistPackages; }
|
||||||
|
set { Instance.riftRedistPackages = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string LanguagePackDirectory
|
||||||
|
{
|
||||||
|
get { return Instance.languagePackDirectory; }
|
||||||
|
set { Instance.languagePackDirectory = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List<AssetConfig> AssetConfigs
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None ? Instance.assetConfigs[(int)Instance.targetPlatform].configList : new List<AssetConfig>();
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if (Instance.targetPlatform < OVRPlatformTool.TargetPlatform.None)
|
||||||
|
{
|
||||||
|
Instance.assetConfigs[(int)Instance.targetPlatform].configList = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OVRPlatformTool.TargetPlatform TargetPlatform
|
||||||
|
{
|
||||||
|
get { return Instance.targetPlatform; }
|
||||||
|
set { Instance.targetPlatform = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool RunOvrLint
|
||||||
|
{
|
||||||
|
get { return Instance.runOvrLint; }
|
||||||
|
set { Instance.runOvrLint = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool UploadDebugSymbols
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_UploadDebugSymbols"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetBool("OVRPlatformToolSettings_UploadDebugSymbols");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetBool("OVRPlatformToolSettings_UploadDebugSymbols", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string DebugSymbolsDirectory
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_DebugSymbolsDirectory"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_DebugSymbolsDirectory");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_DebugSymbolsDirectory", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool UploadDebugSymbolsOnly
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_UploadDebugSymbolsOnly"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetBool("OVRPlatformToolSettings_UploadDebugSymbolsOnly");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetBool("OVRPlatformToolSettings_UploadDebugSymbolsOnly", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string BuildID
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (EditorPrefs.HasKey("OVRPlatformToolSettings_BuildID"))
|
||||||
|
{
|
||||||
|
return EditorPrefs.GetString("OVRPlatformToolSettings_BuildID");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_BuildID", value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private List<RedistPackage> riftRedistPackages;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private string languagePackDirectory = "";
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private AssetConfigList[] assetConfigs = new AssetConfigList[(int)OVRPlatformTool.TargetPlatform.None];
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private OVRPlatformTool.TargetPlatform targetPlatform = OVRPlatformTool.TargetPlatform.None;
|
||||||
|
|
||||||
|
[SerializeField]
|
||||||
|
private bool runOvrLint = true;
|
||||||
|
|
||||||
|
public static bool TryInitialize()
|
||||||
|
{
|
||||||
|
// If not initialized and Build Player is current running, UnityEditor.AssetDatabase.CreateAsset
|
||||||
|
// is unsafe to call and will cause a crash. Only load the resource if it already exists.
|
||||||
|
if (instance == null && BuildPipeline.isBuildingPlayer)
|
||||||
|
{
|
||||||
|
instance = Resources.Load<OVRPlatformToolSettings>("OVRPlatformToolSettings");
|
||||||
|
return instance != null;
|
||||||
|
}
|
||||||
|
// Otherwise create/load the resource instance normally.
|
||||||
|
return Instance != null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static OVRPlatformToolSettings instance;
|
||||||
|
public static OVRPlatformToolSettings Instance
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (instance == null)
|
||||||
|
{
|
||||||
|
instance = Resources.Load<OVRPlatformToolSettings>("OVRPlatformToolSettings");
|
||||||
|
|
||||||
|
if (instance == null)
|
||||||
|
{
|
||||||
|
if (BuildPipeline.isBuildingPlayer)
|
||||||
|
{
|
||||||
|
// UnityEditor.AssetDatabase.CreateAsset is unsafe to call during a build and
|
||||||
|
// may cause a crash.
|
||||||
|
// This should be rare as the asset is created in the static constructor and should
|
||||||
|
// usually exist.
|
||||||
|
throw new UnityEditor.Build.BuildFailedException(
|
||||||
|
"Cannot create OVRPlatformToolSettings asset while building.");
|
||||||
|
}
|
||||||
|
instance = ScriptableObject.CreateInstance<OVRPlatformToolSettings>();
|
||||||
|
|
||||||
|
string properPath = System.IO.Path.Combine(UnityEngine.Application.dataPath, "Resources");
|
||||||
|
if (!System.IO.Directory.Exists(properPath))
|
||||||
|
{
|
||||||
|
UnityEditor.AssetDatabase.CreateFolder("Assets", "Resources");
|
||||||
|
}
|
||||||
|
|
||||||
|
string fullPath = System.IO.Path.Combine(
|
||||||
|
System.IO.Path.Combine("Assets", "Resources"),
|
||||||
|
"OVRPlatformToolSettings.asset"
|
||||||
|
);
|
||||||
|
UnityEditor.AssetDatabase.CreateAsset(instance, fullPath);
|
||||||
|
|
||||||
|
// Initialize cross platform default values for the new instance of OVRPlatformToolSettings here
|
||||||
|
if (instance != null)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < (int)OVRPlatformTool.TargetPlatform.None; i++)
|
||||||
|
{
|
||||||
|
EditorPrefs.SetString("OVRPlatformToolSettings_ReleaseChannel" + i, DEFAULT_RELEASE_CHANNEL);
|
||||||
|
instance.assetConfigs[i] = new AssetConfigList();
|
||||||
|
}
|
||||||
|
|
||||||
|
instance.riftRedistPackages = new List<RedistPackage>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return instance;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
instance = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Wrapper for asset config list so that it can be serialized properly
|
||||||
|
[System.Serializable]
|
||||||
|
public class AssetConfigList
|
||||||
|
{
|
||||||
|
public List<AssetConfig> configList;
|
||||||
|
|
||||||
|
public AssetConfigList()
|
||||||
|
{
|
||||||
|
configList = new List<AssetConfig>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Serializable]
|
||||||
|
public class AssetConfig
|
||||||
|
{
|
||||||
|
public enum AssetType
|
||||||
|
{
|
||||||
|
DEFAULT,
|
||||||
|
STORE,
|
||||||
|
LANGUAGE_PACK,
|
||||||
|
};
|
||||||
|
|
||||||
|
public string name;
|
||||||
|
public bool required;
|
||||||
|
public AssetType type;
|
||||||
|
public string sku;
|
||||||
|
|
||||||
|
private bool foldout;
|
||||||
|
|
||||||
|
public AssetConfig(string assetName)
|
||||||
|
{
|
||||||
|
name = assetName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool GetFoldoutState()
|
||||||
|
{
|
||||||
|
return foldout;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetFoldoutState(bool state)
|
||||||
|
{
|
||||||
|
foldout = state;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[System.Serializable]
|
||||||
|
public class RedistPackage
|
||||||
|
{
|
||||||
|
public bool include = false;
|
||||||
|
public string name;
|
||||||
|
public string id;
|
||||||
|
|
||||||
|
public RedistPackage(string pkgName, string pkgId)
|
||||||
|
{
|
||||||
|
name = pkgName;
|
||||||
|
id = pkgId;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1267
Assets/Oculus/VR/Editor/OVRPluginUpdater.cs
Normal file
1267
Assets/Oculus/VR/Editor/OVRPluginUpdater.cs
Normal file
File diff suppressed because it is too large
Load Diff
40
Assets/Oculus/VR/Editor/OVRPluginUpdaterStub.cs
Normal file
40
Assets/Oculus/VR/Editor/OVRPluginUpdaterStub.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public class OVRPluginUpdaterStub : ScriptableObject
|
||||||
|
{
|
||||||
|
// Stub helper class to locate OVR Utilities Path through Unity Editor API.
|
||||||
|
// Required to be a standalone class in a separate file or else MonoScript.FromScriptableObject() returns an empty string path.
|
||||||
|
|
||||||
|
public static bool IsInsidePackageDistribution()
|
||||||
|
{
|
||||||
|
var so = ScriptableObject.CreateInstance(typeof(OVRPluginUpdaterStub));
|
||||||
|
var script = MonoScript.FromScriptableObject(so);
|
||||||
|
string assetPath = AssetDatabase.GetAssetPath(script);
|
||||||
|
if (assetPath.StartsWith("Packages\\", StringComparison.InvariantCultureIgnoreCase) ||
|
||||||
|
assetPath.StartsWith("Packages/", StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
209
Assets/Oculus/VR/Editor/OVRProjectConfig.cs
Normal file
209
Assets/Oculus/VR/Editor/OVRProjectConfig.cs
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
using UnityEngine.Serialization;
|
||||||
|
|
||||||
|
[System.Serializable]
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
[UnityEditor.InitializeOnLoad]
|
||||||
|
#endif
|
||||||
|
public class OVRProjectConfig : ScriptableObject
|
||||||
|
{
|
||||||
|
public enum DeviceType
|
||||||
|
{
|
||||||
|
//GearVrOrGo = 0, // DEPRECATED
|
||||||
|
Quest = 1,
|
||||||
|
Quest2 = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum HandTrackingSupport
|
||||||
|
{
|
||||||
|
ControllersOnly = 0,
|
||||||
|
ControllersAndHands = 1,
|
||||||
|
HandsOnly = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum HandTrackingFrequency
|
||||||
|
{
|
||||||
|
LOW = 0,
|
||||||
|
HIGH = 1,
|
||||||
|
MAX = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum HandTrackingVersion
|
||||||
|
{
|
||||||
|
Default = 0,
|
||||||
|
V1 = 1,
|
||||||
|
V2 = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum AnchorSupport
|
||||||
|
{
|
||||||
|
Disabled = 0,
|
||||||
|
Enabled = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum RenderModelSupport
|
||||||
|
{
|
||||||
|
Disabled = 0,
|
||||||
|
Enabled = 1,
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TrackedKeyboardSupport
|
||||||
|
{
|
||||||
|
None = 0,
|
||||||
|
Supported = 1,
|
||||||
|
Required = 2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public List<DeviceType> targetDeviceTypes = new List<DeviceType> {DeviceType.Quest, DeviceType.Quest2};
|
||||||
|
public bool allowOptional3DofHeadTracking = false;
|
||||||
|
public HandTrackingSupport handTrackingSupport = HandTrackingSupport.ControllersOnly;
|
||||||
|
public HandTrackingFrequency handTrackingFrequency = HandTrackingFrequency.LOW;
|
||||||
|
public HandTrackingVersion handTrackingVersion = HandTrackingVersion.Default;
|
||||||
|
[FormerlySerializedAs("spatialAnchorsSupport")]
|
||||||
|
public AnchorSupport anchorSupport = AnchorSupport.Disabled;
|
||||||
|
public RenderModelSupport renderModelSupport = RenderModelSupport.Disabled;
|
||||||
|
public TrackedKeyboardSupport trackedKeyboardSupport = TrackedKeyboardSupport.None;
|
||||||
|
|
||||||
|
public bool disableBackups = true;
|
||||||
|
public bool enableNSCConfig = true;
|
||||||
|
public string securityXmlPath;
|
||||||
|
|
||||||
|
public bool skipUnneededShaders = false;
|
||||||
|
|
||||||
|
[System.Obsolete("Focus awareness is now required. The option will be deprecated.", false)]
|
||||||
|
public bool focusAware = true;
|
||||||
|
|
||||||
|
public bool requiresSystemKeyboard = false;
|
||||||
|
public bool experimentalFeaturesEnabled = false;
|
||||||
|
public bool insightPassthroughEnabled = false;
|
||||||
|
public Texture2D systemSplashScreen;
|
||||||
|
|
||||||
|
//public const string OculusProjectConfigAssetPath = "Assets/Oculus/OculusProjectConfig.asset";
|
||||||
|
|
||||||
|
static OVRProjectConfig()
|
||||||
|
{
|
||||||
|
// BuildPipeline.isBuildingPlayer cannot be called in a static constructor
|
||||||
|
// Run Update once to call GetProjectConfig then remove delegate
|
||||||
|
EditorApplication.update += Update;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void Update()
|
||||||
|
{
|
||||||
|
// Initialize the asset if it doesn't exist
|
||||||
|
GetProjectConfig();
|
||||||
|
// Stop running Update
|
||||||
|
EditorApplication.update -= Update;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string GetOculusProjectConfigAssetPath()
|
||||||
|
{
|
||||||
|
var so = ScriptableObject.CreateInstance(typeof(OVRPluginUpdaterStub));
|
||||||
|
var script = MonoScript.FromScriptableObject(so);
|
||||||
|
string assetPath = AssetDatabase.GetAssetPath(script);
|
||||||
|
string editorDir = Directory.GetParent(assetPath).FullName;
|
||||||
|
string ovrDir = Directory.GetParent(editorDir).FullName;
|
||||||
|
string oculusDir = Directory.GetParent(ovrDir).FullName;
|
||||||
|
|
||||||
|
if (OVRPluginUpdaterStub.IsInsidePackageDistribution())
|
||||||
|
{
|
||||||
|
oculusDir = Path.GetFullPath(Path.Combine(Application.dataPath, "Oculus"));
|
||||||
|
if (!Directory.Exists(oculusDir))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(oculusDir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
string configAssetPath = Path.GetFullPath(Path.Combine(oculusDir, "OculusProjectConfig.asset"));
|
||||||
|
Uri configUri = new Uri(configAssetPath);
|
||||||
|
Uri projectUri = new Uri(Application.dataPath);
|
||||||
|
Uri relativeUri = projectUri.MakeRelativeUri(configUri);
|
||||||
|
|
||||||
|
return relativeUri.ToString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static OVRProjectConfig GetProjectConfig()
|
||||||
|
{
|
||||||
|
OVRProjectConfig projectConfig = null;
|
||||||
|
string oculusProjectConfigAssetPath = GetOculusProjectConfigAssetPath();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
projectConfig = AssetDatabase.LoadAssetAtPath(oculusProjectConfigAssetPath, typeof(OVRProjectConfig)) as OVRProjectConfig;
|
||||||
|
}
|
||||||
|
catch (System.Exception e)
|
||||||
|
{
|
||||||
|
Debug.LogWarningFormat("Unable to load ProjectConfig from {0}, error {1}", oculusProjectConfigAssetPath, e.Message);
|
||||||
|
}
|
||||||
|
// Initialize the asset only if a build is not currently running.
|
||||||
|
if (projectConfig == null && !BuildPipeline.isBuildingPlayer)
|
||||||
|
{
|
||||||
|
projectConfig = ScriptableObject.CreateInstance<OVRProjectConfig>();
|
||||||
|
projectConfig.targetDeviceTypes = new List<DeviceType>();
|
||||||
|
projectConfig.targetDeviceTypes.Add(DeviceType.Quest);
|
||||||
|
projectConfig.targetDeviceTypes.Add(DeviceType.Quest2);
|
||||||
|
projectConfig.allowOptional3DofHeadTracking = false;
|
||||||
|
projectConfig.handTrackingSupport = HandTrackingSupport.ControllersOnly;
|
||||||
|
projectConfig.handTrackingFrequency = HandTrackingFrequency.LOW;
|
||||||
|
projectConfig.handTrackingVersion = HandTrackingVersion.Default;
|
||||||
|
projectConfig.anchorSupport = AnchorSupport.Disabled;
|
||||||
|
projectConfig.trackedKeyboardSupport = TrackedKeyboardSupport.None;
|
||||||
|
projectConfig.renderModelSupport = RenderModelSupport.Disabled;
|
||||||
|
projectConfig.disableBackups = true;
|
||||||
|
projectConfig.enableNSCConfig = true;
|
||||||
|
projectConfig.skipUnneededShaders = false;
|
||||||
|
projectConfig.requiresSystemKeyboard = false;
|
||||||
|
projectConfig.experimentalFeaturesEnabled = false;
|
||||||
|
projectConfig.insightPassthroughEnabled = false;
|
||||||
|
AssetDatabase.CreateAsset(projectConfig, oculusProjectConfigAssetPath);
|
||||||
|
}
|
||||||
|
// Force migration to Quest device if still on legacy GearVR/Go device type
|
||||||
|
if (projectConfig.targetDeviceTypes.Contains((DeviceType)0)) // deprecated GearVR/Go device
|
||||||
|
{
|
||||||
|
projectConfig.targetDeviceTypes.Remove((DeviceType)0); // deprecated GearVR/Go device
|
||||||
|
if (!projectConfig.targetDeviceTypes.Contains(DeviceType.Quest))
|
||||||
|
{
|
||||||
|
projectConfig.targetDeviceTypes.Add(DeviceType.Quest);
|
||||||
|
}
|
||||||
|
if (!projectConfig.targetDeviceTypes.Contains(DeviceType.Quest2))
|
||||||
|
{
|
||||||
|
projectConfig.targetDeviceTypes.Add(DeviceType.Quest2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return projectConfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void CommitProjectConfig(OVRProjectConfig projectConfig)
|
||||||
|
{
|
||||||
|
string oculusProjectConfigAssetPath = GetOculusProjectConfigAssetPath();
|
||||||
|
if (AssetDatabase.GetAssetPath(projectConfig) != oculusProjectConfigAssetPath)
|
||||||
|
{
|
||||||
|
Debug.LogWarningFormat("The asset path of ProjectConfig is wrong. Expect {0}, get {1}", oculusProjectConfigAssetPath, AssetDatabase.GetAssetPath(projectConfig));
|
||||||
|
}
|
||||||
|
EditorUtility.SetDirty(projectConfig);
|
||||||
|
}
|
||||||
|
}
|
215
Assets/Oculus/VR/Editor/OVRScreenshotWizard.cs
Normal file
215
Assets/Oculus/VR/Editor/OVRScreenshotWizard.cs
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// From the selected transform, takes a cubemap screenshot that can be submitted with the application
|
||||||
|
/// as a screenshot (or additionally used for reflection shaders).
|
||||||
|
/// </summary>
|
||||||
|
class OVRScreenshotWizard : ScriptableWizard
|
||||||
|
{
|
||||||
|
public enum TexFormat
|
||||||
|
{
|
||||||
|
JPEG, // 512kb at 1k x 1k resolution vs
|
||||||
|
PNG, // 5.3mb
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum SaveMode {
|
||||||
|
SaveCubemapScreenshot,
|
||||||
|
SaveUnityCubemap,
|
||||||
|
SaveBoth,
|
||||||
|
}
|
||||||
|
|
||||||
|
public GameObject renderFrom = null;
|
||||||
|
public int size = 2048;
|
||||||
|
public SaveMode saveMode = SaveMode.SaveUnityCubemap;
|
||||||
|
public string cubeMapFolder = "Assets/Textures/Cubemaps";
|
||||||
|
public TexFormat textureFormat = TexFormat.PNG;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Validates the user's input
|
||||||
|
/// </summary>
|
||||||
|
void OnWizardUpdate()
|
||||||
|
{
|
||||||
|
helpString = "Select a game object positioned in the place where\nyou want to render the cubemap screenshot from: ";
|
||||||
|
isValid = (renderFrom != null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Create the asset path if it is not available.
|
||||||
|
/// Assuming the newFolderPath is stated with "Assets", which is a requirement.
|
||||||
|
/// </summary>
|
||||||
|
static bool CreateAssetPath( string newFolderPath )
|
||||||
|
{
|
||||||
|
const int maxFoldersCount = 32;
|
||||||
|
string currentPath;
|
||||||
|
string[] pathFolders;
|
||||||
|
|
||||||
|
pathFolders = newFolderPath.Split (new char[]{ '/' }, maxFoldersCount);
|
||||||
|
|
||||||
|
if (!string.Equals ("Assets", pathFolders [0], System.StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
Debug.LogError( "Folder path has to be started with \" Assets \" " );
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
currentPath = "Assets";
|
||||||
|
for (int i = 1; i < pathFolders.Length; i++)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(pathFolders[i]))
|
||||||
|
{
|
||||||
|
string newPath = currentPath + "/" + pathFolders[i];
|
||||||
|
if (!AssetDatabase.IsValidFolder(newPath))
|
||||||
|
AssetDatabase.CreateFolder(currentPath, pathFolders[i]);
|
||||||
|
currentPath = newPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Debug.Log( "Created path: " + currentPath );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Renders the cubemap
|
||||||
|
/// </summary>
|
||||||
|
void OnWizardCreate()
|
||||||
|
{
|
||||||
|
if ( !AssetDatabase.IsValidFolder( cubeMapFolder ) )
|
||||||
|
{
|
||||||
|
if (!CreateAssetPath(cubeMapFolder))
|
||||||
|
{
|
||||||
|
Debug.LogError( "Created path failed: " + cubeMapFolder );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool existingCamera = true;
|
||||||
|
bool existingCameraStateSave = true;
|
||||||
|
Camera camera = renderFrom.GetComponent<Camera>();
|
||||||
|
if (camera == null)
|
||||||
|
{
|
||||||
|
camera = renderFrom.AddComponent<Camera>();
|
||||||
|
camera.farClipPlane = 10000f;
|
||||||
|
existingCamera = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
existingCameraStateSave = camera.enabled;
|
||||||
|
camera.enabled = true;
|
||||||
|
}
|
||||||
|
// find the last screenshot saved
|
||||||
|
if (cubeMapFolder[cubeMapFolder.Length-1] != '/')
|
||||||
|
{
|
||||||
|
cubeMapFolder += "/";
|
||||||
|
}
|
||||||
|
int idx = 0;
|
||||||
|
string[] fileNames = Directory.GetFiles(cubeMapFolder);
|
||||||
|
foreach(string fileName in fileNames)
|
||||||
|
{
|
||||||
|
if (!fileName.ToLower().EndsWith(".cubemap"))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
string temp = fileName.Replace(cubeMapFolder + "vr_screenshot_", string.Empty);
|
||||||
|
temp = temp.Replace(".cubemap", string.Empty);
|
||||||
|
int tempIdx = 0;
|
||||||
|
if (int.TryParse( temp, out tempIdx ))
|
||||||
|
{
|
||||||
|
if (tempIdx > idx)
|
||||||
|
{
|
||||||
|
idx = tempIdx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
string pathName = string.Format("{0}vr_screenshot_{1}.cubemap", cubeMapFolder, (++idx).ToString("d2"));
|
||||||
|
Cubemap cubemap = new Cubemap(size, TextureFormat.RGB24, false);
|
||||||
|
|
||||||
|
// render into cubemap
|
||||||
|
if ((camera != null) && (cubemap != null))
|
||||||
|
{
|
||||||
|
// set up cubemap defaults
|
||||||
|
OVRCubemapCapture.RenderIntoCubemap(camera, cubemap);
|
||||||
|
if (existingCamera)
|
||||||
|
{
|
||||||
|
camera.enabled = existingCameraStateSave;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DestroyImmediate(camera);
|
||||||
|
}
|
||||||
|
// generate a regular texture as well?
|
||||||
|
if ( ( saveMode == SaveMode.SaveCubemapScreenshot ) || ( saveMode == SaveMode.SaveBoth ) )
|
||||||
|
{
|
||||||
|
GenerateTexture(cubemap, pathName);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ( saveMode == SaveMode.SaveUnityCubemap ) || ( saveMode == SaveMode.SaveBoth ) )
|
||||||
|
{
|
||||||
|
Debug.Log( "Saving: " + pathName );
|
||||||
|
// by default the unity cubemap isn't saved
|
||||||
|
AssetDatabase.CreateAsset( cubemap, pathName );
|
||||||
|
// reimport as necessary
|
||||||
|
AssetDatabase.SaveAssets();
|
||||||
|
// select it in the project tree so developers can find it
|
||||||
|
EditorGUIUtility.PingObject( cubemap );
|
||||||
|
Selection.activeObject = cubemap;
|
||||||
|
}
|
||||||
|
AssetDatabase.Refresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Generates a NPOT 6x1 cubemap in the following format PX NX PY NY PZ NZ
|
||||||
|
/// </summary>
|
||||||
|
void GenerateTexture(Cubemap cubemap, string pathName)
|
||||||
|
{
|
||||||
|
// Encode the texture and save it to disk
|
||||||
|
pathName = pathName.Replace(".cubemap", (textureFormat == TexFormat.PNG) ? ".png" : ".jpg" ).ToLower();
|
||||||
|
pathName = pathName.Replace( cubeMapFolder.ToLower(), "" );
|
||||||
|
string format = textureFormat.ToString();
|
||||||
|
string fullPath = EditorUtility.SaveFilePanel( string.Format( "Save Cubemap Screenshot as {0}", format ), "", pathName, format.ToLower() );
|
||||||
|
if ( !string.IsNullOrEmpty( fullPath ) )
|
||||||
|
{
|
||||||
|
Debug.Log( "Saving: " + fullPath );
|
||||||
|
OVRCubemapCapture.SaveCubemapCapture(cubemap, fullPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Unity Editor menu option to take a screenshot
|
||||||
|
/// </summary>
|
||||||
|
[MenuItem("Oculus/Tools/OVR Screenshot Wizard", false, 100000)]
|
||||||
|
static void TakeOVRScreenshot()
|
||||||
|
{
|
||||||
|
OVRScreenshotWizard wizard = ScriptableWizard.DisplayWizard<OVRScreenshotWizard>("OVR Screenshot Wizard", "Render Cubemap");
|
||||||
|
if (wizard != null)
|
||||||
|
{
|
||||||
|
if (Selection.activeGameObject != null)
|
||||||
|
wizard.renderFrom = Selection.activeGameObject;
|
||||||
|
else
|
||||||
|
wizard.renderFrom = Camera.main.gameObject;
|
||||||
|
|
||||||
|
wizard.isValid = (wizard.renderFrom != null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
74
Assets/Oculus/VR/Editor/OVRShaderBuildProcessor.cs
Normal file
74
Assets/Oculus/VR/Editor/OVRShaderBuildProcessor.cs
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEditor;
|
||||||
|
using UnityEditor.Build;
|
||||||
|
using UnityEditor.Rendering;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Rendering;
|
||||||
|
|
||||||
|
public class OVRShaderBuildProcessor : IPreprocessShaders
|
||||||
|
{
|
||||||
|
public int callbackOrder { get { return 0; } }
|
||||||
|
|
||||||
|
public void OnProcessShader(
|
||||||
|
Shader shader, ShaderSnippetData snippet, IList<ShaderCompilerData> shaderCompilerData)
|
||||||
|
{
|
||||||
|
var projectConfig = OVRProjectConfig.GetProjectConfig();
|
||||||
|
if (projectConfig == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!projectConfig.skipUnneededShaders)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (EditorUserBuildSettings.activeBuildTarget != BuildTarget.Android)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var strippedGraphicsTiers = new HashSet<GraphicsTier>();
|
||||||
|
|
||||||
|
// Unity only uses shader Tier2 on Quest and Go (regardless of graphics API)
|
||||||
|
if (projectConfig.targetDeviceTypes.Contains(OVRProjectConfig.DeviceType.Quest) ||
|
||||||
|
projectConfig.targetDeviceTypes.Contains(OVRProjectConfig.DeviceType.Quest2))
|
||||||
|
{
|
||||||
|
strippedGraphicsTiers.Add(GraphicsTier.Tier1);
|
||||||
|
strippedGraphicsTiers.Add(GraphicsTier.Tier3);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strippedGraphicsTiers.Count == 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = shaderCompilerData.Count - 1; i >= 0; --i)
|
||||||
|
{
|
||||||
|
if (strippedGraphicsTiers.Contains(shaderCompilerData[i].graphicsTier))
|
||||||
|
{
|
||||||
|
shaderCompilerData.RemoveAt(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
735
Assets/Oculus/VR/Editor/OVRSystemProfilerPanel.cs
Normal file
735
Assets/Oculus/VR/Editor/OVRSystemProfilerPanel.cs
Normal file
@ -0,0 +1,735 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System;
|
||||||
|
using System.Reflection;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEditor;
|
||||||
|
using System.Text;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
public class OVRSystemProfilerPanel : EditorWindow {
|
||||||
|
[MenuItem("Oculus/Tools/(Deprecated) Oculus Profiler Panel", false, 200000)]
|
||||||
|
public static void ShowWindow()
|
||||||
|
{
|
||||||
|
EditorWindow.GetWindow(typeof(OVRSystemProfilerPanel), false, "Oculus Profiler");
|
||||||
|
OVRPlugin.SendEvent("oculus_profiler_panel", "show_window");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool showAndroidOptions = false;
|
||||||
|
OVRNetwork.OVRNetworkTcpClient tcpClient = new OVRNetwork.OVRNetworkTcpClient();
|
||||||
|
int remoteListeningPort = OVRSystemPerfMetrics.TcpListeningPort;
|
||||||
|
|
||||||
|
//OVRSystemPerfMetrics.PerfMetrics lastReceivedMetrics;
|
||||||
|
|
||||||
|
const int maxMetricsFrames = 120;
|
||||||
|
const float metricsHistoryDuration = 1.0f;
|
||||||
|
|
||||||
|
List<OVRSystemPerfMetrics.PerfMetrics> receivedMetricsList = new List<OVRSystemPerfMetrics.PerfMetrics>();
|
||||||
|
bool pauseReceiveMetrics = false;
|
||||||
|
bool repaintRequested = false;
|
||||||
|
|
||||||
|
const float labelWidth = 140.0f;
|
||||||
|
const float panelInnerRightPad = 6.0f;
|
||||||
|
const float progressBarPad = 5.0f;
|
||||||
|
const float progressBarHeight = 18.0f;
|
||||||
|
|
||||||
|
string androidSdkRootPath;
|
||||||
|
OVRADBTool adbTool;
|
||||||
|
|
||||||
|
private static GUIStyle odhCalloutBackgroundStyle;
|
||||||
|
private static GUIStyle odhCalloutTextStyle;
|
||||||
|
|
||||||
|
// The actual window code goes here
|
||||||
|
void OnGUI()
|
||||||
|
{
|
||||||
|
if (odhCalloutBackgroundStyle == null)
|
||||||
|
{
|
||||||
|
odhCalloutBackgroundStyle = new GUIStyle(EditorStyles.helpBox);
|
||||||
|
var odhCalloutBackgroundStyleTex = new Texture2D(1, 1);
|
||||||
|
odhCalloutBackgroundStyleTex.SetPixel(0, 0, new Color(0.9f, 0.8f, 0.2f, 0.2f));
|
||||||
|
odhCalloutBackgroundStyleTex.Apply();
|
||||||
|
odhCalloutBackgroundStyle.normal.background = odhCalloutBackgroundStyleTex;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (odhCalloutTextStyle == null)
|
||||||
|
{
|
||||||
|
odhCalloutTextStyle = new GUIStyle(EditorStyles.label);
|
||||||
|
odhCalloutTextStyle.richText = true;
|
||||||
|
odhCalloutTextStyle.wordWrap = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ODH Callout Section
|
||||||
|
GUILayout.BeginHorizontal(odhCalloutBackgroundStyle);
|
||||||
|
var script = MonoScript.FromScriptableObject(this);
|
||||||
|
string assetPath = AssetDatabase.GetAssetPath(script);
|
||||||
|
string editorPath = Path.GetDirectoryName(assetPath);
|
||||||
|
string odhIconPath = Path.Combine(editorPath, "Textures\\odh_icon.png");
|
||||||
|
Texture ODHIcon = (Texture)EditorGUIUtility.Load(odhIconPath);
|
||||||
|
GUILayout.Box(ODHIcon, GUILayout.Width(60.0f), GUILayout.Height(60.0f));
|
||||||
|
|
||||||
|
GUILayout.BeginVertical();
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("<b>This tool is deprecated.</b> Oculus recommends profiling builds through the Metrics section of "
|
||||||
|
+ "<b>Oculus Developer Hub</b>, a desktop companion tool that streamlines the Quest development workflow.",
|
||||||
|
odhCalloutTextStyle);
|
||||||
|
GUIContent ODHLabel = new GUIContent("Download Oculus Developer Hub");
|
||||||
|
#if UNITY_2021_1_OR_NEWER
|
||||||
|
if (EditorGUILayout.LinkButton(ODHLabel))
|
||||||
|
#else
|
||||||
|
if (GUILayout.Button(ODHLabel, GUILayout.ExpandWidth(false)))
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR_WIN
|
||||||
|
Application.OpenURL("https://developer.oculus.com/downloads/package/oculus-developer-hub-win/?source=unity");
|
||||||
|
#elif UNITY_EDITOR_OSX
|
||||||
|
Application.OpenURL("https://developer.oculus.com/downloads/package/oculus-developer-hub-mac/?source=unity");
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
GUILayout.EndVertical();
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
GUILayout.Space(15.0f);
|
||||||
|
|
||||||
|
showAndroidOptions = EditorGUILayout.Foldout(showAndroidOptions, "Android Tools");
|
||||||
|
|
||||||
|
if (showAndroidOptions)
|
||||||
|
{
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.LabelField("Android SDK root path: ", androidSdkRootPath);
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
if (GUILayout.Button("Start Server"))
|
||||||
|
{
|
||||||
|
if (adbTool == null)
|
||||||
|
{
|
||||||
|
adbTool = new OVRADBTool(androidSdkRootPath);
|
||||||
|
}
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
int exitCode = adbTool.StartServer(null);
|
||||||
|
EditorUtility.DisplayDialog("ADB StartServer", (exitCode == 0 ? "Success" : "Failure. ExitCode = " + exitCode.ToString()), "Ok");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Can't locate ADBTool", adbTool.adbPath, "Ok");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (GUILayout.Button("Kill Server"))
|
||||||
|
{
|
||||||
|
if (adbTool == null)
|
||||||
|
{
|
||||||
|
adbTool = new OVRADBTool(androidSdkRootPath);
|
||||||
|
}
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
int exitCode = adbTool.KillServer(null);
|
||||||
|
EditorUtility.DisplayDialog("ADB KillServer", (exitCode == 0 ? "Success" : "Failure. ExitCode = " + exitCode.ToString()), "Ok");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Can't locate ADBTool", adbTool.adbPath, "Ok");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (GUILayout.Button("Forward Port"))
|
||||||
|
{
|
||||||
|
if (adbTool == null)
|
||||||
|
{
|
||||||
|
adbTool = new OVRADBTool(androidSdkRootPath);
|
||||||
|
}
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
int exitCode = adbTool.ForwardPort(remoteListeningPort, null);
|
||||||
|
EditorUtility.DisplayDialog("ADB ForwardPort", (exitCode == 0 ? "Success" : "Failure. ExitCode = " + exitCode.ToString()), "Ok");
|
||||||
|
OVRPlugin.SendEvent("device_metrics_profiler", (exitCode == 0 ? "adb_forward_success" : "adb_forward_failure"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Can't locate ADBTool", adbTool.adbPath, "Ok");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (GUILayout.Button("Release Port"))
|
||||||
|
{
|
||||||
|
if (adbTool == null)
|
||||||
|
{
|
||||||
|
adbTool = new OVRADBTool(androidSdkRootPath);
|
||||||
|
}
|
||||||
|
if (adbTool.isReady)
|
||||||
|
{
|
||||||
|
int exitCode = adbTool.ReleasePort(remoteListeningPort, null);
|
||||||
|
EditorUtility.DisplayDialog("ADB ReleasePort", (exitCode == 0 ? "Success" : "Failure. ExitCode = " + exitCode.ToString()), "Ok");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
EditorUtility.DisplayDialog("Can't locate ADBTool", adbTool.adbPath, "Ok");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||||
|
|
||||||
|
GUILayout.BeginHorizontal();
|
||||||
|
remoteListeningPort = EditorGUILayout.DelayedIntField("Remote Port", remoteListeningPort);
|
||||||
|
|
||||||
|
if (tcpClient.connectionState == OVRNetwork.OVRNetworkTcpClient.ConnectionState.Disconnected)
|
||||||
|
{
|
||||||
|
if (GUILayout.Button("Connect"))
|
||||||
|
{
|
||||||
|
ConnectPerfMetricsTcpServer();
|
||||||
|
pauseReceiveMetrics = false;
|
||||||
|
OVRPlugin.SendEvent("device_metrics_profiler", "connect");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (tcpClient.connectionState == OVRNetwork.OVRNetworkTcpClient.ConnectionState.Connecting)
|
||||||
|
{
|
||||||
|
if (GUILayout.Button("Connecting ... Click again to Cancel"))
|
||||||
|
{
|
||||||
|
DisconnectPerfMetricsTcpServer();
|
||||||
|
OVRPlugin.SendEvent("device_metrics_profiler", "cancel");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (GUILayout.Button("Disconnect"))
|
||||||
|
{
|
||||||
|
DisconnectPerfMetricsTcpServer();
|
||||||
|
OVRPlugin.SendEvent("device_metrics_profiler", "disconnect");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GUILayout.Button(pauseReceiveMetrics ? "Continue" : "Pause"))
|
||||||
|
{
|
||||||
|
pauseReceiveMetrics = !pauseReceiveMetrics;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
GUILayout.EndHorizontal();
|
||||||
|
|
||||||
|
EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
|
||||||
|
|
||||||
|
lock (receivedMetricsList)
|
||||||
|
{
|
||||||
|
PresentIntProperty("Frame Count", "frameCount");
|
||||||
|
PresentIntProperty("Dropped Frame Count", "compositorDroppedFrameCount");
|
||||||
|
|
||||||
|
float? avgFrameTime = GetAveragePerfValueFloat("deltaFrameTime");
|
||||||
|
if (avgFrameTime.HasValue)
|
||||||
|
{
|
||||||
|
float fps = 1.0f / avgFrameTime.Value;
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.LabelField("FPS", GUILayout.Width(labelWidth));
|
||||||
|
EditorGUILayout.LabelField(string.Format("{0:F1}", fps));
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
|
int? deviceCpuClockLevel = GetLatestPerfValueInt("deviceCpuClockLevel");
|
||||||
|
int? deviceGpuClockLevel = GetLatestPerfValueInt("deviceGpuClockLevel");
|
||||||
|
float? deviceCpuClockFrequencyInMHz = GetLatestPerfValueFloat("deviceCpuClockFrequencyInMHz");
|
||||||
|
float? deviceGpuClockFrequencyInMHz = GetLatestPerfValueFloat("deviceGpuClockFrequencyInMHz");
|
||||||
|
|
||||||
|
if (deviceCpuClockLevel.HasValue || deviceCpuClockFrequencyInMHz.HasValue)
|
||||||
|
{
|
||||||
|
string cpuLabel;
|
||||||
|
string cpuText;
|
||||||
|
if (deviceCpuClockLevel.HasValue && deviceCpuClockFrequencyInMHz.HasValue)
|
||||||
|
{
|
||||||
|
cpuLabel = "CPU Level (Freq)";
|
||||||
|
cpuText = string.Format("{0} ({1:F0} MHz)", deviceCpuClockLevel, deviceCpuClockFrequencyInMHz);
|
||||||
|
}
|
||||||
|
else if (deviceCpuClockLevel.HasValue)
|
||||||
|
{
|
||||||
|
cpuLabel = "CPU Level";
|
||||||
|
cpuText = string.Format("{0}", deviceCpuClockLevel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cpuLabel = "CPU Frequency";
|
||||||
|
cpuText = string.Format("{0:F0} MHz", deviceCpuClockFrequencyInMHz);
|
||||||
|
}
|
||||||
|
PresentText(cpuLabel, cpuText);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (deviceGpuClockLevel.HasValue || deviceGpuClockFrequencyInMHz.HasValue)
|
||||||
|
{
|
||||||
|
string cpuLabel;
|
||||||
|
string cpuText;
|
||||||
|
if (deviceGpuClockLevel.HasValue && deviceGpuClockFrequencyInMHz.HasValue)
|
||||||
|
{
|
||||||
|
cpuLabel = "GPU Level (Freq)";
|
||||||
|
cpuText = string.Format("{0} ({1:F0} MHz)", deviceGpuClockLevel, deviceGpuClockFrequencyInMHz);
|
||||||
|
}
|
||||||
|
else if (deviceGpuClockLevel.HasValue)
|
||||||
|
{
|
||||||
|
cpuLabel = "GPU Level";
|
||||||
|
cpuText = string.Format("{0}", deviceGpuClockLevel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cpuLabel = "GPU Frequency";
|
||||||
|
cpuText = string.Format("{0:F0} MHz", deviceGpuClockFrequencyInMHz);
|
||||||
|
}
|
||||||
|
PresentText(cpuLabel, cpuText);
|
||||||
|
}
|
||||||
|
|
||||||
|
PresentColumnTitles("Current", "Average", "Peak");
|
||||||
|
|
||||||
|
PresentFloatTimeInMs("Frame Time", "deltaFrameTime", 0.020f, true, true);
|
||||||
|
PresentFloatTimeInMs("App CPU Time", "appCpuTime", 0.020f, true, true);
|
||||||
|
PresentFloatTimeInMs("App GPU Time", "appGpuTime", 0.020f, true, true);
|
||||||
|
PresentFloatTimeInMs("Compositor CPU Time", "compositorCpuTime", 0.020f, true, true);
|
||||||
|
PresentFloatTimeInMs("Compositor GPU Time", "compositorGpuTime", 0.020f, true, true);
|
||||||
|
PresentFloatPercentage("CPU Util (Average)", "systemCpuUtilAveragePercentage", false, false);
|
||||||
|
PresentFloatPercentage("CPU Util (Worst Core)", "systemCpuUtilWorstPercentage", false, false);
|
||||||
|
PresentFloatPercentage("GPU Util", "systemGpuUtilPercentage", false, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetMetricsField(string propertyName, out FieldInfo baseFieldInfo, out FieldInfo validalityFieldInfo)
|
||||||
|
{
|
||||||
|
baseFieldInfo = typeof(OVRSystemPerfMetrics.PerfMetrics).GetField(propertyName);
|
||||||
|
validalityFieldInfo = typeof(OVRSystemPerfMetrics.PerfMetrics).GetField(propertyName + "_IsValid");
|
||||||
|
}
|
||||||
|
|
||||||
|
bool HasValidPerfMetrics(string propertyName)
|
||||||
|
{
|
||||||
|
FieldInfo baseFieldInfo, validalityFieldInfo;
|
||||||
|
GetMetricsField(propertyName, out baseFieldInfo, out validalityFieldInfo);
|
||||||
|
|
||||||
|
if (baseFieldInfo == null || (validalityFieldInfo != null && validalityFieldInfo.FieldType != typeof(bool)))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("[OVRSystemProfilerPanel] Unable to find property " + propertyName);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (validalityFieldInfo == null)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = receivedMetricsList.Count - 1; i >= 0; --i)
|
||||||
|
{
|
||||||
|
var metrics = receivedMetricsList[i];
|
||||||
|
if (validalityFieldInfo != null && (bool)validalityFieldInfo.GetValue(metrics))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int? GetLatestPerfValueInt(string propertyName)
|
||||||
|
{
|
||||||
|
FieldInfo baseFieldInfo, validalityFieldInfo;
|
||||||
|
GetMetricsField(propertyName, out baseFieldInfo, out validalityFieldInfo);
|
||||||
|
|
||||||
|
if (baseFieldInfo == null || baseFieldInfo.FieldType != typeof(int) ||
|
||||||
|
(validalityFieldInfo != null && validalityFieldInfo.FieldType != typeof(bool)))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("[OVRSystemProfilerPanel] GetLatestPerfValueInt(): Type mismatch");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (receivedMetricsList.Count == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = receivedMetricsList.Count - 1; i >= 0; --i)
|
||||||
|
{
|
||||||
|
var metrics = receivedMetricsList[i];
|
||||||
|
if (validalityFieldInfo == null || (validalityFieldInfo != null && (bool)validalityFieldInfo.GetValue(metrics)))
|
||||||
|
{
|
||||||
|
return (int)baseFieldInfo.GetValue(metrics);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
float? GetLatestPerfValueFloat(string propertyName)
|
||||||
|
{
|
||||||
|
FieldInfo baseFieldInfo, validalityFieldInfo;
|
||||||
|
GetMetricsField(propertyName, out baseFieldInfo, out validalityFieldInfo);
|
||||||
|
|
||||||
|
if (baseFieldInfo == null || baseFieldInfo.FieldType != typeof(float) ||
|
||||||
|
(validalityFieldInfo != null && validalityFieldInfo.FieldType != typeof(bool)))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("[OVRSystemProfilerPanel] GetLatestPerfValueFloat(): Type mismatch");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (receivedMetricsList.Count == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = receivedMetricsList.Count - 1; i >= 0; --i)
|
||||||
|
{
|
||||||
|
var metrics = receivedMetricsList[i];
|
||||||
|
if (validalityFieldInfo == null || (validalityFieldInfo != null && (bool)validalityFieldInfo.GetValue(metrics)))
|
||||||
|
{
|
||||||
|
return (float)baseFieldInfo.GetValue(metrics);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
float? GetAveragePerfValueFloat(string propertyName)
|
||||||
|
{
|
||||||
|
FieldInfo baseFieldInfo, validalityFieldInfo;
|
||||||
|
GetMetricsField(propertyName, out baseFieldInfo, out validalityFieldInfo);
|
||||||
|
|
||||||
|
if (baseFieldInfo == null || baseFieldInfo.FieldType != typeof(float) ||
|
||||||
|
(validalityFieldInfo != null && validalityFieldInfo.FieldType != typeof(bool)))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("[OVRSystemProfilerPanel] GetAveragePerfValueFloat(): Type mismatch");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
int count = 0;
|
||||||
|
float sum = 0;
|
||||||
|
|
||||||
|
OVRSystemPerfMetrics.PerfMetrics lastMetrics = null;
|
||||||
|
int metricsIndex;
|
||||||
|
for (metricsIndex = receivedMetricsList.Count - 1; metricsIndex >= 0; --metricsIndex)
|
||||||
|
{
|
||||||
|
var metrics = receivedMetricsList[metricsIndex];
|
||||||
|
if (validalityFieldInfo != null && !(bool)validalityFieldInfo.GetValue(metrics))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
lastMetrics = metrics;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastMetrics == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (; metricsIndex >=0; -- metricsIndex)
|
||||||
|
{
|
||||||
|
var metrics = receivedMetricsList[metricsIndex];
|
||||||
|
if (metrics.frameTime < lastMetrics.frameTime - metricsHistoryDuration)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (validalityFieldInfo != null && !(bool)validalityFieldInfo.GetValue(metrics))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
sum += (float)baseFieldInfo.GetValue(metrics);
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return sum / count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
float? GetMaxPerfValueFloat(string propertyName)
|
||||||
|
{
|
||||||
|
FieldInfo baseFieldInfo, validalityFieldInfo;
|
||||||
|
GetMetricsField(propertyName, out baseFieldInfo, out validalityFieldInfo);
|
||||||
|
|
||||||
|
if (baseFieldInfo == null || baseFieldInfo.FieldType != typeof(float) ||
|
||||||
|
(validalityFieldInfo != null && validalityFieldInfo.FieldType != typeof(bool)))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("[OVRSystemProfilerPanel] GetMaxPerfValueFloat(): Type mismatch");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
OVRSystemPerfMetrics.PerfMetrics lastMetrics = null;
|
||||||
|
int metricsIndex;
|
||||||
|
for (metricsIndex = receivedMetricsList.Count - 1; metricsIndex >= 0; --metricsIndex)
|
||||||
|
{
|
||||||
|
var metrics = receivedMetricsList[metricsIndex];
|
||||||
|
if (validalityFieldInfo != null && !(bool)validalityFieldInfo.GetValue(metrics))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
lastMetrics = metrics;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lastMetrics == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
float? result = null;
|
||||||
|
|
||||||
|
for (; metricsIndex >= 0; --metricsIndex)
|
||||||
|
{
|
||||||
|
var metrics = receivedMetricsList[metricsIndex];
|
||||||
|
if (metrics.frameTime < lastMetrics.frameTime - metricsHistoryDuration)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (validalityFieldInfo != null && !(bool)validalityFieldInfo.GetValue(metrics))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float value = (float)baseFieldInfo.GetValue(metrics);
|
||||||
|
if (!result.HasValue || result.Value < value)
|
||||||
|
{
|
||||||
|
result = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
void PresentFloatPercentage(string label, string propertyName, bool displayAverage, bool displayMaximum)
|
||||||
|
{
|
||||||
|
float? lastValue = GetLatestPerfValueFloat(propertyName);
|
||||||
|
if (!lastValue.HasValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.LabelField(label, GUILayout.Width(labelWidth));
|
||||||
|
|
||||||
|
Rect r = EditorGUILayout.BeginVertical();
|
||||||
|
|
||||||
|
float barWidth = (r.width - panelInnerRightPad - progressBarPad * 2) / 3.0f;
|
||||||
|
EditorGUI.ProgressBar(new Rect(r.x, r.y, barWidth, r.height), lastValue.Value, string.Format("{0:F1}%", lastValue.Value * 100.0f));
|
||||||
|
|
||||||
|
if (displayAverage)
|
||||||
|
{
|
||||||
|
float? averageValue = GetAveragePerfValueFloat(propertyName);
|
||||||
|
if (averageValue.HasValue)
|
||||||
|
{
|
||||||
|
EditorGUI.ProgressBar(new Rect(r.x + barWidth + progressBarPad, r.y, barWidth, r.height), averageValue.Value, string.Format("{0:F1}%", averageValue.Value * 100.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (displayMaximum)
|
||||||
|
{
|
||||||
|
float? maxValue = GetMaxPerfValueFloat(propertyName);
|
||||||
|
if (maxValue.HasValue)
|
||||||
|
{
|
||||||
|
EditorGUI.ProgressBar(new Rect(r.x + (barWidth + progressBarPad) * 2, r.y, barWidth, r.height), maxValue.Value, string.Format("{0:F1}%", maxValue.Value * 100.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GUILayout.Space(progressBarHeight);
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PresentFloatTimeInMs(string label, string propertyName, float maxScale, bool displayAverage, bool displayMaximum)
|
||||||
|
{
|
||||||
|
float? lastValue = GetLatestPerfValueFloat(propertyName);
|
||||||
|
if (!lastValue.HasValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.LabelField(label, GUILayout.Width(labelWidth));
|
||||||
|
|
||||||
|
Rect r = EditorGUILayout.BeginVertical();
|
||||||
|
|
||||||
|
float barWidth = (r.width - panelInnerRightPad - progressBarPad * 2) / 3.0f;
|
||||||
|
EditorGUI.ProgressBar(new Rect(r.x, r.y, barWidth, r.height), lastValue.Value/maxScale, string.Format("{0:F1} ms", lastValue.Value * 1000.0f));
|
||||||
|
|
||||||
|
if (displayAverage)
|
||||||
|
{
|
||||||
|
float? averageValue = GetAveragePerfValueFloat(propertyName);
|
||||||
|
if (averageValue.HasValue)
|
||||||
|
{
|
||||||
|
EditorGUI.ProgressBar(new Rect(r.x + barWidth + progressBarPad, r.y, barWidth, r.height), averageValue.Value / maxScale, string.Format("{0:F1} ms", averageValue.Value * 1000.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (displayMaximum)
|
||||||
|
{
|
||||||
|
float? maxValue = GetMaxPerfValueFloat(propertyName);
|
||||||
|
if (maxValue.HasValue)
|
||||||
|
{
|
||||||
|
EditorGUI.ProgressBar(new Rect(r.x + (barWidth + progressBarPad) * 2, r.y, barWidth, r.height), maxValue.Value / maxScale, string.Format("{0:F1} ms", maxValue.Value * 1000.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
GUILayout.Space(progressBarHeight);
|
||||||
|
|
||||||
|
EditorGUILayout.EndVertical();
|
||||||
|
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PresentIntProperty(string label, string propertyName)
|
||||||
|
{
|
||||||
|
int? lastValue = GetLatestPerfValueInt(propertyName);
|
||||||
|
if (!lastValue.HasValue)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
PresentText(label, lastValue.Value.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
void PresentText(string label, string text)
|
||||||
|
{
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.LabelField(label, GUILayout.Width(labelWidth));
|
||||||
|
EditorGUILayout.LabelField(text);
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
|
void PresentColumnTitles(string title0, string title1, string title2)
|
||||||
|
{
|
||||||
|
EditorGUILayout.BeginHorizontal();
|
||||||
|
EditorGUILayout.LabelField("", GUILayout.Width(labelWidth));
|
||||||
|
|
||||||
|
float windowWidth = position.width;
|
||||||
|
float barWidth = (windowWidth - labelWidth - panelInnerRightPad * 3 ) / 3.0f;
|
||||||
|
EditorGUILayout.LabelField(title0, GUILayout.Width(barWidth));
|
||||||
|
EditorGUILayout.LabelField(title1, GUILayout.Width(barWidth));
|
||||||
|
EditorGUILayout.LabelField(title2, GUILayout.Width(barWidth));
|
||||||
|
|
||||||
|
EditorGUILayout.EndHorizontal();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called as the new window is opened.
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
InitializeAndroidSdkPath();
|
||||||
|
minSize = new Vector2(400, 300);
|
||||||
|
}
|
||||||
|
|
||||||
|
void InitializeAndroidSdkPath()
|
||||||
|
{
|
||||||
|
androidSdkRootPath = OVRConfig.Instance.GetAndroidSDKPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
// OnDestroy is called to close the EditorWindow window.
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
DisconnectPerfMetricsTcpServer();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called multiple times per second on all visible windows.
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (tcpClient != null && tcpClient.Connected)
|
||||||
|
{
|
||||||
|
tcpClient.Tick();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (repaintRequested)
|
||||||
|
{
|
||||||
|
Repaint();
|
||||||
|
repaintRequested = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnConnectionStateChanged()
|
||||||
|
{
|
||||||
|
repaintRequested = true;
|
||||||
|
|
||||||
|
if (tcpClient.connectionState == OVRNetwork.OVRNetworkTcpClient.ConnectionState.Disconnected)
|
||||||
|
{
|
||||||
|
tcpClient.connectionStateChangedCallback -= OnConnectionStateChanged;
|
||||||
|
tcpClient.payloadReceivedCallback -= OnPayloadReceived;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnPayloadReceived(int payloadType, byte[] buffer, int start, int length)
|
||||||
|
{
|
||||||
|
if (payloadType == OVRSystemPerfMetrics.PayloadTypeMetrics)
|
||||||
|
{
|
||||||
|
string message = Encoding.UTF8.GetString(buffer, start, length);
|
||||||
|
OnMessageReceived(message);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogWarningFormat("[OVRSystemProfilerPanel] unrecongized payload type {0}", payloadType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnMessageReceived(string message)
|
||||||
|
{
|
||||||
|
if (pauseReceiveMetrics)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var metrics = new OVRSystemPerfMetrics.PerfMetrics();
|
||||||
|
if (!metrics.LoadFromJSON(message))
|
||||||
|
{
|
||||||
|
Debug.LogWarning("Cannot analyze metrics: " + message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
lock(receivedMetricsList)
|
||||||
|
{
|
||||||
|
if (receivedMetricsList.Count >= maxMetricsFrames)
|
||||||
|
{
|
||||||
|
receivedMetricsList.RemoveAt(0);
|
||||||
|
}
|
||||||
|
receivedMetricsList.Add(metrics);
|
||||||
|
}
|
||||||
|
repaintRequested = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConnectPerfMetricsTcpServer()
|
||||||
|
{
|
||||||
|
tcpClient.connectionStateChangedCallback += OnConnectionStateChanged;
|
||||||
|
tcpClient.payloadReceivedCallback += OnPayloadReceived;
|
||||||
|
|
||||||
|
tcpClient.Connect(remoteListeningPort);
|
||||||
|
|
||||||
|
EditorApplication.playModeStateChanged += OnApplicationPlayModeStateChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DisconnectPerfMetricsTcpServer()
|
||||||
|
{
|
||||||
|
EditorApplication.playModeStateChanged -= OnApplicationPlayModeStateChanged;
|
||||||
|
|
||||||
|
tcpClient.Disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnApplicationPlayModeStateChanged(PlayModeStateChange change)
|
||||||
|
{
|
||||||
|
Debug.LogFormat("[OVRSystemPerfMetricsWindow] OnApplicationPlayModeStateChanged {0}", change.ToString());
|
||||||
|
if (change == PlayModeStateChange.ExitingPlayMode)
|
||||||
|
{
|
||||||
|
tcpClient.Disconnect();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
47
Assets/Oculus/VR/Editor/Oculus.VR.Editor.asmdef
Normal file
47
Assets/Oculus/VR/Editor/Oculus.VR.Editor.asmdef
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"name": "Oculus.VR.Editor",
|
||||||
|
"rootNamespace": "",
|
||||||
|
"references": [
|
||||||
|
"Oculus.VR",
|
||||||
|
"Unity.XR.Oculus",
|
||||||
|
"Unity.XR.OpenXR",
|
||||||
|
"Unity.XR.OpenXR.Editor"
|
||||||
|
],
|
||||||
|
"includePlatforms": [
|
||||||
|
"Editor"
|
||||||
|
],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": false,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.management",
|
||||||
|
"expression": "",
|
||||||
|
"define": "USING_XR_MANAGEMENT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.oculus",
|
||||||
|
"expression": "",
|
||||||
|
"define": "USING_XR_SDK_OCULUS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.openxr",
|
||||||
|
"expression": "",
|
||||||
|
"define": "USING_XR_SDK_OPENXR"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.oculus",
|
||||||
|
"expression": "1.4.0",
|
||||||
|
"define": "USING_COMPATIBLE_OCULUS_XR_PLUGIN_VERSION"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.oculus",
|
||||||
|
"expression": "1.7.0",
|
||||||
|
"define": "PRIORITIZE_OCULUS_XR_SETTINGS"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
46
Assets/Oculus/VR/Editor/PathHelper.cs
Normal file
46
Assets/Oculus/VR/Editor/PathHelper.cs
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* Licensed under the Oculus SDK License Agreement (the "License");
|
||||||
|
* you may not use the Oculus SDK except in compliance with the License,
|
||||||
|
* which is provided at the time of installation or download, or which
|
||||||
|
* otherwise accompanies this software in either electronic or hard copy form.
|
||||||
|
*
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://developer.oculus.com/licenses/oculussdk/
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, the Oculus SDK
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
|
||||||
|
public static class PathHelper
|
||||||
|
{
|
||||||
|
public static string MakeRelativePath(string fromPath, string toPath)
|
||||||
|
{
|
||||||
|
var fromUri = new Uri(Path.GetFullPath(fromPath));
|
||||||
|
var toUri = new Uri(Path.GetFullPath(toPath));
|
||||||
|
|
||||||
|
if (fromUri.Scheme != toUri.Scheme)
|
||||||
|
{
|
||||||
|
return toPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
var relativeUri = fromUri.MakeRelativeUri(toUri);
|
||||||
|
var relativePath = Uri.UnescapeDataString(relativeUri.ToString());
|
||||||
|
|
||||||
|
if (toUri.Scheme.Equals("file", StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
relativePath = relativePath.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
|
||||||
|
}
|
||||||
|
|
||||||
|
return relativePath;
|
||||||
|
}
|
||||||
|
}
|
671
Assets/Oculus/VR/Editor/Scenes/OVRTransitionScene.unity
Normal file
671
Assets/Oculus/VR/Editor/Scenes/OVRTransitionScene.unity
Normal file
@ -0,0 +1,671 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!29 &1
|
||||||
|
OcclusionCullingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_OcclusionBakeSettings:
|
||||||
|
smallestOccluder: 5
|
||||||
|
smallestHole: 0.25
|
||||||
|
backfaceThreshold: 100
|
||||||
|
m_SceneGUID: 00000000000000000000000000000000
|
||||||
|
m_OcclusionCullingData: {fileID: 0}
|
||||||
|
--- !u!104 &2
|
||||||
|
RenderSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 8
|
||||||
|
m_Fog: 0
|
||||||
|
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||||
|
m_FogMode: 3
|
||||||
|
m_FogDensity: 0.01
|
||||||
|
m_LinearFogStart: 0
|
||||||
|
m_LinearFogEnd: 300
|
||||||
|
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||||
|
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||||
|
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
|
||||||
|
m_FlareFadeSpeed: 3
|
||||||
|
m_HaloTexture: {fileID: 0}
|
||||||
|
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_DefaultReflectionMode: 0
|
||||||
|
m_DefaultReflectionResolution: 128
|
||||||
|
m_ReflectionBounces: 1
|
||||||
|
m_ReflectionIntensity: 1
|
||||||
|
m_CustomReflection: {fileID: 0}
|
||||||
|
m_Sun: {fileID: 0}
|
||||||
|
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
--- !u!157 &3
|
||||||
|
LightmapSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 11
|
||||||
|
m_GIWorkflowMode: 1
|
||||||
|
m_GISettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_TemporalCoherenceThreshold: 1
|
||||||
|
m_EnvironmentLightingMode: 0
|
||||||
|
m_EnableBakedLightmaps: 1
|
||||||
|
m_EnableRealtimeLightmaps: 1
|
||||||
|
m_LightmapEditorSettings:
|
||||||
|
serializedVersion: 9
|
||||||
|
m_Resolution: 2
|
||||||
|
m_BakeResolution: 40
|
||||||
|
m_TextureWidth: 1024
|
||||||
|
m_TextureHeight: 1024
|
||||||
|
m_AO: 0
|
||||||
|
m_AOMaxDistance: 1
|
||||||
|
m_CompAOExponent: 1
|
||||||
|
m_CompAOExponentDirect: 0
|
||||||
|
m_Padding: 2
|
||||||
|
m_LightmapParameters: {fileID: 0}
|
||||||
|
m_LightmapsBakeMode: 1
|
||||||
|
m_TextureCompression: 1
|
||||||
|
m_FinalGather: 0
|
||||||
|
m_FinalGatherFiltering: 1
|
||||||
|
m_FinalGatherRayCount: 256
|
||||||
|
m_ReflectionCompression: 2
|
||||||
|
m_MixedBakeMode: 2
|
||||||
|
m_BakeBackend: 1
|
||||||
|
m_PVRSampling: 1
|
||||||
|
m_PVRDirectSampleCount: 32
|
||||||
|
m_PVRSampleCount: 512
|
||||||
|
m_PVRBounces: 2
|
||||||
|
m_PVRFilterTypeDirect: 0
|
||||||
|
m_PVRFilterTypeIndirect: 0
|
||||||
|
m_PVRFilterTypeAO: 0
|
||||||
|
m_PVRFilteringMode: 1
|
||||||
|
m_PVRCulling: 1
|
||||||
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
|
m_PVRFilteringGaussRadiusIndirect: 5
|
||||||
|
m_PVRFilteringGaussRadiusAO: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||||
|
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
|
m_ShowResolutionOverlay: 1
|
||||||
|
m_LightingDataAsset: {fileID: 0}
|
||||||
|
m_UseShadowmask: 1
|
||||||
|
--- !u!196 &4
|
||||||
|
NavMeshSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_BuildSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
agentTypeID: 0
|
||||||
|
agentRadius: 0.5
|
||||||
|
agentHeight: 2
|
||||||
|
agentSlope: 45
|
||||||
|
agentClimb: 0.4
|
||||||
|
ledgeDropHeight: 0
|
||||||
|
maxJumpAcrossDistance: 0
|
||||||
|
minRegionArea: 2
|
||||||
|
manualCellSize: 0
|
||||||
|
cellSize: 0.16666667
|
||||||
|
manualTileSize: 0
|
||||||
|
tileSize: 256
|
||||||
|
accuratePlacement: 0
|
||||||
|
debug:
|
||||||
|
m_Flags: 0
|
||||||
|
m_NavMeshData: {fileID: 0}
|
||||||
|
--- !u!1 &25651912
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 25651914}
|
||||||
|
- component: {fileID: 25651913}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Directional Light
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!108 &25651913
|
||||||
|
Light:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 25651912}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 8
|
||||||
|
m_Type: 1
|
||||||
|
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||||
|
m_Intensity: 1
|
||||||
|
m_Range: 10
|
||||||
|
m_SpotAngle: 30
|
||||||
|
m_CookieSize: 10
|
||||||
|
m_Shadows:
|
||||||
|
m_Type: 2
|
||||||
|
m_Resolution: -1
|
||||||
|
m_CustomResolution: -1
|
||||||
|
m_Strength: 1
|
||||||
|
m_Bias: 0.05
|
||||||
|
m_NormalBias: 0.4
|
||||||
|
m_NearPlane: 0.2
|
||||||
|
m_Cookie: {fileID: 0}
|
||||||
|
m_DrawHalo: 0
|
||||||
|
m_Flare: {fileID: 0}
|
||||||
|
m_RenderMode: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
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 &25651914
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 25651912}
|
||||||
|
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||||
|
m_LocalPosition: {x: 0, y: 3, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||||
|
--- !u!1 &1500274086
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1500274089}
|
||||||
|
- component: {fileID: 1500274088}
|
||||||
|
- component: {fileID: 1500274087}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: EventSystem
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &1500274087
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1500274086}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_HorizontalAxis: Horizontal
|
||||||
|
m_VerticalAxis: Vertical
|
||||||
|
m_SubmitButton: Submit
|
||||||
|
m_CancelButton: Cancel
|
||||||
|
m_InputActionsPerSecond: 10
|
||||||
|
m_RepeatDelay: 0.5
|
||||||
|
m_ForceModuleActive: 0
|
||||||
|
--- !u!114 &1500274088
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1500274086}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_FirstSelected: {fileID: 0}
|
||||||
|
m_sendNavigationEvents: 1
|
||||||
|
m_DragThreshold: 5
|
||||||
|
--- !u!4 &1500274089
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1500274086}
|
||||||
|
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: 0}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1802766121
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1802766122}
|
||||||
|
- component: {fileID: 1802766124}
|
||||||
|
- component: {fileID: 1802766123}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Title
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1802766122
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1802766121}
|
||||||
|
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: 2026874869}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 1}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: -15}
|
||||||
|
m_SizeDelta: {x: 290, y: 30}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1802766123
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1802766121}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 24
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 2
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 3
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: OVR Transition Scene
|
||||||
|
--- !u!222 &1802766124
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1802766121}
|
||||||
|
--- !u!1 &1955265764
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1955265765}
|
||||||
|
- component: {fileID: 1955265767}
|
||||||
|
- component: {fileID: 1955265766}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Log
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &1955265765
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1955265764}
|
||||||
|
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: 2026874869}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 0, y: -15}
|
||||||
|
m_SizeDelta: {x: 290, y: 270}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &1955265766
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1955265764}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 708705254, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 14
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 0
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 1
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text:
|
||||||
|
--- !u!222 &1955265767
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1955265764}
|
||||||
|
--- !u!1 &2026874868
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2026874869}
|
||||||
|
- component: {fileID: 2026874871}
|
||||||
|
- component: {fileID: 2026874870}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Panel
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2026874869
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2026874868}
|
||||||
|
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:
|
||||||
|
- {fileID: 1802766122}
|
||||||
|
- {fileID: 1955265765}
|
||||||
|
m_Father: {fileID: 2063971652}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!114 &2026874870
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2026874868}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
|
m_Sprite: {fileID: 10907, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
--- !u!222 &2026874871
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2026874868}
|
||||||
|
--- !u!1 &2060762002
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2060762004}
|
||||||
|
- component: {fileID: 2060762003}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRSceneLoader
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &2060762003
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2060762002}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a6d444f79f5ee4646b26c6d746385e80, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
sceneCheckIntervalSeconds: 1
|
||||||
|
mainCanvas: {fileID: 2063971651}
|
||||||
|
logTextBox: {fileID: 1955265766}
|
||||||
|
--- !u!4 &2060762004
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2060762002}
|
||||||
|
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:
|
||||||
|
- {fileID: 2063971652}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &2063971648
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2063971652}
|
||||||
|
- component: {fileID: 2063971651}
|
||||||
|
- component: {fileID: 2063971650}
|
||||||
|
- component: {fileID: 2063971649}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Canvas
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!114 &2063971649
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2063971648}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_IgnoreReversedGraphics: 1
|
||||||
|
m_BlockingObjects: 0
|
||||||
|
m_BlockingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
--- !u!114 &2063971650
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2063971648}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_UiScaleMode: 0
|
||||||
|
m_ReferencePixelsPerUnit: 100
|
||||||
|
m_ScaleFactor: 1
|
||||||
|
m_ReferenceResolution: {x: 800, y: 600}
|
||||||
|
m_ScreenMatchMode: 0
|
||||||
|
m_MatchWidthOrHeight: 0
|
||||||
|
m_PhysicalUnit: 3
|
||||||
|
m_FallbackScreenDPI: 96
|
||||||
|
m_DefaultSpriteDPI: 96
|
||||||
|
m_DynamicPixelsPerUnit: 1
|
||||||
|
--- !u!223 &2063971651
|
||||||
|
Canvas:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2063971648}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_RenderMode: 2
|
||||||
|
m_Camera: {fileID: 2122420806}
|
||||||
|
m_PlaneDistance: 100
|
||||||
|
m_PixelPerfect: 0
|
||||||
|
m_ReceivesEvents: 1
|
||||||
|
m_OverrideSorting: 0
|
||||||
|
m_OverridePixelPerfect: 0
|
||||||
|
m_SortingBucketNormalizedSize: 0
|
||||||
|
m_AdditionalShaderChannelsFlag: 0
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
--- !u!224 &2063971652
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2063971648}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 1}
|
||||||
|
m_LocalScale: {x: 0.003, y: 0.003, z: 0.003}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 2026874869}
|
||||||
|
m_Father: {fileID: 2060762004}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 300, y: 300}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!1 &2122420804
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2122420807}
|
||||||
|
- component: {fileID: 2122420806}
|
||||||
|
- component: {fileID: 2122420805}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Main Camera
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!81 &2122420805
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2122420804}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!20 &2122420806
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2122420804}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 2
|
||||||
|
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: -1
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!4 &2122420807
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2122420804}
|
||||||
|
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: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
BIN
Assets/Oculus/VR/Editor/Textures/odh_icon.png
Normal file
BIN
Assets/Oculus/VR/Editor/Textures/odh_icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 7.8 KiB |
4
Assets/Oculus/VR/Editor/network_sec_config.xml
Normal file
4
Assets/Oculus/VR/Editor/network_sec_config.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<network-security-config>
|
||||||
|
<base-config cleartextTrafficPermitted="false"></base-config>
|
||||||
|
</network-security-config>
|
2
Assets/Oculus/VR/LICENSE.txt
Normal file
2
Assets/Oculus/VR/LICENSE.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
|
||||||
|
Your use of this SDK or tool is subject to the Oculus SDK License Agreement, available at https://developer.oculus.com/licenses/oculussdk/
|
64
Assets/Oculus/VR/Materials/Arrow.mat
Normal file
64
Assets/Oculus/VR/Materials/Arrow.mat
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: Arrow
|
||||||
|
m_Shader: {fileID: 10101, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords: []
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TexEnvs:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _MainTex
|
||||||
|
second:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Shininess
|
||||||
|
second: .699999988
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Stencil
|
||||||
|
second: 0
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _StencilReadMask
|
||||||
|
second: 255
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _StencilWriteMask
|
||||||
|
second: 255
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _StencilComp
|
||||||
|
second: 8
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _StencilOp
|
||||||
|
second: 1
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _ColorMask
|
||||||
|
second: 15
|
||||||
|
m_Colors:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Color
|
||||||
|
second: {r: 1, g: 0, b: 0, a: 1}
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Emission
|
||||||
|
second: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _SpecColor
|
||||||
|
second: {r: 1, g: 1, b: 1, a: 1}
|
76
Assets/Oculus/VR/Materials/BasicHandMaterial.mat
Normal file
76
Assets/Oculus/VR/Materials/BasicHandMaterial.mat
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: BasicHandMaterial
|
||||||
|
m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: c00bf1ce0c68d5646ad7ea3d26b3486d, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 0.508
|
||||||
|
- _Glossiness: 0.389
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
29
Assets/Oculus/VR/Materials/CubeMaterial.mat
Normal file
29
Assets/Oculus/VR/Materials/CubeMaterial.mat
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: CubeMaterial
|
||||||
|
m_Shader: {fileID: 7, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 5
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TexEnvs:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _MainTex
|
||||||
|
second:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 020d1a102a7f2a14ebf6cefe7b977303, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats: {}
|
||||||
|
m_Colors:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Color
|
||||||
|
second: {r: 1, g: 1, b: 1, a: 1}
|
43
Assets/Oculus/VR/Materials/GazePointer.mat
Normal file
43
Assets/Oculus/VR/Materials/GazePointer.mat
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: GazePointer
|
||||||
|
m_Shader: {fileID: 4800000, guid: 38ad33c152e32ee46a9bbbb0e656f7e1, type: 3}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 5
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _AlphaTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 8b000a1e9077a124f9ad4e81392fccba, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _Illum:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 82026cb669304dc4897d2c11d3753141, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _AlphaCutoff: 0
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _EmissionLM: 0
|
||||||
|
- _EndRadius: 0.8
|
||||||
|
- _Fill: 0.5
|
||||||
|
- _InvFade: 1.11
|
||||||
|
- _StartRadius: 0.2
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 0, g: 1, b: 0.006896496, a: 1}
|
||||||
|
- _TintColor: {r: 0.5, g: 0.5, b: 0.5, a: 0.5}
|
@ -0,0 +1,94 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: BillboardMask
|
||||||
|
m_Shader: {fileID: 4800000, guid: 488b60f10f2b48e4f9ff49f81068b166, type: 3}
|
||||||
|
m_ShaderKeywords: _EDGEFADING_ON _VIGNETTE_ON
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 1
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _ColorMultiply: 2
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _DstBlendAlphaMode: 1
|
||||||
|
- _DstBlendMode: 3
|
||||||
|
- _EdgeFading: 1
|
||||||
|
- _FadingFalloff: 0.05
|
||||||
|
- _Falloff: 4
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Intensity: 0.75
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _Power: 14
|
||||||
|
- _Scale: 0.055
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _SrcBlendAlphaMode: 5
|
||||||
|
- _SrcBlendMode: 0
|
||||||
|
- _UVSec: 0
|
||||||
|
- _Vignette: 1
|
||||||
|
- _YOffset: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _Distort: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
- _KeyboardPosition: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
- _KeyboardRotation: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
- _KeyboardScale: {r: 1, g: 0.1, b: 1, a: 1}
|
77
Assets/Oculus/VR/Materials/PlainMaterial.mat
Normal file
77
Assets/Oculus/VR/Materials/PlainMaterial.mat
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: PlainMaterial
|
||||||
|
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
78
Assets/Oculus/VR/Materials/SelectionRay.mat
Normal file
78
Assets/Oculus/VR/Materials/SelectionRay.mat
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: SelectionRay
|
||||||
|
m_Shader: {fileID: 10755, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 0, g: 0, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
m_BuildTextureStacks: []
|
77
Assets/Oculus/VR/Materials/SelfieImage.mat
Normal file
77
Assets/Oculus/VR/Materials/SelfieImage.mat
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: SelfieImage
|
||||||
|
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 8400000, guid: 57e76b1057d5b458badbc9979747256e, type: 2}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
77
Assets/Oculus/VR/Materials/SelfieMat.mat
Normal file
77
Assets/Oculus/VR/Materials/SelfieMat.mat
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: SelfieMat
|
||||||
|
m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 8400000, guid: 3a9b7034483494d4c9ab590cbe537560, type: 2}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
43
Assets/Oculus/VR/Materials/cursor_timer_material.mat
Normal file
43
Assets/Oculus/VR/Materials/cursor_timer_material.mat
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: cursor_timer_material
|
||||||
|
m_Shader: {fileID: 4800000, guid: b95caf64e2cc3614892026a94bb2be84, type: 3}
|
||||||
|
m_ShaderKeywords: []
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TexEnvs:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _MainTex
|
||||||
|
second:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 79a33e7a7166c6142ad50f46a9a23d3e, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _ColorRamp
|
||||||
|
second:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 8929c8bc5148a624b8c9d6df0ee6f0ca, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Cutoff
|
||||||
|
second: 1
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _ColorRampOffset
|
||||||
|
second: 0
|
||||||
|
m_Colors:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Color
|
||||||
|
second: {r: 1, g: 1, b: 1, a: 1}
|
28
Assets/Oculus/VR/Materials/gaze_cursor.mat
Normal file
28
Assets/Oculus/VR/Materials/gaze_cursor.mat
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: gaze_cursor
|
||||||
|
m_Shader: {fileID: 4800000, guid: 05b53b473302943b58b8e33c93a38dac, type: 3}
|
||||||
|
m_ShaderKeywords: []
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TexEnvs:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _MainTex
|
||||||
|
second:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 077028084dceb584798dade6c58d1978, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats: {}
|
||||||
|
m_Colors:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Color
|
||||||
|
second: {r: 1, g: 1, b: 1, a: 1}
|
BIN
Assets/Oculus/VR/Meshes/HandTracking/OculusHand_L.fbx
Normal file
BIN
Assets/Oculus/VR/Meshes/HandTracking/OculusHand_L.fbx
Normal file
Binary file not shown.
BIN
Assets/Oculus/VR/Meshes/HandTracking/OculusHand_R.fbx
Normal file
BIN
Assets/Oculus/VR/Meshes/HandTracking/OculusHand_R.fbx
Normal file
Binary file not shown.
@ -0,0 +1,679 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: OculusTouchQuest2LeftAnimation
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: Button 1
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 2
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 3
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Grip
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Trigger
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy X
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy Y
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: 1107521045517535590}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 1
|
||||||
|
m_StateMachine: {fileID: 1107952837483422278}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 2
|
||||||
|
m_StateMachine: {fileID: 1107661262722686046}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 3
|
||||||
|
m_StateMachine: {fileID: 1107617238690245714}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Grip
|
||||||
|
m_StateMachine: {fileID: 1107611457393986700}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Trigger
|
||||||
|
m_StateMachine: {fileID: 1107446127407293338}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Joystick
|
||||||
|
m_StateMachine: {fileID: 1107573175546992920}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!206 &206217599917462660
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400032, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400024, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 2
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206386242654772672
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400034, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400006, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Trigger
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206443678587036618
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400030, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400026, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 3
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206473048002560522
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400036, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400018, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Grip
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206691222721410912
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400008, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400004, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0.14285715
|
||||||
|
m_Position: {x: 1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400020, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0.2857143
|
||||||
|
m_Position: {x: 0, y: -1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400002, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0.42857143
|
||||||
|
m_Position: {x: -1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0.5714286
|
||||||
|
m_Position: {x: 0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400014, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0.71428573
|
||||||
|
m_Position: {x: -0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400010, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0.85714287
|
||||||
|
m_Position: {x: 0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400012, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: -0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Joy X
|
||||||
|
m_BlendParameterY: Joy Y
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 3
|
||||||
|
--- !u!206 &206971632958765170
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400028, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400022, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 1
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!1102 &1102121122168462422
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206443678587036618}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102282624834042376
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206386242654772672}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102363758892143746
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 1
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206971632958765170}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102481999648770782
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206691222721410912}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102544609724274744
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206473048002560522}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102952634917922508
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206217599917462660}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1107 &1107446127407293338
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102282624834042376}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102282624834042376}
|
||||||
|
--- !u!1107 &1107521045517535590
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates: []
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 0}
|
||||||
|
--- !u!1107 &1107573175546992920
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102481999648770782}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102481999648770782}
|
||||||
|
--- !u!1107 &1107611457393986700
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102544609724274744}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102544609724274744}
|
||||||
|
--- !u!1107 &1107617238690245714
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102121122168462422}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102121122168462422}
|
||||||
|
--- !u!1107 &1107661262722686046
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102952634917922508}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102952634917922508}
|
||||||
|
--- !u!1107 &1107952837483422278
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: utton 11
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102363758892143746}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102363758892143746}
|
@ -0,0 +1,679 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: OculusTouchQuest2RightAnimation
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: Button 1
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 2
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 3
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Grip
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Trigger
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy X
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy Y
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: 1107521045517535590}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 1
|
||||||
|
m_StateMachine: {fileID: 1107952837483422278}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 2
|
||||||
|
m_StateMachine: {fileID: 1107661262722686046}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 3
|
||||||
|
m_StateMachine: {fileID: 1107617238690245714}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Grip
|
||||||
|
m_StateMachine: {fileID: 1107611457393986700}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Trigger
|
||||||
|
m_StateMachine: {fileID: 1107446127407293338}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Joystick
|
||||||
|
m_StateMachine: {fileID: 1107573175546992920}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!206 &206217599917462660
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400028, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400008, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 2
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206386242654772672
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400034, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400006, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Trigger
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206443678587036618
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400030, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400010, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 3
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206473048002560522
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400032, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400016, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Grip
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206691222721410912
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400036, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400014, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0.14285715
|
||||||
|
m_Position: {x: 1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400024, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0.2857143
|
||||||
|
m_Position: {x: 0, y: -1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400022, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0.42857143
|
||||||
|
m_Position: {x: -1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400020, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0.5714286
|
||||||
|
m_Position: {x: 0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0.71428573
|
||||||
|
m_Position: {x: -0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400004, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0.85714287
|
||||||
|
m_Position: {x: 0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400012, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: -0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Joy X
|
||||||
|
m_BlendParameterY: Joy Y
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 3
|
||||||
|
--- !u!206 &206971632958765170
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400026, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400002, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 1
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!1102 &1102121122168462422
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206443678587036618}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102282624834042376
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206386242654772672}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102363758892143746
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 1
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206971632958765170}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102481999648770782
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206691222721410912}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102544609724274744
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206473048002560522}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102952634917922508
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206217599917462660}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1107 &1107446127407293338
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102282624834042376}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102282624834042376}
|
||||||
|
--- !u!1107 &1107521045517535590
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates: []
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 0}
|
||||||
|
--- !u!1107 &1107573175546992920
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102481999648770782}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102481999648770782}
|
||||||
|
--- !u!1107 &1107611457393986700
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102544609724274744}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102544609724274744}
|
||||||
|
--- !u!1107 &1107617238690245714
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102121122168462422}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102121122168462422}
|
||||||
|
--- !u!1107 &1107661262722686046
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102952634917922508}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102952634917922508}
|
||||||
|
--- !u!1107 &1107952837483422278
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: utton 11
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102363758892143746}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102363758892143746}
|
@ -0,0 +1,78 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: OculusTouchForQuest2_MAT
|
||||||
|
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords: _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: b1f40c50ae24356469c6c6d4bfb2a2d6, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _Shininess: 0.078125
|
||||||
|
- _SmoothnessTextureChannel: 1
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,679 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: OculusTouchQuestAndRiftSLeftAnimation
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: Button 1
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 2
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 3
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Grip
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Trigger
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy X
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy Y
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: 1107521045517535590}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 1
|
||||||
|
m_StateMachine: {fileID: 1107952837483422278}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 2
|
||||||
|
m_StateMachine: {fileID: 1107661262722686046}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 3
|
||||||
|
m_StateMachine: {fileID: 1107617238690245714}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Grip
|
||||||
|
m_StateMachine: {fileID: 1107611457393986700}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Trigger
|
||||||
|
m_StateMachine: {fileID: 1107446127407293338}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Joystick
|
||||||
|
m_StateMachine: {fileID: 1107573175546992920}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!206 &206217599917462660
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400030, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400024, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 2
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206386242654772672
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400034, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400006, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Trigger
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206443678587036618
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400032, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400026, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 3
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206473048002560522
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400036, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400018, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Grip
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206691222721410912
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400008, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400004, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0.14285715
|
||||||
|
m_Position: {x: 1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400020, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0.2857143
|
||||||
|
m_Position: {x: 0, y: -1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400002, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0.42857143
|
||||||
|
m_Position: {x: -1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400016, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0.5714286
|
||||||
|
m_Position: {x: 0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400014, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0.71428573
|
||||||
|
m_Position: {x: -0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400010, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0.85714287
|
||||||
|
m_Position: {x: 0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400012, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: -0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Joy X
|
||||||
|
m_BlendParameterY: Joy Y
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 3
|
||||||
|
--- !u!206 &206971632958765170
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400028, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400022, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 1
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!1102 &1102121122168462422
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206443678587036618}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102282624834042376
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206386242654772672}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102363758892143746
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 1
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206971632958765170}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102481999648770782
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206691222721410912}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102544609724274744
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206473048002560522}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102952634917922508
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206217599917462660}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1107 &1107446127407293338
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102282624834042376}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102282624834042376}
|
||||||
|
--- !u!1107 &1107521045517535590
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates: []
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 0}
|
||||||
|
--- !u!1107 &1107573175546992920
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102481999648770782}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102481999648770782}
|
||||||
|
--- !u!1107 &1107611457393986700
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102544609724274744}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102544609724274744}
|
||||||
|
--- !u!1107 &1107617238690245714
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102121122168462422}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102121122168462422}
|
||||||
|
--- !u!1107 &1107661262722686046
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102952634917922508}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102952634917922508}
|
||||||
|
--- !u!1107 &1107952837483422278
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: utton 11
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102363758892143746}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102363758892143746}
|
@ -0,0 +1,679 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: OculusTouchQuestAndRiftSRightAnimation
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: Button 1
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 2
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 3
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Grip
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Trigger
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy X
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy Y
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: 1107521045517535590}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 1
|
||||||
|
m_StateMachine: {fileID: 1107952837483422278}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 2
|
||||||
|
m_StateMachine: {fileID: 1107661262722686046}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 3
|
||||||
|
m_StateMachine: {fileID: 1107617238690245714}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Grip
|
||||||
|
m_StateMachine: {fileID: 1107611457393986700}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Trigger
|
||||||
|
m_StateMachine: {fileID: 1107446127407293338}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Joystick
|
||||||
|
m_StateMachine: {fileID: 1107573175546992920}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!206 &206217599917462660
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400030, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400008, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 2
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206386242654772672
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400034, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400006, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Trigger
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206443678587036618
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400032, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400010, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 3
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206473048002560522
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400036, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400016, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Grip
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206691222721410912
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400026, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400014, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0.14285715
|
||||||
|
m_Position: {x: 1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400024, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0.2857143
|
||||||
|
m_Position: {x: 0, y: -1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400022, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0.42857143
|
||||||
|
m_Position: {x: -1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400020, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0.5714286
|
||||||
|
m_Position: {x: 0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400018, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0.71428573
|
||||||
|
m_Position: {x: -0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400004, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0.85714287
|
||||||
|
m_Position: {x: 0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400012, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: -0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Joy X
|
||||||
|
m_BlendParameterY: Joy Y
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 3
|
||||||
|
--- !u!206 &206971632958765170
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400028, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400002, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 1
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!1102 &1102121122168462422
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206443678587036618}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102282624834042376
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206386242654772672}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102363758892143746
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 1
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206971632958765170}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102481999648770782
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206691222721410912}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102544609724274744
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206473048002560522}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102952634917922508
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206217599917462660}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1107 &1107446127407293338
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102282624834042376}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102282624834042376}
|
||||||
|
--- !u!1107 &1107521045517535590
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates: []
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 0}
|
||||||
|
--- !u!1107 &1107573175546992920
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102481999648770782}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102481999648770782}
|
||||||
|
--- !u!1107 &1107611457393986700
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102544609724274744}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102544609724274744}
|
||||||
|
--- !u!1107 &1107617238690245714
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102121122168462422}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102121122168462422}
|
||||||
|
--- !u!1107 &1107661262722686046
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102952634917922508}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102952634917922508}
|
||||||
|
--- !u!1107 &1107952837483422278
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: utton 11
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102363758892143746}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102363758892143746}
|
@ -0,0 +1,76 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: OculusTouchForQuestAndRiftS_Material
|
||||||
|
m_Shader: {fileID: 10703, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: a53d1d4e8207acf45b310f189c342b70, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 0.21960786, g: 0.21960786, b: 0.21960786, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,679 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: OculusTouchRiftLeftAnimation
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: Button 1
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 2
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 3
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Grip
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Trigger
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy X
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy Y
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: 1107521045517535590}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 1
|
||||||
|
m_StateMachine: {fileID: 1107952837483422278}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 2
|
||||||
|
m_StateMachine: {fileID: 1107661262722686046}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 3
|
||||||
|
m_StateMachine: {fileID: 1107617238690245714}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Grip
|
||||||
|
m_StateMachine: {fileID: 1107611457393986700}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Trigger
|
||||||
|
m_StateMachine: {fileID: 1107446127407293338}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Joystick
|
||||||
|
m_StateMachine: {fileID: 1107573175546992920}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!206 &206217599917462660
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400034, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400024, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 2
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206386242654772672
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400028, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400006, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Trigger
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206443678587036618
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400036, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400026, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 3
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206473048002560522
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400030, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400018, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Grip
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206691222721410912
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400008, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400004, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0.14285715
|
||||||
|
m_Position: {x: 1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400020, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0.2857143
|
||||||
|
m_Position: {x: 0, y: -1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400012, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0.42857143
|
||||||
|
m_Position: {x: -1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400016, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0.5714286
|
||||||
|
m_Position: {x: 0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0.71428573
|
||||||
|
m_Position: {x: -0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400010, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0.85714287
|
||||||
|
m_Position: {x: 0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400002, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: -0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Joy X
|
||||||
|
m_BlendParameterY: Joy Y
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 3
|
||||||
|
--- !u!206 &206971632958765170
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400032, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400022, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 1
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!1102 &1102121122168462422
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206443678587036618}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102282624834042376
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206386242654772672}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102363758892143746
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 1
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206971632958765170}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102481999648770782
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206691222721410912}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102544609724274744
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206473048002560522}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102952634917922508
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206217599917462660}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1107 &1107446127407293338
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102282624834042376}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102282624834042376}
|
||||||
|
--- !u!1107 &1107521045517535590
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates: []
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 0}
|
||||||
|
--- !u!1107 &1107573175546992920
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102481999648770782}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102481999648770782}
|
||||||
|
--- !u!1107 &1107611457393986700
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102544609724274744}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102544609724274744}
|
||||||
|
--- !u!1107 &1107617238690245714
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102121122168462422}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102121122168462422}
|
||||||
|
--- !u!1107 &1107661262722686046
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102952634917922508}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102952634917922508}
|
||||||
|
--- !u!1107 &1107952837483422278
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: utton 11
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102363758892143746}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102363758892143746}
|
@ -0,0 +1,679 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!91 &9100000
|
||||||
|
AnimatorController:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: OculusTouchRiftRightAnimation
|
||||||
|
serializedVersion: 5
|
||||||
|
m_AnimatorParameters:
|
||||||
|
- m_Name: Button 1
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 2
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Button 3
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Grip
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Trigger
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy X
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- m_Name: Joy Y
|
||||||
|
m_Type: 1
|
||||||
|
m_DefaultFloat: 0
|
||||||
|
m_DefaultInt: 0
|
||||||
|
m_DefaultBool: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
m_AnimatorLayers:
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_StateMachine: {fileID: 1107521045517535590}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 0
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 1
|
||||||
|
m_StateMachine: {fileID: 1107952837483422278}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 2
|
||||||
|
m_StateMachine: {fileID: 1107661262722686046}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Button 3
|
||||||
|
m_StateMachine: {fileID: 1107617238690245714}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Grip
|
||||||
|
m_StateMachine: {fileID: 1107611457393986700}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Trigger
|
||||||
|
m_StateMachine: {fileID: 1107446127407293338}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
- serializedVersion: 5
|
||||||
|
m_Name: Joystick
|
||||||
|
m_StateMachine: {fileID: 1107573175546992920}
|
||||||
|
m_Mask: {fileID: 0}
|
||||||
|
m_Motions: []
|
||||||
|
m_Behaviours: []
|
||||||
|
m_BlendingMode: 0
|
||||||
|
m_SyncedLayerIndex: -1
|
||||||
|
m_DefaultWeight: 1
|
||||||
|
m_IKPass: 0
|
||||||
|
m_SyncedLayerAffectsTiming: 0
|
||||||
|
m_Controller: {fileID: 9100000}
|
||||||
|
--- !u!206 &206217599917462660
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400032, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400008, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 2
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206386242654772672
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400030, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400006, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Trigger
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206443678587036618
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400034, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400010, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 3
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206473048002560522
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400036, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400016, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Grip
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!206 &206691222721410912
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400026, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0.14285715
|
||||||
|
m_Position: {x: 1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400024, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0.2857143
|
||||||
|
m_Position: {x: 0, y: -1}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400022, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0.42857143
|
||||||
|
m_Position: {x: -1, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400020, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0.5714286
|
||||||
|
m_Position: {x: 0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400018, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0.71428573
|
||||||
|
m_Position: {x: -0.707106, y: 0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400004, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0.85714287
|
||||||
|
m_Position: {x: 0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400012, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: -0.707106, y: -0.707106}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Joy X
|
||||||
|
m_BlendParameterY: Joy Y
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 3
|
||||||
|
--- !u!206 &206971632958765170
|
||||||
|
BlendTree:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Blend Tree
|
||||||
|
m_Childs:
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400028, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 0
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
- serializedVersion: 2
|
||||||
|
m_Motion: {fileID: 7400002, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
m_Threshold: 1
|
||||||
|
m_Position: {x: 0, y: 0}
|
||||||
|
m_TimeScale: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_DirectBlendParameter: Button 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_BlendParameter: Button 1
|
||||||
|
m_BlendParameterY: Button 1
|
||||||
|
m_MinThreshold: 0
|
||||||
|
m_MaxThreshold: 1
|
||||||
|
m_UseAutomaticThresholds: 1
|
||||||
|
m_NormalizedBlendValues: 0
|
||||||
|
m_BlendType: 0
|
||||||
|
--- !u!1102 &1102121122168462422
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206443678587036618}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102282624834042376
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206386242654772672}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102363758892143746
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 1
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206971632958765170}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102481999648770782
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206691222721410912}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102544609724274744
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206473048002560522}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1102 &1102952634917922508
|
||||||
|
AnimatorState:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_Speed: 1
|
||||||
|
m_CycleOffset: 0
|
||||||
|
m_Transitions: []
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_Position: {x: 50, y: 50, z: 0}
|
||||||
|
m_IKOnFeet: 0
|
||||||
|
m_WriteDefaultValues: 1
|
||||||
|
m_Mirror: 0
|
||||||
|
m_SpeedParameterActive: 0
|
||||||
|
m_MirrorParameterActive: 0
|
||||||
|
m_CycleOffsetParameterActive: 0
|
||||||
|
m_TimeParameterActive: 0
|
||||||
|
m_Motion: {fileID: 206217599917462660}
|
||||||
|
m_Tag:
|
||||||
|
m_SpeedParameter:
|
||||||
|
m_MirrorParameter:
|
||||||
|
m_CycleOffsetParameter:
|
||||||
|
m_TimeParameter:
|
||||||
|
--- !u!1107 &1107446127407293338
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Trigger
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102282624834042376}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102282624834042376}
|
||||||
|
--- !u!1107 &1107521045517535590
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Base Layer
|
||||||
|
m_ChildStates: []
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 0}
|
||||||
|
--- !u!1107 &1107573175546992920
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Joystick
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102481999648770782}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102481999648770782}
|
||||||
|
--- !u!1107 &1107611457393986700
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Grip
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102544609724274744}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102544609724274744}
|
||||||
|
--- !u!1107 &1107617238690245714
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 3
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102121122168462422}
|
||||||
|
m_Position: {x: 24, y: 180, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102121122168462422}
|
||||||
|
--- !u!1107 &1107661262722686046
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: Button 2
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102952634917922508}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102952634917922508}
|
||||||
|
--- !u!1107 &1107952837483422278
|
||||||
|
AnimatorStateMachine:
|
||||||
|
serializedVersion: 5
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: utton 11
|
||||||
|
m_ChildStates:
|
||||||
|
- serializedVersion: 1
|
||||||
|
m_State: {fileID: 1102363758892143746}
|
||||||
|
m_Position: {x: 24, y: 168, z: 0}
|
||||||
|
m_ChildStateMachines: []
|
||||||
|
m_AnyStateTransitions: []
|
||||||
|
m_EntryTransitions: []
|
||||||
|
m_StateMachineTransitions: {}
|
||||||
|
m_StateMachineBehaviours: []
|
||||||
|
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||||
|
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||||
|
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||||
|
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||||
|
m_DefaultState: {fileID: 1102363758892143746}
|
@ -0,0 +1,76 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 6
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: OculusTouchForRift_Material
|
||||||
|
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords:
|
||||||
|
m_LightmapFlags: 4
|
||||||
|
m_EnableInstancingVariants: 0
|
||||||
|
m_DoubleSidedGI: 0
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
stringTagMap: {}
|
||||||
|
disabledShaderPasses: []
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_TexEnvs:
|
||||||
|
- _BumpMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailAlbedoMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailMask:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _DetailNormalMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _EmissionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MainTex:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 063f7a502a7e06e428090710e8286b2b, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _MetallicGlossMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _OcclusionMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
- _ParallaxMap:
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
- _BumpScale: 1
|
||||||
|
- _Cutoff: 0.5
|
||||||
|
- _DetailNormalMapScale: 1
|
||||||
|
- _DstBlend: 0
|
||||||
|
- _GlossMapScale: 1
|
||||||
|
- _Glossiness: 0.5
|
||||||
|
- _GlossyReflections: 1
|
||||||
|
- _Metallic: 0
|
||||||
|
- _Mode: 0
|
||||||
|
- _OcclusionStrength: 1
|
||||||
|
- _Parallax: 0.02
|
||||||
|
- _SmoothnessTextureChannel: 0
|
||||||
|
- _SpecularHighlights: 1
|
||||||
|
- _SrcBlend: 1
|
||||||
|
- _UVSec: 0
|
||||||
|
- _ZWrite: 1
|
||||||
|
m_Colors:
|
||||||
|
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
93
Assets/Oculus/VR/NOTICE.txt
Normal file
93
Assets/Oculus/VR/NOTICE.txt
Normal file
@ -0,0 +1,93 @@
|
|||||||
|
The following sets forth attribution notices for third party software that may be contained in portions of the Oculus Utilities SDK
|
||||||
|
|
||||||
|
OPENVR
|
||||||
|
SimpleJSON
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Notices for file(s):
|
||||||
|
ThirdParty/openvr_api.cs
|
||||||
|
|
||||||
|
Copyright (c) 2015, Valve Corporation
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
1. Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation and/or
|
||||||
|
other materials provided with the distribution.
|
||||||
|
|
||||||
|
3. Neither the name of the copyright holder nor the names of its contributors
|
||||||
|
may be used to endorse or promote products derived from this software without
|
||||||
|
specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Notices for file(s):
|
||||||
|
ThirdParty/SimpleJSON.cs
|
||||||
|
ThirdParty/SimpleJSONUnity.cs
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2012-2017 Markus Göbel (Bunny83)
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Notices for file(s):
|
||||||
|
Scripts/OVRGLTFLoader.cs
|
||||||
|
Scripts/OVRGLTFAccessor.cs
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2017 AltspaceVR
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
47
Assets/Oculus/VR/Oculus.VR.asmdef
Normal file
47
Assets/Oculus/VR/Oculus.VR.asmdef
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
"name": "Oculus.VR",
|
||||||
|
"references": [
|
||||||
|
"Unity.RenderPipelines.Universal.Runtime",
|
||||||
|
"Unity.XR.OpenXR"
|
||||||
|
],
|
||||||
|
"includePlatforms": [],
|
||||||
|
"excludePlatforms": [],
|
||||||
|
"allowUnsafeCode": true,
|
||||||
|
"overrideReferences": false,
|
||||||
|
"precompiledReferences": [],
|
||||||
|
"autoReferenced": true,
|
||||||
|
"defineConstraints": [],
|
||||||
|
"versionDefines": [
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.management",
|
||||||
|
"expression": "",
|
||||||
|
"define": "USING_XR_MANAGEMENT"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.oculus",
|
||||||
|
"expression": "",
|
||||||
|
"define": "USING_XR_SDK_OCULUS"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.openxr",
|
||||||
|
"expression": "",
|
||||||
|
"define": "USING_XR_SDK_OPENXR"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.xr.oculus",
|
||||||
|
"expression": "1.4.0",
|
||||||
|
"define": "USING_COMPATIBLE_OCULUS_XR_PLUGIN_VERSION"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.render-pipelines.universal",
|
||||||
|
"expression": "",
|
||||||
|
"define": "USING_URP"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "com.unity.render-pipelines.universal",
|
||||||
|
"expression": "10.0.0",
|
||||||
|
"define": "USING_MRC_COMPATIBLE_URP_VERSION"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"noEngineReferences": false
|
||||||
|
}
|
BIN
Assets/Oculus/VR/Plugins/1.74.0/Android/OVRPlugin.aar
Normal file
BIN
Assets/Oculus/VR/Plugins/1.74.0/Android/OVRPlugin.aar
Normal file
Binary file not shown.
BIN
Assets/Oculus/VR/Plugins/1.74.0/AndroidOpenXR/OVRPlugin.aar
Normal file
BIN
Assets/Oculus/VR/Plugins/1.74.0/AndroidOpenXR/OVRPlugin.aar
Normal file
Binary file not shown.
BIN
Assets/Oculus/VR/Plugins/1.74.0/AndroidUniversal/OVRPlugin.aar
Normal file
BIN
Assets/Oculus/VR/Plugins/1.74.0/AndroidUniversal/OVRPlugin.aar
Normal file
Binary file not shown.
@ -0,0 +1,36 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
|
<string>English</string>
|
||||||
|
<key>CFBundleExecutable</key>
|
||||||
|
<string>OVRGamepad</string>
|
||||||
|
<key>CFBundleGetInfoString</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleIdentifier</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
|
<string>6.0</string>
|
||||||
|
<key>CFBundleLongVersionString</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleName</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundlePackageType</key>
|
||||||
|
<string>APPL</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CFBundleSignature</key>
|
||||||
|
<string>????</string>
|
||||||
|
<key>CFBundleVersion</key>
|
||||||
|
<string></string>
|
||||||
|
<key>CSResourcesFileMapped</key>
|
||||||
|
<true/>
|
||||||
|
<key>LSRequiresCarbon</key>
|
||||||
|
<true/>
|
||||||
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
<string></string>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Binary file not shown.
0
Assets/Oculus/VR/Plugins/placeholder.txt
Normal file
0
Assets/Oculus/VR/Plugins/placeholder.txt
Normal file
70
Assets/Oculus/VR/Prefabs/Cursor_Timer.prefab
Normal file
70
Assets/Oculus/VR/Prefabs/Cursor_Timer.prefab
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &100000
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 4: {fileID: 400000}
|
||||||
|
- 33: {fileID: 3300000}
|
||||||
|
- 23: {fileID: 2300000}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: Cursor_Timer
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &400000
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 1.70000005, z: 1}
|
||||||
|
m_LocalScale: {x: .25, y: .25, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
--- !u!23 &2300000
|
||||||
|
Renderer:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 0
|
||||||
|
m_ReceiveShadows: 0
|
||||||
|
m_LightmapIndex: 255
|
||||||
|
m_LightmapTilingOffset: {x: 1, y: 1, z: 0, w: 0}
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 9531aa878fd5c4749b288b72024e8d2f, type: 2}
|
||||||
|
m_SubsetIndices:
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_UseLightProbes: 0
|
||||||
|
m_LightProbeAnchor: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_SortingLayerID: 0
|
||||||
|
m_SortingOrder: 0
|
||||||
|
--- !u!33 &3300000
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!1001 &100100000
|
||||||
|
Prefab:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications: []
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_ParentPrefab: {fileID: 0}
|
||||||
|
m_RootGameObject: {fileID: 100000}
|
||||||
|
m_IsPrefabParent: 1
|
||||||
|
m_IsExploded: 1
|
625
Assets/Oculus/VR/Prefabs/OVRCameraRig.prefab
Normal file
625
Assets/Oculus/VR/Prefabs/OVRCameraRig.prefab
Normal file
@ -0,0 +1,625 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &100000
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400000}
|
||||||
|
- component: {fileID: 20000010189485334}
|
||||||
|
- component: {fileID: 7763851181833062219}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightEyeAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &400000
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 459718}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!20 &20000010189485334
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
m_Enabled: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 2
|
||||||
|
m_HDR: 0
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!114 &7763851181833062219
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100000}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_RenderShadows: 1
|
||||||
|
m_RequiresDepthTextureOption: 2
|
||||||
|
m_RequiresOpaqueTextureOption: 2
|
||||||
|
m_CameraType: 0
|
||||||
|
m_Cameras: []
|
||||||
|
m_RendererIndex: -1
|
||||||
|
m_VolumeLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 1
|
||||||
|
m_VolumeTrigger: {fileID: 0}
|
||||||
|
m_VolumeFrameworkUpdateModeOption: 2
|
||||||
|
m_RenderPostProcessing: 0
|
||||||
|
m_Antialiasing: 0
|
||||||
|
m_AntialiasingQuality: 2
|
||||||
|
m_StopNaN: 0
|
||||||
|
m_Dithering: 0
|
||||||
|
m_ClearDepth: 1
|
||||||
|
m_AllowXRRendering: 1
|
||||||
|
m_RequiresDepthTexture: 0
|
||||||
|
m_RequiresColorTexture: 0
|
||||||
|
m_Version: 2
|
||||||
|
--- !u!1 &100002
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400002}
|
||||||
|
- component: {fileID: 8100000}
|
||||||
|
- component: {fileID: 2037080}
|
||||||
|
- component: {fileID: 8286059895431312373}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: CenterEyeAnchor
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &400002
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100002}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 459718}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!81 &8100000
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100002}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!20 &2037080
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100002}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.1
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 90
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 0
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!114 &8286059895431312373
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100002}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_RenderShadows: 1
|
||||||
|
m_RequiresDepthTextureOption: 2
|
||||||
|
m_RequiresOpaqueTextureOption: 2
|
||||||
|
m_CameraType: 0
|
||||||
|
m_Cameras: []
|
||||||
|
m_RendererIndex: -1
|
||||||
|
m_VolumeLayerMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 1
|
||||||
|
m_VolumeTrigger: {fileID: 0}
|
||||||
|
m_VolumeFrameworkUpdateModeOption: 2
|
||||||
|
m_RenderPostProcessing: 0
|
||||||
|
m_Antialiasing: 0
|
||||||
|
m_AntialiasingQuality: 2
|
||||||
|
m_StopNaN: 0
|
||||||
|
m_Dithering: 0
|
||||||
|
m_ClearDepth: 1
|
||||||
|
m_AllowXRRendering: 1
|
||||||
|
m_RequiresDepthTexture: 0
|
||||||
|
m_RequiresColorTexture: 0
|
||||||
|
m_Version: 2
|
||||||
|
--- !u!1 &100004
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400004}
|
||||||
|
- component: {fileID: 11400010}
|
||||||
|
- component: {fileID: 11400000}
|
||||||
|
- component: {fileID: 114473266101150724}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRCameraRig
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &400004
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100004}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 459718}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &11400010
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100004}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: df9f338034892c44ebb62d97894772f1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
usePerEyeCameras: 0
|
||||||
|
useFixedUpdateForTracking: 0
|
||||||
|
disableEyeAnchorCameras: 0
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100004}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7e933e81d3c20c74ea6fdc708a67e3a5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
useRecommendedMSAALevel: 1
|
||||||
|
_monoscopic: 0
|
||||||
|
minRenderScale: 0.7
|
||||||
|
maxRenderScale: 1
|
||||||
|
_headPoseRelativeOffsetRotation: {x: 0, y: 0, z: 0}
|
||||||
|
_headPoseRelativeOffsetTranslation: {x: 0, y: 0, z: 0}
|
||||||
|
profilerTcpPort: 32419
|
||||||
|
expandMixedRealityCapturePropertySheet: 0
|
||||||
|
enableMixedReality: 0
|
||||||
|
compositionMethod: 0
|
||||||
|
extraHiddenLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
extraVisibleLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
dynamicCullingMask: 1
|
||||||
|
externalCompositionBackdropColorRift: {r: 0, g: 1, b: 0, a: 1}
|
||||||
|
externalCompositionBackdropColorQuest: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
capturingCameraDevice: 0
|
||||||
|
flipCameraFrameHorizontally: 0
|
||||||
|
flipCameraFrameVertically: 0
|
||||||
|
handPoseStateLatency: 0
|
||||||
|
sandwichCompositionRenderLatency: 0
|
||||||
|
sandwichCompositionBufferedFrames: 8
|
||||||
|
chromaKeyColor: {r: 0, g: 1, b: 0, a: 1}
|
||||||
|
chromaKeySimilarity: 0.6
|
||||||
|
chromaKeySmoothRange: 0.03
|
||||||
|
chromaKeySpillRange: 0.06
|
||||||
|
useDynamicLighting: 0
|
||||||
|
depthQuality: 1
|
||||||
|
dynamicLightingSmoothFactor: 8
|
||||||
|
dynamicLightingDepthVariationClampingValue: 0.001
|
||||||
|
virtualGreenScreenType: 0
|
||||||
|
virtualGreenScreenTopY: 10
|
||||||
|
virtualGreenScreenBottomY: -10
|
||||||
|
virtualGreenScreenApplyDepthCulling: 0
|
||||||
|
virtualGreenScreenDepthTolerance: 0.2
|
||||||
|
mrcActivationMode: 0
|
||||||
|
isInsightPassthroughEnabled: 0
|
||||||
|
_trackingOriginType: 0
|
||||||
|
usePositionTracking: 1
|
||||||
|
useRotationTracking: 1
|
||||||
|
useIPDInPositionTracking: 1
|
||||||
|
resetTrackerOnLoad: 0
|
||||||
|
AllowRecenter: 1
|
||||||
|
LateControllerUpdate: 1
|
||||||
|
LateLatching: 0
|
||||||
|
--- !u!114 &114473266101150724
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100004}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5178bc8574ce2bf4388e787a2e2af326, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
opMode: 1
|
||||||
|
resetHmdPoseOnRelease: 1
|
||||||
|
resetHmdPoseByMiddleMouseButton: 1
|
||||||
|
activateKeys: 3201000031010000
|
||||||
|
pitchKeys: 3401000033010000
|
||||||
|
--- !u!1 &100006
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400006}
|
||||||
|
- component: {fileID: 20000012175207052}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftEyeAnchor
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &400006
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100006}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 459718}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!20 &20000012175207052
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 100006}
|
||||||
|
m_Enabled: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_projectionMatrixMode: 1
|
||||||
|
m_GateFitMode: 2
|
||||||
|
m_FOVAxisMode: 0
|
||||||
|
m_SensorSize: {x: 36, y: 24}
|
||||||
|
m_LensShift: {x: 0, y: 0}
|
||||||
|
m_FocalLength: 50
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 1
|
||||||
|
m_HDR: 0
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!1 &109308
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 482130}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftHandAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &482130
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 109308}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 4593680705043960}
|
||||||
|
m_Father: {fileID: 459718}
|
||||||
|
m_RootOrder: 4
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &113768
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 487254}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightHandAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &487254
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 113768}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 4484591312116288}
|
||||||
|
m_Father: {fileID: 459718}
|
||||||
|
m_RootOrder: 5
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &159718
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 459718}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TrackingSpace
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &459718
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 159718}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 400006}
|
||||||
|
- {fileID: 400002}
|
||||||
|
- {fileID: 400000}
|
||||||
|
- {fileID: 468682}
|
||||||
|
- {fileID: 482130}
|
||||||
|
- {fileID: 487254}
|
||||||
|
m_Father: {fileID: 400004}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &168682
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 468682}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TrackerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &468682
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 168682}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 459718}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1054112583220142
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4484591312116288}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightControllerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4484591312116288
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1054112583220142}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 487254}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &1983321904398200
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4593680705043960}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftControllerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4593680705043960
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1983321904398200}
|
||||||
|
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_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 482130}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
496
Assets/Oculus/VR/Prefabs/OVRControllerPrefab.prefab
Normal file
496
Assets/Oculus/VR/Prefabs/OVRControllerPrefab.prefab
Normal file
@ -0,0 +1,496 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &112276
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 488160}
|
||||||
|
- component: {fileID: 11479374}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRControllerPrefab
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &488160
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 112276}
|
||||||
|
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:
|
||||||
|
- {fileID: 2774251407684675044}
|
||||||
|
- {fileID: 2114446122515498521}
|
||||||
|
- {fileID: 4828818719732838786}
|
||||||
|
- {fileID: 3092784099471453321}
|
||||||
|
- {fileID: 6871378272463734979}
|
||||||
|
- {fileID: 5342833014125283329}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &11479374
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 112276}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: aed62bf3ae2456c408f247f96808ce96, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_modelOculusTouchQuestAndRiftSLeftController: {fileID: 2774251407684647364}
|
||||||
|
m_modelOculusTouchQuestAndRiftSRightController: {fileID: 2114446122515339833}
|
||||||
|
m_modelOculusTouchRiftLeftController: {fileID: 6871378272464032995}
|
||||||
|
m_modelOculusTouchRiftRightController: {fileID: 5342833014125450273}
|
||||||
|
m_modelOculusTouchQuest2LeftController: {fileID: 4828818719732477346}
|
||||||
|
m_modelOculusTouchQuest2RightController: {fileID: 3092784099471880361}
|
||||||
|
m_controller: 33554432
|
||||||
|
--- !u!1001 &2114446122515373209
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 488160}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 100000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: OculusTouchForQuestAndRiftS_Right
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 9500000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
propertyPath: m_Controller
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 9100000, guid: 3f974d61f39a79c408d54b32f31f186c, type: 2}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 37ba10a26a648144fa2390c8adfb2c8a, type: 3}
|
||||||
|
--- !u!1 &2114446122515339833 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 100000, guid: 37ba10a26a648144fa2390c8adfb2c8a,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2114446122515373209}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!4 &2114446122515498521 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 400000, guid: 37ba10a26a648144fa2390c8adfb2c8a,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2114446122515373209}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &2774251407684550500
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 488160}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 100000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: OculusTouchForQuestAndRiftS_Left
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 9500000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
propertyPath: m_Controller
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 9100000, guid: 92dd1ff21e711dc4b8b57eb39ab807ac, type: 2}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 32fbc8bcebb64584da5868aeeb086cda, type: 3}
|
||||||
|
--- !u!1 &2774251407684647364 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 100000, guid: 32fbc8bcebb64584da5868aeeb086cda,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2774251407684550500}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!4 &2774251407684675044 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 400000, guid: 32fbc8bcebb64584da5868aeeb086cda,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2774251407684550500}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &3092784099471848987
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 488160}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 100018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: OculusTouchForQuest2RightModel
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 3
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 9500000, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
propertyPath: m_Controller
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 9100000, guid: 62a9d09916ac8bf4ba30ba4803d3503a, type: 2}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 25b5eb0761edb6346b0b3444af76b55e, type: 3}
|
||||||
|
--- !u!1 &3092784099471880361 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 100018, guid: 25b5eb0761edb6346b0b3444af76b55e,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 3092784099471848987}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!4 &3092784099471453321 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 400018, guid: 25b5eb0761edb6346b0b3444af76b55e,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 3092784099471848987}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &4828818719732443922
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 488160}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 100016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: OculusTouchForQuest2LeftModel
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 2
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 9500000, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
propertyPath: m_Controller
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 9100000, guid: 4a8e946ed663e4a4db0f537e2965635d, type: 2}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: 8b83018900d13bb4f8e0ad895cb004e5, type: 3}
|
||||||
|
--- !u!1 &4828818719732477346 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 100016, guid: 8b83018900d13bb4f8e0ad895cb004e5,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4828818719732443922}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!4 &4828818719732838786 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 400016, guid: 8b83018900d13bb4f8e0ad895cb004e5,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 4828818719732443922}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &5342833014125417103
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 488160}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 100014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: right_touch_controller_model_skel
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 5
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 9500000, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
propertyPath: m_Controller
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 9100000, guid: 9889b45bb24173a4d93c7f6b5a496800, type: 2}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: c3798d66af7bbe54bbfe22a3b302300b, type: 3}
|
||||||
|
--- !u!1 &5342833014125450273 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 100014, guid: c3798d66af7bbe54bbfe22a3b302300b,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 5342833014125417103}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!4 &5342833014125283329 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 400014, guid: c3798d66af7bbe54bbfe22a3b302300b,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 5342833014125417103}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!1001 &6871378272464130637
|
||||||
|
PrefabInstance:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 488160}
|
||||||
|
m_Modifications:
|
||||||
|
- target: {fileID: 100014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: left_touch_controller_model_skel
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalPosition.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalRotation.w
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_RootOrder
|
||||||
|
value: 4
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_LocalEulerAnglesHint.z
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 9500000, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
propertyPath: m_Controller
|
||||||
|
value:
|
||||||
|
objectReference: {fileID: 9100000, guid: 3c08ce434693a4740bb5d256ffa5f8d1, type: 2}
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_SourcePrefab: {fileID: 100100000, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4, type: 3}
|
||||||
|
--- !u!1 &6871378272464032995 stripped
|
||||||
|
GameObject:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 100014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 6871378272464130637}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
--- !u!4 &6871378272463734979 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 400014, guid: c3ba18e9fa5e9104098cbdbb3e23a5b4,
|
||||||
|
type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 6871378272464130637}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
58
Assets/Oculus/VR/Prefabs/OVRCubemapCaptureProbe.prefab
Normal file
58
Assets/Oculus/VR/Prefabs/OVRCubemapCaptureProbe.prefab
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &115974
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 4
|
||||||
|
m_Component:
|
||||||
|
- 4: {fileID: 400110}
|
||||||
|
- 114: {fileID: 11407504}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRCubemapCaptureProbe
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 2974397684917235467, guid: 0000000000000000d000000000000000, type: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &400110
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 115974}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 3.74, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
--- !u!114 &11407504
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 115974}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7a489178b0acf0147846b3873447beaf, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
autoTriggerAfterLaunch: 1
|
||||||
|
autoTriggerDelay: 1
|
||||||
|
triggeredByKey: 289
|
||||||
|
pathName:
|
||||||
|
cubemapSize: 2048
|
||||||
|
--- !u!1001 &100100000
|
||||||
|
Prefab:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications: []
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_ParentPrefab: {fileID: 0}
|
||||||
|
m_RootGameObject: {fileID: 115974}
|
||||||
|
m_IsPrefabParent: 1
|
2683
Assets/Oculus/VR/Prefabs/OVRCustomHandPrefab_L.prefab
Normal file
2683
Assets/Oculus/VR/Prefabs/OVRCustomHandPrefab_L.prefab
Normal file
File diff suppressed because it is too large
Load Diff
2683
Assets/Oculus/VR/Prefabs/OVRCustomHandPrefab_R.prefab
Normal file
2683
Assets/Oculus/VR/Prefabs/OVRCustomHandPrefab_R.prefab
Normal file
File diff suppressed because it is too large
Load Diff
168
Assets/Oculus/VR/Prefabs/OVRHandPrefab.prefab
Normal file
168
Assets/Oculus/VR/Prefabs/OVRHandPrefab.prefab
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &1870938896605422
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4453513310108136}
|
||||||
|
- component: {fileID: 114428879332287356}
|
||||||
|
- component: {fileID: 114567484643301796}
|
||||||
|
- component: {fileID: 114392993255165844}
|
||||||
|
- component: {fileID: 114925265787909616}
|
||||||
|
- component: {fileID: 114252240061623322}
|
||||||
|
- component: {fileID: 137619227449585070}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRHandPrefab
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4453513310108136
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1870938896605422}
|
||||||
|
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: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &114428879332287356
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1870938896605422}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: cb7623a8f0b49cf4dbaa40aea4d4be64, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
HandType: 0
|
||||||
|
_pointerPoseRoot: {fileID: 0}
|
||||||
|
--- !u!114 &114567484643301796
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1870938896605422}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 2609c54f376cffc4da1ab9401cc1a36f, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_skeletonType: 0
|
||||||
|
_updateRootPose: 0
|
||||||
|
_updateRootScale: 1
|
||||||
|
_enablePhysicsCapsules: 0
|
||||||
|
--- !u!114 &114392993255165844
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1870938896605422}
|
||||||
|
m_Enabled: 0
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 54c16b381e28e8d479237771d234dbae, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_confidenceBehavior: 1
|
||||||
|
_systemGestureBehavior: 1
|
||||||
|
_renderPhysicsCapsules: 0
|
||||||
|
_skeletonMaterial: {fileID: 0}
|
||||||
|
_capsuleMaterial: {fileID: 0}
|
||||||
|
_systemGestureMaterial: {fileID: 0}
|
||||||
|
--- !u!114 &114925265787909616
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1870938896605422}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5cc5c234723e3a54d8dd09b131117743, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_meshType: 0
|
||||||
|
--- !u!114 &114252240061623322
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1870938896605422}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 73eac66b128fc8749a21623225c34541, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_ovrMesh: {fileID: 0}
|
||||||
|
_ovrSkeleton: {fileID: 0}
|
||||||
|
_confidenceBehavior: 1
|
||||||
|
_systemGestureBehavior: 1
|
||||||
|
_systemGestureMaterial: {fileID: 0}
|
||||||
|
--- !u!137 &137619227449585070
|
||||||
|
SkinnedMeshRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1870938896605422}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_CastShadows: 1
|
||||||
|
m_ReceiveShadows: 1
|
||||||
|
m_DynamicOccludee: 1
|
||||||
|
m_MotionVectors: 1
|
||||||
|
m_LightProbeUsage: 1
|
||||||
|
m_ReflectionProbeUsage: 1
|
||||||
|
m_RayTracingMode: 3
|
||||||
|
m_RayTraceProcedural: 0
|
||||||
|
m_RenderingLayerMask: 1
|
||||||
|
m_RendererPriority: 0
|
||||||
|
m_Materials:
|
||||||
|
- {fileID: 2100000, guid: 5ba7d209f622bb44e87b47ce27ee27b7, type: 2}
|
||||||
|
m_StaticBatchInfo:
|
||||||
|
firstSubMesh: 0
|
||||||
|
subMeshCount: 0
|
||||||
|
m_StaticBatchRoot: {fileID: 0}
|
||||||
|
m_ProbeAnchor: {fileID: 0}
|
||||||
|
m_LightProbeVolumeOverride: {fileID: 0}
|
||||||
|
m_ScaleInLightmap: 1
|
||||||
|
m_ReceiveGI: 1
|
||||||
|
m_PreserveUVs: 0
|
||||||
|
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
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Quality: 0
|
||||||
|
m_UpdateWhenOffscreen: 0
|
||||||
|
m_SkinnedMotionVectors: 1
|
||||||
|
m_Mesh: {fileID: 0}
|
||||||
|
m_Bones: []
|
||||||
|
m_BlendShapeWeights: []
|
||||||
|
m_RootBone: {fileID: 0}
|
||||||
|
m_AABB:
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
m_Extent: {x: 0, y: 0, z: 0}
|
||||||
|
m_DirtyAABB: 0
|
656
Assets/Oculus/VR/Prefabs/OVRPlayerController.prefab
Normal file
656
Assets/Oculus/VR/Prefabs/OVRPlayerController.prefab
Normal file
@ -0,0 +1,656 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &100004
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400008}
|
||||||
|
- component: {fileID: 11400020}
|
||||||
|
- component: {fileID: 11400002}
|
||||||
|
- component: {fileID: 114814064252544740}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRCameraRig
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &100006
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400002}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: ForwardDirection
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &100008
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400006}
|
||||||
|
- component: {fileID: 14300000}
|
||||||
|
- component: {fileID: 11400010}
|
||||||
|
- component: {fileID: 11462408}
|
||||||
|
- component: {fileID: 11493974}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRPlayerController
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &100010
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400010}
|
||||||
|
- component: {fileID: 20131489337305086}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftEyeAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &100012
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400012}
|
||||||
|
- component: {fileID: 8100000}
|
||||||
|
- component: {fileID: 2015248}
|
||||||
|
- component: {fileID: 11414578}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: CenterEyeAnchor
|
||||||
|
m_TagString: MainCamera
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &100014
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 400014}
|
||||||
|
- component: {fileID: 20504667576486672}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightEyeAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &134650
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 481164}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightHandAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &162066
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 462066}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TrackingSpace
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &162068
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 462068}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: TrackerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &168962
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 477154}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftHandAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &400002
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100006}
|
||||||
|
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: 400006}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &400006
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100008}
|
||||||
|
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:
|
||||||
|
- {fileID: 400002}
|
||||||
|
- {fileID: 400008}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &400008
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100004}
|
||||||
|
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:
|
||||||
|
- {fileID: 462066}
|
||||||
|
m_Father: {fileID: 400006}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &400010
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100010}
|
||||||
|
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: 462066}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &400012
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100012}
|
||||||
|
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: 462066}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &400014
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100014}
|
||||||
|
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: 462066}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &462066
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 162066}
|
||||||
|
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:
|
||||||
|
- {fileID: 400010}
|
||||||
|
- {fileID: 400012}
|
||||||
|
- {fileID: 400014}
|
||||||
|
- {fileID: 462068}
|
||||||
|
- {fileID: 477154}
|
||||||
|
- {fileID: 481164}
|
||||||
|
m_Father: {fileID: 400008}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &462068
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 162068}
|
||||||
|
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: 462066}
|
||||||
|
m_RootOrder: 3
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &477154
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 168962}
|
||||||
|
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:
|
||||||
|
- {fileID: 4188412984752900}
|
||||||
|
m_Father: {fileID: 462066}
|
||||||
|
m_RootOrder: 4
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &481164
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 134650}
|
||||||
|
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:
|
||||||
|
- {fileID: 4471613377008970}
|
||||||
|
m_Father: {fileID: 462066}
|
||||||
|
m_RootOrder: 5
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!20 &2015248
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100012}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0.019607844}
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.1
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 90
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 3
|
||||||
|
m_HDR: 0
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!81 &8100000
|
||||||
|
AudioListener:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100012}
|
||||||
|
m_Enabled: 1
|
||||||
|
--- !u!114 &11400002
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100004}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 7e933e81d3c20c74ea6fdc708a67e3a5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
queueAhead: 1
|
||||||
|
useRecommendedMSAALevel: 1
|
||||||
|
_monoscopic: 0
|
||||||
|
enableAdaptiveResolution: 0
|
||||||
|
minRenderScale: 0.7
|
||||||
|
maxRenderScale: 1
|
||||||
|
_headPoseRelativeOffsetRotation: {x: 0, y: 0, z: 0}
|
||||||
|
_headPoseRelativeOffsetTranslation: {x: 0, y: 0, z: 0}
|
||||||
|
profilerTcpPort: 32419
|
||||||
|
expandMixedRealityCapturePropertySheet: 0
|
||||||
|
enableMixedReality: 0
|
||||||
|
compositionMethod: 0
|
||||||
|
extraHiddenLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
externalCompositionBackdropColor: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
capturingCameraDevice: 0
|
||||||
|
flipCameraFrameHorizontally: 0
|
||||||
|
flipCameraFrameVertically: 0
|
||||||
|
handPoseStateLatency: 0
|
||||||
|
sandwichCompositionRenderLatency: 0
|
||||||
|
sandwichCompositionBufferedFrames: 8
|
||||||
|
chromaKeyColor: {r: 0, g: 1, b: 0, a: 1}
|
||||||
|
chromaKeySimilarity: 0.6
|
||||||
|
chromaKeySmoothRange: 0.03
|
||||||
|
chromaKeySpillRange: 0.06
|
||||||
|
useDynamicLighting: 0
|
||||||
|
depthQuality: 1
|
||||||
|
dynamicLightingSmoothFactor: 8
|
||||||
|
dynamicLightingDepthVariationClampingValue: 0.001
|
||||||
|
virtualGreenScreenType: 0
|
||||||
|
virtualGreenScreenTopY: 10
|
||||||
|
virtualGreenScreenBottomY: -10
|
||||||
|
virtualGreenScreenApplyDepthCulling: 0
|
||||||
|
virtualGreenScreenDepthTolerance: 0.2
|
||||||
|
mrcActivationMode: 0
|
||||||
|
_trackingOriginType: 0
|
||||||
|
usePositionTracking: 1
|
||||||
|
useRotationTracking: 1
|
||||||
|
useIPDInPositionTracking: 1
|
||||||
|
resetTrackerOnLoad: 0
|
||||||
|
AllowRecenter: 1
|
||||||
|
_reorientHMDOnControllerRecenter: 1
|
||||||
|
LateControllerUpdate: 1
|
||||||
|
--- !u!114 &11400010
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100008}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0950df82e7936c84983497630bde5b54, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
Acceleration: 0.1
|
||||||
|
Damping: 0.3
|
||||||
|
BackAndSideDampen: 0.5
|
||||||
|
JumpForce: 0.3
|
||||||
|
RotationAmount: 1.5
|
||||||
|
RotationRatchet: 45
|
||||||
|
SnapRotation: 1
|
||||||
|
FixedSpeedSteps: 0
|
||||||
|
HmdResetsY: 1
|
||||||
|
HmdRotatesY: 1
|
||||||
|
GravityModifier: 1
|
||||||
|
useProfileData: 1
|
||||||
|
EnableLinearMovement: 1
|
||||||
|
EnableRotation: 1
|
||||||
|
RotationEitherThumbstick: 0
|
||||||
|
--- !u!114 &11400020
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100004}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: df9f338034892c44ebb62d97894772f1, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
usePerEyeCameras: 0
|
||||||
|
useFixedUpdateForTracking: 0
|
||||||
|
disableEyeAnchorCameras: 0
|
||||||
|
--- !u!114 &11414578
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100012}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: df8e1d778abf442e4bec449c360e9e1c, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
fadeTime: 2
|
||||||
|
fadeColor: {r: 0.01, g: 0.01, b: 0.01, a: 1}
|
||||||
|
fadeOnStart: 1
|
||||||
|
renderQueue: 5000
|
||||||
|
--- !u!114 &11462408
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100008}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4f07515ada089df47868559a20dd6783, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
quitKey: 27
|
||||||
|
fadeInTexture: {fileID: 0}
|
||||||
|
speedRotationIncrement: 0.05
|
||||||
|
layerName: Default
|
||||||
|
--- !u!114 &11493974
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100008}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: b71d1996d67004241a3b69960856ffcb, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!143 &14300000
|
||||||
|
CharacterController:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100008}
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Height: 2
|
||||||
|
m_Radius: 0.5
|
||||||
|
m_SlopeLimit: 45
|
||||||
|
m_StepOffset: 0.3
|
||||||
|
m_SkinWidth: 0.01
|
||||||
|
m_MinMoveDistance: 0
|
||||||
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1001 &100100000
|
||||||
|
Prefab:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Modification:
|
||||||
|
m_TransformParent: {fileID: 0}
|
||||||
|
m_Modifications: []
|
||||||
|
m_RemovedComponents: []
|
||||||
|
m_ParentPrefab: {fileID: 0}
|
||||||
|
m_RootGameObject: {fileID: 100008}
|
||||||
|
m_IsPrefabParent: 1
|
||||||
|
--- !u!1 &1125068011842588
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4471613377008970}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: RightControllerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!1 &1660603843503870
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
serializedVersion: 5
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4188412984752900}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: LeftControllerAnchor
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &4188412984752900
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 1660603843503870}
|
||||||
|
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: 477154}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!4 &4471613377008970
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 1125068011842588}
|
||||||
|
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: 481164}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!20 &20131489337305086
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100010}
|
||||||
|
m_Enabled: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 1
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!20 &20504667576486672
|
||||||
|
Camera:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100014}
|
||||||
|
m_Enabled: 0
|
||||||
|
serializedVersion: 2
|
||||||
|
m_ClearFlags: 1
|
||||||
|
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||||
|
m_NormalizedViewPortRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
near clip plane: 0.3
|
||||||
|
far clip plane: 1000
|
||||||
|
field of view: 60
|
||||||
|
orthographic: 0
|
||||||
|
orthographic size: 5
|
||||||
|
m_Depth: 0
|
||||||
|
m_CullingMask:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_RenderingPath: -1
|
||||||
|
m_TargetTexture: {fileID: 0}
|
||||||
|
m_TargetDisplay: 0
|
||||||
|
m_TargetEye: 2
|
||||||
|
m_HDR: 1
|
||||||
|
m_AllowMSAA: 1
|
||||||
|
m_AllowDynamicResolution: 0
|
||||||
|
m_ForceIntoRT: 0
|
||||||
|
m_OcclusionCulling: 1
|
||||||
|
m_StereoConvergence: 10
|
||||||
|
m_StereoSeparation: 0.022
|
||||||
|
--- !u!114 &114814064252544740
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 1
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 100100000}
|
||||||
|
m_GameObject: {fileID: 100004}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5178bc8574ce2bf4388e787a2e2af326, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
opMode: 1
|
||||||
|
resetHmdPoseOnRelease: 1
|
||||||
|
resetHmdPoseByMiddleMouseButton: 1
|
||||||
|
activateKeys: 3201000031010000
|
||||||
|
pitchKeys: 3401000033010000
|
48
Assets/Oculus/VR/Prefabs/OVRRuntimeControllerPrefab.prefab
Normal file
48
Assets/Oculus/VR/Prefabs/OVRRuntimeControllerPrefab.prefab
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4473535996617709080
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1662430601901559469}
|
||||||
|
- component: {fileID: 1892613689412401362}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRRuntimeControllerPrefab
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1662430601901559469
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4473535996617709080}
|
||||||
|
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: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1892613689412401362
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4473535996617709080}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: ed24508d182abcf4ba02d983e302d34e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_controller: 0
|
||||||
|
m_controllerModelShader: {fileID: 10703, guid: 0000000000000000f000000000000000,
|
||||||
|
type: 0}
|
62
Assets/Oculus/VR/Prefabs/OVRSceneManager.prefab
Normal file
62
Assets/Oculus/VR/Prefabs/OVRSceneManager.prefab
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &747806495401477014
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 747806495401477035}
|
||||||
|
- component: {fileID: 747806495401477012}
|
||||||
|
- component: {fileID: 3492968334703562747}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRSceneManager
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &747806495401477035
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 747806495401477014}
|
||||||
|
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: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &747806495401477012
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 747806495401477014}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f2253d75e3ddc644b8153409c62dd74e, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
PlanePrefab: {fileID: 0}
|
||||||
|
VolumePrefab: {fileID: 0}
|
||||||
|
PrefabOverrides: []
|
||||||
|
VerboseLogging: 0
|
||||||
|
--- !u!114 &3492968334703562747
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 747806495401477014}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f1c4a1713e5d1b4409a95470bcf9e5b8, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
4692
Assets/Oculus/VR/Prefabs/OVRTrackedKeyboard/OVRHandMask_L.prefab
Normal file
4692
Assets/Oculus/VR/Prefabs/OVRTrackedKeyboard/OVRHandMask_L.prefab
Normal file
File diff suppressed because it is too large
Load Diff
4694
Assets/Oculus/VR/Prefabs/OVRTrackedKeyboard/OVRHandMask_R.prefab
Normal file
4694
Assets/Oculus/VR/Prefabs/OVRTrackedKeyboard/OVRHandMask_R.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,243 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &504253521116304621
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1270405811640892760}
|
||||||
|
- component: {fileID: 3337000877942556230}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: MrServiceProjectedPassthroughKeyboard
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1270405811640892760
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 504253521116304621}
|
||||||
|
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1142419901555515376}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
|
||||||
|
--- !u!33 &3337000877942556230
|
||||||
|
MeshFilter:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 504253521116304621}
|
||||||
|
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
--- !u!1 &3840755569523192958
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 3051129225537410085}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: KeyboardModelRoot
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &3051129225537410085
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 3840755569523192958}
|
||||||
|
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: 5671431997716857503}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &4841774909908246922
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1142419901555515376}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: MrServicePPRoot
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1142419901555515376
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4841774909908246922}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 0.4917829, y: 1, z: 0.254855}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 1270405811640892760}
|
||||||
|
m_Father: {fileID: 5671431997716857503}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &7230292371171714150
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 5671431997716857503}
|
||||||
|
- component: {fileID: 1726274527906839442}
|
||||||
|
- component: {fileID: 4414451440464876321}
|
||||||
|
- component: {fileID: 365103210938825357}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: OVRTrackedKeyboard
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &5671431997716857503
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7230292371171714150}
|
||||||
|
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:
|
||||||
|
- {fileID: 1142419901555515376}
|
||||||
|
- {fileID: 3051129225537410085}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &1726274527906839442
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7230292371171714150}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: cde6014a6f09af34c934c03defe61f3a, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
trackingEnabled: 1
|
||||||
|
connectionRequired: 1
|
||||||
|
showUntracked: 0
|
||||||
|
keyboardQueryFlags: 2
|
||||||
|
presentation: 0
|
||||||
|
PassthroughBorderMultiplier: 0.2
|
||||||
|
keyboardModelShader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
keyboardModelAlphaBlendShader: {fileID: 10750, guid: 0000000000000000f000000000000000,
|
||||||
|
type: 0}
|
||||||
|
KeyLabelModeShader: {fileID: 10750, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
PassthroughShader: {fileID: 4800000, guid: 8120257754b48344b8a1a0961bad0c46, type: 3}
|
||||||
|
projectedPassthroughRoot: {fileID: 1142419901555515376}
|
||||||
|
projectedPassthroughMesh: {fileID: 3337000877942556230}
|
||||||
|
ProjectedPassthroughKeyLabel: {fileID: 365103210938825357}
|
||||||
|
ActiveKeyboardTransform: {fileID: 3051129225537410085}
|
||||||
|
HandsOverKeyboard: 0
|
||||||
|
UseHeuristicRollback: 0
|
||||||
|
--- !u!114 &4414451440464876321
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7230292371171714150}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: f856490bcef82364d9770bece066fcf5, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
LeftHandPresence: {fileID: 6473791250914920026, guid: 9aaa891e0ba205049a65645fcd08743a,
|
||||||
|
type: 3}
|
||||||
|
RightHandPresence: {fileID: 994359214384669428, guid: f87c1bb867ed6194ea69c0d3a05a6209,
|
||||||
|
type: 3}
|
||||||
|
KeyboardTracker: {fileID: 1726274527906839442}
|
||||||
|
HandsMaterial: {fileID: 2100000, guid: e5efaaa7295b60c4b99c88ff76db4d0c, type: 2}
|
||||||
|
--- !u!114 &365103210938825357
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 7230292371171714150}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 555725d48e9051a4bb6b8d45178c2fdd, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
projectionSurfaceType: 1
|
||||||
|
overlayType: 1
|
||||||
|
compositionDepth: 1
|
||||||
|
hidden: 0
|
||||||
|
overridePerLayerColorScaleAndOffset: 0
|
||||||
|
colorScale: {x: 1, y: 1, z: 1, w: 1}
|
||||||
|
colorOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
overrideBlendFactors: 0
|
||||||
|
srcBlendFactor: 2
|
||||||
|
dstBlendFactor: 3
|
||||||
|
colorMapEditorType_: 0
|
||||||
|
colorMapEditorGradient:
|
||||||
|
serializedVersion: 2
|
||||||
|
key0: {r: 0, g: 0, b: 0, a: 1}
|
||||||
|
key1: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
key2: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key3: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key4: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key5: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key6: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
key7: {r: 0, g: 0, b: 0, a: 0}
|
||||||
|
ctime0: 0
|
||||||
|
ctime1: 65535
|
||||||
|
ctime2: 0
|
||||||
|
ctime3: 0
|
||||||
|
ctime4: 0
|
||||||
|
ctime5: 0
|
||||||
|
ctime6: 0
|
||||||
|
ctime7: 0
|
||||||
|
atime0: 0
|
||||||
|
atime1: 65535
|
||||||
|
atime2: 0
|
||||||
|
atime3: 0
|
||||||
|
atime4: 0
|
||||||
|
atime5: 0
|
||||||
|
atime6: 0
|
||||||
|
atime7: 0
|
||||||
|
m_Mode: 0
|
||||||
|
m_NumColorKeys: 2
|
||||||
|
m_NumAlphaKeys: 2
|
||||||
|
colorMapEditorContrast: 0
|
||||||
|
colorMapEditorBrightness: 0
|
||||||
|
colorMapEditorPosterize: 0
|
||||||
|
textureOpacity_: 1
|
||||||
|
edgeRenderingEnabled_: 0
|
||||||
|
edgeColor_: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
colorMapType: 0
|
76
Assets/Oculus/VR/Resources/Cubemap Blit.shader
Normal file
76
Assets/Oculus/VR/Resources/Cubemap Blit.shader
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
Shader "Oculus/Cubemap Blit" {
|
||||||
|
Properties{
|
||||||
|
_MainTex("Base (RGB) Trans (A)", CUBE) = "white" {}
|
||||||
|
_face("Face", Int) = 0
|
||||||
|
_linearToSrgb("Perform linear-to-gamma conversion", Int) = 0
|
||||||
|
_premultiply("Cubemap Blit", Int) = 0
|
||||||
|
}
|
||||||
|
SubShader{
|
||||||
|
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
|
||||||
|
|
||||||
|
Pass{
|
||||||
|
ZWrite Off
|
||||||
|
ColorMask RGBA
|
||||||
|
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
|
||||||
|
struct appdata_t
|
||||||
|
{
|
||||||
|
float4 vertex : POSITION;
|
||||||
|
float2 texcoord : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct v2f
|
||||||
|
{
|
||||||
|
float4 vertex : SV_POSITION;
|
||||||
|
half3 cubedir : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
samplerCUBE _MainTex;
|
||||||
|
float4 _MainTex_ST;
|
||||||
|
int _face;
|
||||||
|
int _linearToSrgb;
|
||||||
|
int _premultiply;
|
||||||
|
int _flip;
|
||||||
|
|
||||||
|
v2f vert (appdata_t va)
|
||||||
|
{
|
||||||
|
v2f vo;
|
||||||
|
vo.vertex = UnityObjectToClipPos(va.vertex);
|
||||||
|
|
||||||
|
//Face bases, assuming +x, -x, +z, -z, +y, -y with origin at bottom-left.
|
||||||
|
float3 o[6] = { {1.0, -1.0, 1.0}, {-1.0, -1.0, -1.0}, {-1.0, 1.0, 1.0}, {-1.0, -1.0, -1.0}, {-1.0, -1.0, 1.0}, { 1.0, -1.0, -1.0} };
|
||||||
|
float3 u[6] = { {0.0, 0.0, -1.0}, { 0.0, 0.0, 1.0}, { 1.0, 0.0, 0.0}, { 1.0, 0.0, 0.0}, { 1.0, 0.0, 0.0}, {-1.0, 0.0, 0.0} };
|
||||||
|
float3 v[6] = { {0.0, 1.0, 0.0}, { 0.0, 1.0, 0.0}, { 0.0, 0.0, -1.0}, { 0.0, 0.0, 1.0}, { 0.0, 1.0, 0.0}, { 0.0, 1.0, 0.0} };
|
||||||
|
|
||||||
|
//Map the input UV to the corresponding face basis.
|
||||||
|
vo.cubedir = o[_face] + 2.0*va.texcoord.x * u[_face] + 2.0*(1.0 - va.texcoord.y) * v[_face];
|
||||||
|
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 frag (v2f vi) : COLOR
|
||||||
|
{
|
||||||
|
fixed4 col = texCUBE(_MainTex, vi.cubedir);
|
||||||
|
|
||||||
|
if (_linearToSrgb)
|
||||||
|
{
|
||||||
|
float3 S1 = sqrt(col.rgb);
|
||||||
|
float3 S2 = sqrt(S1);
|
||||||
|
float3 S3 = sqrt(S2);
|
||||||
|
col.rgb = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * col.rgb;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_premultiply)
|
||||||
|
col.rgb *= col.a;
|
||||||
|
|
||||||
|
return col;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
99
Assets/Oculus/VR/Resources/OVRMRCameraFrame.shader
Normal file
99
Assets/Oculus/VR/Resources/OVRMRCameraFrame.shader
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
Shader "Oculus/OVRMRCameraFrame"
|
||||||
|
{
|
||||||
|
Properties
|
||||||
|
{
|
||||||
|
_Color("Main Color", Color) = (1,1,1,1)
|
||||||
|
_MainTex("Main Texture", 2D) = "white" {}
|
||||||
|
_Visible("Visible", Range(0.0,1.0)) = 1.0
|
||||||
|
_ChromaAlphaCutoff("ChromaAlphaCutoff", Range(0.0,1.0)) = 0.01
|
||||||
|
_ChromaToleranceA("ChromaToleranceA", Range(0.0,50.0)) = 20.0
|
||||||
|
_ChromaToleranceB("ChromaToleranceB", Range(0.0,50.0)) = 15.0
|
||||||
|
_ChromaShadows("ChromaShadows", Range(0.0,1.0)) = 0.02
|
||||||
|
}
|
||||||
|
SubShader
|
||||||
|
{
|
||||||
|
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
|
||||||
|
Blend SrcAlpha OneMinusSrcAlpha
|
||||||
|
AlphaTest Greater .01
|
||||||
|
Fog{ Mode Off }
|
||||||
|
LOD 100
|
||||||
|
Cull Off
|
||||||
|
|
||||||
|
Pass
|
||||||
|
{
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
#include "OVRMRChromaKey.cginc"
|
||||||
|
|
||||||
|
struct appdata
|
||||||
|
{
|
||||||
|
float4 vertex : POSITION;
|
||||||
|
float2 texcoord : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct v2f
|
||||||
|
{
|
||||||
|
float4 vertex : SV_POSITION;
|
||||||
|
float2 texcoord : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
sampler2D _MainTex;
|
||||||
|
float4 _MainTex_ST;
|
||||||
|
sampler2D _MaskTex;
|
||||||
|
|
||||||
|
float4 _TextureDimension; // (w, h, 1/w, 1/h)
|
||||||
|
|
||||||
|
fixed4 _Color;
|
||||||
|
fixed _Visible;
|
||||||
|
float4 _FlipParams; // (flip_h, flip_v, 0, 0)
|
||||||
|
|
||||||
|
v2f vert (appdata v)
|
||||||
|
{
|
||||||
|
v2f o;
|
||||||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
|
o.vertex *= _Visible;
|
||||||
|
o.texcoord = TRANSFORM_TEX(float2(v.texcoord.x, 1.0-v.texcoord.y), _MainTex);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed GetMask(float2 uv)
|
||||||
|
{
|
||||||
|
return tex2D(_MaskTex, uv).r;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 GetCameraColor(float2 colorUV)
|
||||||
|
{
|
||||||
|
fixed4 c = tex2D(_MainTex, colorUV) * _Color;
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 frag (v2f i) : SV_Target
|
||||||
|
{
|
||||||
|
float2 colorUV = i.texcoord;
|
||||||
|
if (_FlipParams.x > 0.0)
|
||||||
|
{
|
||||||
|
colorUV.x = 1.0 - colorUV.x;
|
||||||
|
}
|
||||||
|
if (_FlipParams.y > 0.0)
|
||||||
|
{
|
||||||
|
colorUV.y = 1.0 - colorUV.y;
|
||||||
|
}
|
||||||
|
float mask = GetMask(float2(colorUV.x, 1.0 - colorUV.y));
|
||||||
|
if (mask == 0.0)
|
||||||
|
{
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
float4 col = GetColorAfterChromaKey(colorUV, _TextureDimension.zw, 1.0);
|
||||||
|
if (col.a < 0.0)
|
||||||
|
{
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
return col;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
112
Assets/Oculus/VR/Resources/OVRMRCameraFrameLit.shader
Normal file
112
Assets/Oculus/VR/Resources/OVRMRCameraFrameLit.shader
Normal file
@ -0,0 +1,112 @@
|
|||||||
|
Shader "Oculus/OVRMRCameraFrameLit" {
|
||||||
|
Properties{
|
||||||
|
_Color("Color", Color) = (1,1,1,1)
|
||||||
|
_MainTex("Albedo (RGB)", 2D) = "white" {}
|
||||||
|
_DepthTex("Depth (cm)", 2D) = "black" {}
|
||||||
|
_InconfidenceTex("Inconfidence (0-100)", 2D) = "black" {}
|
||||||
|
_Visible("Visible", Range(0.0,1.0)) = 1.0
|
||||||
|
}
|
||||||
|
SubShader{
|
||||||
|
Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" }
|
||||||
|
LOD 200
|
||||||
|
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma surface surf Lambert alpha:fade
|
||||||
|
#pragma target 3.0
|
||||||
|
|
||||||
|
#include "OVRMRChromaKey.cginc"
|
||||||
|
|
||||||
|
#define TEST_ENVIRONMENT 0
|
||||||
|
|
||||||
|
sampler2D _MainTex;
|
||||||
|
sampler2D _DepthTex;
|
||||||
|
sampler2D _MaskTex;
|
||||||
|
|
||||||
|
float4 _TextureDimension; // (w, h, 1/w, 1/h)
|
||||||
|
float4 _TextureWorldSize; // (width_in_meter, height_in_meter, 0, 0)
|
||||||
|
|
||||||
|
float _SmoothFactor;
|
||||||
|
float _DepthVariationClamp;
|
||||||
|
|
||||||
|
float _CullingDistance;
|
||||||
|
|
||||||
|
struct Input {
|
||||||
|
#if TEST_ENVIRONMENT
|
||||||
|
float2 uv_MainTex;
|
||||||
|
#endif
|
||||||
|
float4 screenPos;
|
||||||
|
};
|
||||||
|
|
||||||
|
fixed4 _Color;
|
||||||
|
fixed _Visible;
|
||||||
|
float4 _FlipParams; // (flip_h, flip_v, 0, 0)
|
||||||
|
|
||||||
|
fixed GetMask(float2 uv)
|
||||||
|
{
|
||||||
|
return tex2D(_MaskTex, uv).r;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 GetCameraColor(float2 colorUV)
|
||||||
|
{
|
||||||
|
fixed4 c = tex2D(_MainTex, colorUV) * _Color;
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
float GetDepth(float2 uv)
|
||||||
|
{
|
||||||
|
float depth = tex2D(_DepthTex, uv).x * 1.0 / 100;
|
||||||
|
return depth;
|
||||||
|
}
|
||||||
|
|
||||||
|
float3 GetNormal(float2 uv)
|
||||||
|
{
|
||||||
|
float dz_x = GetDepth(uv + float2(_TextureDimension.z, 0)) - GetDepth(uv - float2(_TextureDimension.z, 0));
|
||||||
|
float dz_y = GetDepth(uv + float2(0, _TextureDimension.w)) - GetDepth(uv - float2(0, _TextureDimension.w));
|
||||||
|
dz_x = clamp(dz_x, -_DepthVariationClamp, _DepthVariationClamp);
|
||||||
|
dz_y = clamp(dz_y, -_DepthVariationClamp, _DepthVariationClamp);
|
||||||
|
//float dist = 0.01;
|
||||||
|
//float3 normal = cross(float3(dist, 0, dz_x), float3(0, dist, dz_y));
|
||||||
|
float3 normal = cross(float3(_TextureWorldSize.x * _TextureDimension.z * 2.0 * _SmoothFactor, 0, dz_x), float3(0, _TextureWorldSize.y * _TextureDimension.w * 2.0 * _SmoothFactor, dz_y));
|
||||||
|
normal = normalize(normal);
|
||||||
|
return normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
void surf(Input IN, inout SurfaceOutput o) {
|
||||||
|
#if TEST_ENVIRONMENT
|
||||||
|
float2 colorUV = float2(IN.uv_MainTex.x, IN.uv_MainTex.y);
|
||||||
|
#else
|
||||||
|
float2 screenUV = IN.screenPos.xy / IN.screenPos.w;
|
||||||
|
float2 colorUV = float2(screenUV.x, 1.0 - screenUV.y);
|
||||||
|
#endif
|
||||||
|
if (_FlipParams.x > 0.0)
|
||||||
|
{
|
||||||
|
colorUV.x = 1.0 - colorUV.x;
|
||||||
|
}
|
||||||
|
if (_FlipParams.y > 0.0)
|
||||||
|
{
|
||||||
|
colorUV.y = 1.0 - colorUV.y;
|
||||||
|
}
|
||||||
|
float mask = GetMask(colorUV);
|
||||||
|
if (mask == 0.0)
|
||||||
|
{
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
float4 col = GetColorAfterChromaKey(colorUV, _TextureDimension.zw, 1.0);
|
||||||
|
if (col.a < 0.0)
|
||||||
|
{
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
float depth = GetDepth(colorUV);
|
||||||
|
if (depth > _CullingDistance)
|
||||||
|
{
|
||||||
|
discard;
|
||||||
|
}
|
||||||
|
float3 normal = GetNormal(colorUV);
|
||||||
|
o.Albedo = col.rgb;
|
||||||
|
o.Normal = normal;
|
||||||
|
o.Alpha = col.a *_Visible;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
FallBack "Alpha-Diffuse"
|
||||||
|
}
|
103
Assets/Oculus/VR/Resources/OVRMRChromaKey.cginc
Normal file
103
Assets/Oculus/VR/Resources/OVRMRChromaKey.cginc
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
fixed4 _ChromaKeyColor;
|
||||||
|
float _ChromaKeySimilarity;
|
||||||
|
float _ChromaKeySmoothRange;
|
||||||
|
float _ChromaKeySpillRange;
|
||||||
|
|
||||||
|
// https://en.wikipedia.org/wiki/YUV
|
||||||
|
float3 RGB2YUV(float3 rgb)
|
||||||
|
{
|
||||||
|
float r = rgb.x;
|
||||||
|
float g = rgb.y;
|
||||||
|
float b = rgb.z;
|
||||||
|
float y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
||||||
|
float u = -0.09991 * r - 0.33609 * g + 0.436 * b;
|
||||||
|
float v = 0.615 * r - 0.55861 * g - 0.05639 * b;
|
||||||
|
return float3(y, u, v);
|
||||||
|
}
|
||||||
|
|
||||||
|
float3 YUV2RGB(float3 yuv)
|
||||||
|
{
|
||||||
|
float y = yuv.x;
|
||||||
|
float u = yuv.y;
|
||||||
|
float v = yuv.z;
|
||||||
|
float r = y + 1.28033 * v;
|
||||||
|
float g = y - 0.21482 * u - 0.38059 * v;
|
||||||
|
float b = y + 2.12798 * u;
|
||||||
|
return float3(r, g, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 GetCameraColor(float2 colorUV);
|
||||||
|
|
||||||
|
float ColorDistance_YUV_YUV(float3 yuv1, float3 yuv2)
|
||||||
|
{
|
||||||
|
float dist = distance(yuv1.yz, yuv2.yz);
|
||||||
|
// Increase the distance if the brightness of the first color is too high.
|
||||||
|
// It fixed the error on the over exposure areas
|
||||||
|
dist += saturate(yuv1.x - 0.9);
|
||||||
|
return dist;
|
||||||
|
}
|
||||||
|
|
||||||
|
float ColorDistance_RGB_YUV(float3 rgb1, float3 yuv2)
|
||||||
|
{
|
||||||
|
float3 yuv1 = RGB2YUV(rgb1);
|
||||||
|
return ColorDistance_YUV_YUV(yuv1, yuv2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
float ColorDistance_RGB_RGB(float3 rgb1, float3 rgb2)
|
||||||
|
{
|
||||||
|
float3 yuv1 = RGB2YUV(rgb1);
|
||||||
|
float3 yuv2 = RGB2YUV(rgb2);
|
||||||
|
return ColorDistance_YUV_YUV(yuv1, yuv2);
|
||||||
|
}
|
||||||
|
|
||||||
|
float RGB2Gray(float3 rgb)
|
||||||
|
{
|
||||||
|
float r = rgb.x;
|
||||||
|
float g = rgb.y;
|
||||||
|
float b = rgb.z;
|
||||||
|
float y = 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
||||||
|
return y;
|
||||||
|
}
|
||||||
|
|
||||||
|
float GetAlphaFromDistance(float dist)
|
||||||
|
{
|
||||||
|
float result = smoothstep(_ChromaKeySimilarity, _ChromaKeySimilarity + _ChromaKeySmoothRange, dist);
|
||||||
|
result = result * result;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
float GetSpillFromDistance(float dist)
|
||||||
|
{
|
||||||
|
float result = smoothstep(_ChromaKeySimilarity, _ChromaKeySimilarity + _ChromaKeySpillRange, dist);
|
||||||
|
result = result * result * result;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
float4 GetColorAfterChromaKey(float2 UV, float2 deltaUV, float step)
|
||||||
|
{
|
||||||
|
float3 chromaColor = _ChromaKeyColor.rgb;
|
||||||
|
float3 chromaYUV = RGB2YUV(chromaColor);
|
||||||
|
float dist = 0.0;
|
||||||
|
const int samples = 3;
|
||||||
|
float offset = ((float)samples - 1.0) / 2.0;
|
||||||
|
for (int i = 0; i < samples; ++i)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < samples; ++j)
|
||||||
|
{
|
||||||
|
fixed4 color = GetCameraColor(UV + float2((float)i - offset, (float)j - offset) * deltaUV * step);
|
||||||
|
float d = ColorDistance_RGB_YUV(color, chromaYUV);
|
||||||
|
dist += d;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dist /= (samples * samples);
|
||||||
|
fixed4 centerColor = GetCameraColor(UV);
|
||||||
|
float alpha = GetAlphaFromDistance(dist);
|
||||||
|
float spill = GetSpillFromDistance(dist);
|
||||||
|
float gray = RGB2Gray(centerColor.rgb);
|
||||||
|
float4 outColor;
|
||||||
|
outColor.rgb = lerp(float3(gray, gray, gray), centerColor.rgb, spill);
|
||||||
|
outColor.a = alpha;
|
||||||
|
return outColor;
|
||||||
|
}
|
48
Assets/Oculus/VR/Resources/OVRMRUnlit.shader
Normal file
48
Assets/Oculus/VR/Resources/OVRMRUnlit.shader
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
Shader "Oculus/Unlit" {
|
||||||
|
Properties{
|
||||||
|
_Color("Main Color", Color) = (1,1,1,1)
|
||||||
|
}
|
||||||
|
|
||||||
|
SubShader{
|
||||||
|
Tags{ "RenderType" = "Opaque" }
|
||||||
|
LOD 100
|
||||||
|
|
||||||
|
Pass{
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
#pragma target 2.0
|
||||||
|
#pragma multi_compile_fog
|
||||||
|
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
|
||||||
|
struct appdata_t {
|
||||||
|
float4 vertex : POSITION;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct v2f {
|
||||||
|
float4 vertex : SV_POSITION;
|
||||||
|
UNITY_FOG_COORDS(0)
|
||||||
|
};
|
||||||
|
|
||||||
|
fixed4 _Color;
|
||||||
|
|
||||||
|
v2f vert(appdata_t v)
|
||||||
|
{
|
||||||
|
v2f o;
|
||||||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
|
UNITY_TRANSFER_FOG(o,o.vertex);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 frag(v2f i) : COLOR
|
||||||
|
{
|
||||||
|
fixed4 col = _Color;
|
||||||
|
UNITY_APPLY_FOG(i.fogCoord, col);
|
||||||
|
UNITY_OPAQUE_ALPHA(col.a);
|
||||||
|
return col;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
54
Assets/Oculus/VR/Resources/OVRMRUnlitTransparent.shader
Normal file
54
Assets/Oculus/VR/Resources/OVRMRUnlitTransparent.shader
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
Shader "Oculus/UnlitTransparent" {
|
||||||
|
Properties{
|
||||||
|
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
|
||||||
|
}
|
||||||
|
|
||||||
|
SubShader{
|
||||||
|
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
|
||||||
|
LOD 100
|
||||||
|
|
||||||
|
ZWrite Off
|
||||||
|
Blend SrcAlpha OneMinusSrcAlpha
|
||||||
|
|
||||||
|
Pass{
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
#pragma target 2.0
|
||||||
|
#pragma multi_compile_fog
|
||||||
|
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
|
||||||
|
struct appdata_t {
|
||||||
|
float4 vertex : POSITION;
|
||||||
|
float2 texcoord : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct v2f {
|
||||||
|
float4 vertex : SV_POSITION;
|
||||||
|
half2 texcoord : TEXCOORD0;
|
||||||
|
UNITY_FOG_COORDS(1)
|
||||||
|
};
|
||||||
|
|
||||||
|
sampler2D _MainTex;
|
||||||
|
float4 _MainTex_ST;
|
||||||
|
|
||||||
|
v2f vert(appdata_t v)
|
||||||
|
{
|
||||||
|
v2f o;
|
||||||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
|
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||||
|
UNITY_TRANSFER_FOG(o,o.vertex);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 frag(v2f i) : SV_Target
|
||||||
|
{
|
||||||
|
fixed4 col = tex2D(_MainTex, i.texcoord);
|
||||||
|
UNITY_APPLY_FOG(i.fogCoord, col);
|
||||||
|
return col;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
72
Assets/Oculus/VR/Resources/Texture2D Blit.shader
Normal file
72
Assets/Oculus/VR/Resources/Texture2D Blit.shader
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
Shader "Oculus/Texture2D Blit" {
|
||||||
|
Properties{
|
||||||
|
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
|
||||||
|
_linearToSrgb("Perform linear-to-gamma conversion", Int) = 0
|
||||||
|
_premultiply("Pre-multiply alpha", Int) = 0
|
||||||
|
_flip("Y-Flip", Int) = 0
|
||||||
|
}
|
||||||
|
SubShader{
|
||||||
|
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
|
||||||
|
|
||||||
|
Pass{
|
||||||
|
ZWrite Off
|
||||||
|
ColorMask RGBA
|
||||||
|
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma vertex vert
|
||||||
|
#pragma fragment frag
|
||||||
|
|
||||||
|
#include "UnityCG.cginc"
|
||||||
|
|
||||||
|
struct appdata_t
|
||||||
|
{
|
||||||
|
float4 vertex : POSITION;
|
||||||
|
float2 texcoord : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct v2f
|
||||||
|
{
|
||||||
|
float4 vertex : SV_POSITION;
|
||||||
|
half2 texcoord : TEXCOORD0;
|
||||||
|
};
|
||||||
|
|
||||||
|
sampler2D _MainTex;
|
||||||
|
float4 _MainTex_ST;
|
||||||
|
int _linearToSrgb;
|
||||||
|
int _premultiply;
|
||||||
|
int _flip;
|
||||||
|
|
||||||
|
v2f vert (appdata_t v)
|
||||||
|
{
|
||||||
|
v2f o;
|
||||||
|
o.vertex = UnityObjectToClipPos(v.vertex);
|
||||||
|
o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
|
||||||
|
return o;
|
||||||
|
}
|
||||||
|
|
||||||
|
fixed4 frag (v2f i) : COLOR
|
||||||
|
{
|
||||||
|
#if SHADER_API_D3D11
|
||||||
|
if (_flip)
|
||||||
|
{
|
||||||
|
i.texcoord.y = 1.0f - i.texcoord.y;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
fixed4 col = tex2D(_MainTex, i.texcoord);
|
||||||
|
if (_linearToSrgb)
|
||||||
|
{
|
||||||
|
float3 S1 = sqrt(col.rgb);
|
||||||
|
float3 S2 = sqrt(S1);
|
||||||
|
float3 S3 = sqrt(S2);
|
||||||
|
col.rgb = 0.662002687 * S1 + 0.684122060 * S2 - 0.323583601 * S3 - 0.0225411470 * col.rgb;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (_premultiply)
|
||||||
|
col.rgb *= col.a;
|
||||||
|
|
||||||
|
return col;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
48
Assets/Oculus/VR/Resources/Underlay Impostor.shader
Normal file
48
Assets/Oculus/VR/Resources/Underlay Impostor.shader
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
/*
|
||||||
|
This shader is used to render the impostor while clearing out the alpha of the eye buffer
|
||||||
|
The important details here are:
|
||||||
|
- the use of the Geometry+1 queue to make sure the impostor is drawn after all other opaque objects but before alpha
|
||||||
|
- the keepalpha parameter that allow unity to actually write the alpha we return at the end of the shader.
|
||||||
|
*/
|
||||||
|
|
||||||
|
Shader "Oculus/Underlay Impostor" {
|
||||||
|
Properties{
|
||||||
|
_Color("Color", Color) = (1,1,1,1)
|
||||||
|
_MainTex("Albedo (RGB)", 2D) = "white" {}
|
||||||
|
_Glossiness("Smoothness", Range(0,1)) = 0.5
|
||||||
|
_Metallic("Metallic", Range(0,1)) = 0.0
|
||||||
|
}
|
||||||
|
SubShader{
|
||||||
|
Tags { "Queue" = "Geometry+1" "RenderType" = "Opaque" }
|
||||||
|
LOD 200
|
||||||
|
|
||||||
|
CGPROGRAM
|
||||||
|
// Physically based Standard lighting model, and enable shadows on all light types
|
||||||
|
#pragma surface surf Standard fullforwardshadows keepalpha
|
||||||
|
|
||||||
|
// Use shader model 3.0 target, to get nicer looking lighting
|
||||||
|
#pragma target 3.0
|
||||||
|
|
||||||
|
sampler2D _MainTex;
|
||||||
|
|
||||||
|
struct Input {
|
||||||
|
float2 uv_MainTex;
|
||||||
|
};
|
||||||
|
|
||||||
|
half _Glossiness;
|
||||||
|
half _Metallic;
|
||||||
|
fixed4 _Color;
|
||||||
|
|
||||||
|
void surf(Input IN, inout SurfaceOutputStandard o) {
|
||||||
|
// Albedo comes from a texture tinted by color
|
||||||
|
fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * _Color;
|
||||||
|
o.Albedo = c.rgb;
|
||||||
|
// Metallic and smoothness come from slider variables
|
||||||
|
o.Metallic = _Metallic;
|
||||||
|
o.Smoothness = _Glossiness;
|
||||||
|
o.Alpha = 0.f;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
FallBack "Diffuse"
|
||||||
|
}
|
@ -0,0 +1,36 @@
|
|||||||
|
/*
|
||||||
|
Code for transparent object in front of the overlay
|
||||||
|
The keepalpha option is important to let unity maintain the alpha we return from the shader
|
||||||
|
*/
|
||||||
|
|
||||||
|
Shader "Oculus/Underlay Transparent Occluder" {
|
||||||
|
Properties{
|
||||||
|
_Color("Main Color", Color) = (1,1,1,1)
|
||||||
|
_MainTex("Base (RGB) Trans (A)", 2D) = "white" {}
|
||||||
|
}
|
||||||
|
SubShader{
|
||||||
|
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" }
|
||||||
|
Blend SrcAlpha OneMinusSrcAlpha
|
||||||
|
|
||||||
|
// extra pass that renders to depth buffer only
|
||||||
|
Pass{
|
||||||
|
ZWrite On
|
||||||
|
ColorMask 0
|
||||||
|
}
|
||||||
|
|
||||||
|
CGPROGRAM
|
||||||
|
#pragma surface surf Lambert keepalpha
|
||||||
|
fixed4 _Color;
|
||||||
|
struct Input {
|
||||||
|
float4 color : COLOR;
|
||||||
|
};
|
||||||
|
void surf(Input IN, inout SurfaceOutput o) {
|
||||||
|
o.Albedo = _Color.rgb;
|
||||||
|
o.Alpha = _Color.a;
|
||||||
|
}
|
||||||
|
ENDCG
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Fallback "Transparent/VertexLit"
|
||||||
|
}
|
17
Assets/Oculus/VR/Resources/Unlit Transparent Color.shader
Normal file
17
Assets/Oculus/VR/Resources/Unlit Transparent Color.shader
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
Shader "Oculus/Unlit Transparent Color" {
|
||||||
|
Properties {
|
||||||
|
_Color ("Main Color", Color) = (1,1,1,1)
|
||||||
|
}
|
||||||
|
|
||||||
|
SubShader {
|
||||||
|
Tags {"Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent"}
|
||||||
|
LOD 100
|
||||||
|
Fog {Mode Off}
|
||||||
|
|
||||||
|
ZTest Always
|
||||||
|
Blend SrcAlpha OneMinusSrcAlpha
|
||||||
|
Color [_Color]
|
||||||
|
|
||||||
|
Pass {}
|
||||||
|
}
|
||||||
|
}
|
7105
Assets/Oculus/VR/Scenes/ControllerModels.unity
Normal file
7105
Assets/Oculus/VR/Scenes/ControllerModels.unity
Normal file
File diff suppressed because it is too large
Load Diff
47147
Assets/Oculus/VR/Scenes/Cubes.unity
Normal file
47147
Assets/Oculus/VR/Scenes/Cubes.unity
Normal file
File diff suppressed because it is too large
Load Diff
1292
Assets/Oculus/VR/Scenes/HandTest.unity
Normal file
1292
Assets/Oculus/VR/Scenes/HandTest.unity
Normal file
File diff suppressed because it is too large
Load Diff
2015
Assets/Oculus/VR/Scenes/HandTest_Custom.unity
Normal file
2015
Assets/Oculus/VR/Scenes/HandTest_Custom.unity
Normal file
File diff suppressed because it is too large
Load Diff
7221
Assets/Oculus/VR/Scenes/MRC.unity
Normal file
7221
Assets/Oculus/VR/Scenes/MRC.unity
Normal file
File diff suppressed because it is too large
Load Diff
6363
Assets/Oculus/VR/Scenes/Room.unity
Normal file
6363
Assets/Oculus/VR/Scenes/Room.unity
Normal file
File diff suppressed because it is too large
Load Diff
7470
Assets/Oculus/VR/Scenes/SpectatorMode.unity
Normal file
7470
Assets/Oculus/VR/Scenes/SpectatorMode.unity
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user