diff --git a/Assets/FittsLawVR/Prefabs/Canvas.prefab b/Assets/FittsLawVR/Prefabs/Canvas.prefab new file mode 100644 index 0000000..1c32aa4 --- /dev/null +++ b/Assets/FittsLawVR/Prefabs/Canvas.prefab @@ -0,0 +1,1443 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1001 &100100000 +Prefab: + m_ObjectHideFlags: 1 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: [] + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 0} + m_RootGameObject: {fileID: 1222106366571780} + m_IsPrefabAsset: 1 +--- !u!1 &1222106366571780 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224720632774813148} + - component: {fileID: 223347616292351244} + - component: {fileID: 114639884264124080} + - component: {fileID: 222089336008002674} + - component: {fileID: 114447187588060706} + - component: {fileID: 114563415417697918} + m_Layer: 5 + m_Name: Canvas + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1300072793757438 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224639637719138810} + - component: {fileID: 222662068579130324} + - component: {fileID: 114668791054170864} + - component: {fileID: 114718433689096176} + m_Layer: 0 + m_Name: LeftMedium + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1329926865618860 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224578468027682140} + - component: {fileID: 222605649304683034} + - component: {fileID: 114661554634580074} + - component: {fileID: 114825931014251334} + m_Layer: 0 + m_Name: UpMedium + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1383124965769840 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224579954748257482} + - component: {fileID: 222346931513675838} + - component: {fileID: 114023655777658636} + - component: {fileID: 114086189665095470} + m_Layer: 0 + m_Name: LeftLong + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1540639740162224 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224762053255112640} + - component: {fileID: 222596754781067234} + - component: {fileID: 114946456638147658} + - component: {fileID: 114531434077155296} + m_Layer: 0 + m_Name: RightShort + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1575352834805242 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224558075776258700} + - component: {fileID: 222421123630087756} + - component: {fileID: 114603194434061568} + - component: {fileID: 114912380756086876} + m_Layer: 0 + m_Name: UpLong + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1599297577028528 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224999135438588286} + - component: {fileID: 222795952188418634} + - component: {fileID: 114308453952001826} + - component: {fileID: 114062093851758520} + m_Layer: 0 + m_Name: UpShort + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1679994978798384 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224209426894857326} + - component: {fileID: 222260903675769914} + - component: {fileID: 114822698690064214} + - component: {fileID: 114281474708013094} + m_Layer: 0 + m_Name: RightMedium + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1758508743825796 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224266039085603778} + - component: {fileID: 114072125749358940} + - component: {fileID: 58377436786480712} + - component: {fileID: 222107215107398658} + - component: {fileID: 114362675667547644} + - component: {fileID: 114656590209892184} + m_Layer: 0 + m_Name: StartButton + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1797085077735110 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224795365474473054} + - component: {fileID: 222927670478029134} + - component: {fileID: 114619505718955426} + - component: {fileID: 114620956565508940} + m_Layer: 0 + m_Name: LeftShort + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1814204617026824 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 6 + m_Component: + - component: {fileID: 224346185028377882} + - component: {fileID: 222491411221507294} + - component: {fileID: 114306143910496398} + - component: {fileID: 114935916494048452} + m_Layer: 0 + m_Name: RightLong + m_TagString: Dot + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!58 &58377436786480712 +CircleCollider2D: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1758508743825796} + m_Enabled: 0 + m_Density: 1 + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_UsedByEffector: 0 + m_UsedByComposite: 0 + m_Offset: {x: 0, y: 0} + serializedVersion: 2 + m_Radius: 0.1 +--- !u!114 &114023655777658636 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1383124965769840} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114062093851758520 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1599297577028528} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114308453952001826} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114072125749358940 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1758508743825796} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 472cd28b041d447a4b0f2b5c603034aa, type: 3} + m_Name: + m_EditorClassIdentifier: + trackingSpace: {fileID: 0} + primaryButton: 8192 + secondaryButton: 1024 + excludeLayers: + serializedVersion: 2 + m_Bits: 0 + raycastDistance: 500 + onHoverEnter: + m_PersistentCalls: + m_Calls: [] + m_TypeName: ControllerSelection.OVRRawRaycaster+HoverCallback, Assembly-CSharp, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + onHoverExit: + m_PersistentCalls: + m_Calls: [] + m_TypeName: ControllerSelection.OVRRawRaycaster+HoverCallback, Assembly-CSharp, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + onHover: + m_PersistentCalls: + m_Calls: [] + m_TypeName: ControllerSelection.OVRRawRaycaster+HoverCallback, Assembly-CSharp, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + onPrimarySelect: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: NextDot + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: ControllerSelection.OVRRawRaycaster+SelectionCallback, Assembly-CSharp, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + onSecondarySelect: + m_PersistentCalls: + m_Calls: [] + m_TypeName: ControllerSelection.OVRRawRaycaster+SelectionCallback, Assembly-CSharp, + Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + activeController: 0 +--- !u!114 &114086189665095470 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1383124965769840} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114023655777658636} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114281474708013094 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1679994978798384} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114822698690064214} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114306143910496398 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1814204617026824} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114308453952001826 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1599297577028528} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114362675667547644 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1758508743825796} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0, b: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114447187588060706 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1222106366571780} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -98529514, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0.8745099, g: 0.8745099, b: 0.8745099, a: 0} + 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_Texture: {fileID: 0} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 +--- !u!114 &114531434077155296 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1540639740162224} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114946456638147658} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114563415417697918 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1222106366571780} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: aee672c7b0743724ea7d0d722d5e6aa2, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreReversedGraphics: 0 + m_BlockingObjects: 0 + m_BlockingMask: + serializedVersion: 2 + m_Bits: 4294967295 +--- !u!114 &114603194434061568 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1575352834805242} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114619505718955426 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1797085077735110} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114620956565508940 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1797085077735110} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114619505718955426} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114639884264124080 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1222106366571780} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_UiScaleMode: 1 + 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!114 &114656590209892184 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1758508743825796} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114362675667547644} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: NextDot + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114661554634580074 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1329926865618860} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114668791054170864 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1300072793757438} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114718433689096176 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1300072793757438} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114668791054170864} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114822698690064214 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1679994978798384} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!114 &114825931014251334 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1329926865618860} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114661554634580074} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114912380756086876 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1575352834805242} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114603194434061568} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114935916494048452 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1814204617026824} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 1, g: 1, b: 1, a: 1} + m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 114306143910496398} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 0} + m_MethodName: BackToStart + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 + m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0, + Culture=neutral, PublicKeyToken=null +--- !u!114 &114946456638147658 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1540639740162224} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, 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: 10913, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 +--- !u!222 &222089336008002674 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1222106366571780} + m_CullTransparentMesh: 0 +--- !u!222 &222107215107398658 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1758508743825796} + m_CullTransparentMesh: 0 +--- !u!222 &222260903675769914 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1679994978798384} + m_CullTransparentMesh: 0 +--- !u!222 &222346931513675838 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1383124965769840} + m_CullTransparentMesh: 0 +--- !u!222 &222421123630087756 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1575352834805242} + m_CullTransparentMesh: 0 +--- !u!222 &222491411221507294 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1814204617026824} + m_CullTransparentMesh: 0 +--- !u!222 &222596754781067234 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1540639740162224} + m_CullTransparentMesh: 0 +--- !u!222 &222605649304683034 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1329926865618860} + m_CullTransparentMesh: 0 +--- !u!222 &222662068579130324 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1300072793757438} + m_CullTransparentMesh: 0 +--- !u!222 &222795952188418634 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1599297577028528} + m_CullTransparentMesh: 0 +--- !u!222 &222927670478029134 +CanvasRenderer: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1797085077735110} + m_CullTransparentMesh: 0 +--- !u!223 &223347616292351244 +Canvas: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1222106366571780} + m_Enabled: 1 + serializedVersion: 3 + m_RenderMode: 2 + m_Camera: {fileID: 0} + m_PlaneDistance: 1 + 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 &224209426894857326 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1679994978798384} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 2 + 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: -1073.0001, y: 905} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224266039085603778 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1758508743825796} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 0 + 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: -80.89978, y: 897.99994} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224346185028377882 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1814204617026824} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + 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: -1573.0001, y: 905} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224558075776258700 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1575352834805242} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 7 + 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: -73, y: 2404.9998} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224578468027682140 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1329926865618860} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 8 + 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: -73, y: 1905} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224579954748257482 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1383124965769840} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 4 + 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: 1427.0001, y: 905} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224639637719138810 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1300072793757438} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 5 + 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: 927.0001, y: 905} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224720632774813148 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1222106366571780} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 2.1} + m_LocalScale: {x: 0.0057666996, y: 0.0057666996, z: 0.0057666996} + m_Children: + - {fileID: 224266039085603778} + - {fileID: 224346185028377882} + - {fileID: 224209426894857326} + - {fileID: 224762053255112640} + - {fileID: 224579954748257482} + - {fileID: 224639637719138810} + - {fileID: 224795365474473054} + - {fileID: 224558075776258700} + - {fileID: 224578468027682140} + - {fileID: 224999135438588286} + m_Father: {fileID: 0} + 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: -9.7, y: -19.2} + m_SizeDelta: {x: 3731.68, y: 5511.43} + m_Pivot: {x: 0, y: 0} +--- !u!224 &224762053255112640 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1540639740162224} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 3 + 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: -572.9999, y: 905} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224795365474473054 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1797085077735110} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 6 + 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: 427.00012, y: 905} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!224 &224999135438588286 +RectTransform: + m_ObjectHideFlags: 1 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1599297577028528} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 34.000015} + m_LocalScale: {x: 1000, y: 1000, z: 1000} + m_Children: [] + m_Father: {fileID: 224720632774813148} + m_RootOrder: 9 + 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: -73, y: 1404.9998} + m_SizeDelta: {x: 0.2, y: 0.2} + m_Pivot: {x: 0.5, y: 0.5} diff --git a/Assets/FittsLawVR/Prefabs/Canvas.prefab.meta b/Assets/FittsLawVR/Prefabs/Canvas.prefab.meta new file mode 100644 index 0000000..d8b5f57 --- /dev/null +++ b/Assets/FittsLawVR/Prefabs/Canvas.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 49f39d13b583ef54c853f20f5179b584 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 100100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GoogleVR/GVRVideoPlayer.unitypackage.meta b/Assets/GoogleVR/GVRVideoPlayer.unitypackage.meta index 7071b37..bced8d2 100644 --- a/Assets/GoogleVR/GVRVideoPlayer.unitypackage.meta +++ b/Assets/GoogleVR/GVRVideoPlayer.unitypackage.meta @@ -1,7 +1,8 @@ fileFormatVersion: 2 guid: 39850532bc74a4078a24832112e8aef3 +timeCreated: 1534545520 +licenseType: Pro DefaultImporter: - externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/GoogleVR/Scripts/InstantPreview/InstantPreview.apk.meta b/Assets/GoogleVR/Scripts/InstantPreview/InstantPreview.apk.meta index 88dd0ac..a3dc343 100644 --- a/Assets/GoogleVR/Scripts/InstantPreview/InstantPreview.apk.meta +++ b/Assets/GoogleVR/Scripts/InstantPreview/InstantPreview.apk.meta @@ -1,7 +1,8 @@ fileFormatVersion: 2 guid: dc278786e6540af428ccbf7825495004 +timeCreated: 1500315262 +licenseType: Pro DefaultImporter: - externalObjects: {} userData: assetBundleName: assetBundleVariant: diff --git a/Assets/Oculus/AudioManager.meta b/Assets/Oculus/AudioManager.meta new file mode 100644 index 0000000..a774a14 --- /dev/null +++ b/Assets/Oculus/AudioManager.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e8bd6fc3bb11b734ebab29d20ce38dbe +folderAsset: yes +timeCreated: 1538788975 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Audio.meta b/Assets/Oculus/AudioManager/Audio.meta new file mode 100644 index 0000000..9b8e75b --- /dev/null +++ b/Assets/Oculus/AudioManager/Audio.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 29ab7e927676ef74a93aeedf4146f1ac +folderAsset: yes +timeCreated: 1470780399 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds.meta b/Assets/Oculus/AudioManager/Audio/TestSounds.meta new file mode 100644 index 0000000..be98549 --- /dev/null +++ b/Assets/Oculus/AudioManager/Audio/TestSounds.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 180c8a539f95cce428f820b0ba392c1f +folderAsset: yes +timeCreated: 1468506676 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01.wav b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01.wav new file mode 100644 index 0000000..cf2a6e9 Binary files /dev/null and b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01.wav differ diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01.wav.meta b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01.wav.meta new file mode 100644 index 0000000..bd6540e --- /dev/null +++ b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 485ac48a563e2bf44bb4de7ead5a1f68 +timeCreated: 1461716881 +licenseType: Store +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01a.wav b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01a.wav new file mode 100644 index 0000000..5202abd Binary files /dev/null and b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01a.wav differ diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01a.wav.meta b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01a.wav.meta new file mode 100644 index 0000000..97e8d37 --- /dev/null +++ b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_close_01a.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: d3994560fb567c34a821fd9355c10eef +timeCreated: 1461716882 +licenseType: Store +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01.wav b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01.wav new file mode 100644 index 0000000..343ccb6 Binary files /dev/null and b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01.wav differ diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01.wav.meta b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01.wav.meta new file mode 100644 index 0000000..d45cc67 --- /dev/null +++ b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 7000b4d67a1320940b363f3cf891dfff +timeCreated: 1461716881 +licenseType: Store +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01a.wav b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01a.wav new file mode 100644 index 0000000..aa7e7d1 Binary files /dev/null and b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01a.wav differ diff --git a/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01a.wav.meta b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01a.wav.meta new file mode 100644 index 0000000..f9e7fdb --- /dev/null +++ b/Assets/Oculus/AudioManager/Audio/TestSounds/metal_sliding_door_open_01a.wav.meta @@ -0,0 +1,22 @@ +fileFormatVersion: 2 +guid: 8198ccc08475a764daaf226b841a55f1 +timeCreated: 1461716882 +licenseType: Store +AudioImporter: + serializedVersion: 6 + defaultSettings: + loadType: 0 + sampleRateSetting: 0 + sampleRateOverride: 44100 + compressionFormat: 1 + quality: 1 + conversionMode: 0 + platformSettingOverrides: {} + forceToMono: 0 + normalize: 1 + preloadAudioData: 1 + loadInBackground: 0 + 3D: 1 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scenes.meta b/Assets/Oculus/AudioManager/Scenes.meta new file mode 100644 index 0000000..9823fcc --- /dev/null +++ b/Assets/Oculus/AudioManager/Scenes.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6d597fe114807b54a99033a3dae9ce0d +folderAsset: yes +timeCreated: 1470780399 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scenes/Scripts.meta b/Assets/Oculus/AudioManager/Scenes/Scripts.meta new file mode 100644 index 0000000..c1dd9fd --- /dev/null +++ b/Assets/Oculus/AudioManager/Scenes/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7ee6cbebddf12044c95f9d6eb6e40823 +folderAsset: yes +timeCreated: 1470780399 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scenes/Scripts/TestScript.cs b/Assets/Oculus/AudioManager/Scenes/Scripts/TestScript.cs new file mode 100644 index 0000000..d644397 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scenes/Scripts/TestScript.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using System.Collections; + +public class TestScript : MonoBehaviour { + + [InspectorNote( "Sound Setup", "Press '1' to play testSound1 and '2' to play testSound2")] + + public SoundFXRef testSound1; + public SoundFXRef testSound2; + + // Use this for initialization + void Start () { + + } + + + // Update is called once per frame + void Update () + { + // use attached game object location + if ( Input.GetKeyDown( KeyCode.Alpha1 ) ) + { + testSound1.PlaySoundAt( transform.position ); + } + + // hard code information + if ( Input.GetKeyDown( KeyCode.Alpha2 ) ) { + testSound2.PlaySoundAt( new Vector3( 5.0f, 0.0f, 0.0f ) ); + } + } +} diff --git a/Assets/Oculus/AudioManager/Scenes/Scripts/TestScript.cs.meta b/Assets/Oculus/AudioManager/Scenes/Scripts/TestScript.cs.meta new file mode 100644 index 0000000..e1faa97 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scenes/Scripts/TestScript.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: cfae243ecd01edd49bd439c56a8b18cf +timeCreated: 1468506975 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scenes/Test.unity b/Assets/Oculus/AudioManager/Scenes/Test.unity new file mode 100644 index 0000000..a88e0f8 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scenes/Test.unity @@ -0,0 +1,434 @@ +%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: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 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: 9 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_TemporalCoherenceThreshold: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 8 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !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 + m_NavMeshData: {fileID: 0} +--- !u!1 &767466533 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 767466535} + - component: {fileID: 767466534} + m_Layer: 0 + m_Name: AudioManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &767466534 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 767466533} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6d1d30b41806244fca035fdae2896fb7, type: 3} + m_Name: + m_EditorClassIdentifier: + makePersistent: 1 + enableSpatializedAudio: 1 + enableSpatializedFastOverride: 0 + audioMixer: {fileID: 0} + defaultMixerGroup: {fileID: 24300001, guid: 323417d454569d94fa01d511f6eb44d9, type: 2} + reservedMixerGroup: {fileID: 0} + voiceChatMixerGroup: {fileID: 0} + verboseLogging: 0 + maxSoundEmitters: 32 + volumeSoundFX: 1 + soundFxFadeSecs: 1 + audioMinFallOffDistance: 1 + audioMaxFallOffDistance: 25 + soundGroupings: + - name: Test Group + soundList: + - name: TestSound1 + playback: 0 + volume: 1 + pitchVariance: {x: 0.95, y: 1.05} + falloffDistance: {x: 1, y: 25} + falloffCurve: 2 + volumeFalloffCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1.0044228 + inSlope: -1.9459304 + outSlope: -1.9459304 + tangentMode: 0 + - serializedVersion: 2 + time: 0.27001944 + value: 0.24837627 + inSlope: -1.3226271 + outSlope: -1.3226271 + tangentMode: 0 + - serializedVersion: 2 + time: 0.99744946 + value: -0.0020017216 + inSlope: -0.42040923 + outSlope: -0.42040923 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + reverbZoneMix: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1.0044228 + inSlope: -1.9459304 + outSlope: -1.9459304 + tangentMode: 0 + - serializedVersion: 2 + time: 0.36357749 + value: 0.4567863 + inSlope: -1.3226271 + outSlope: -1.3226271 + tangentMode: 0 + - serializedVersion: 2 + time: 0.99594045 + value: 0.19572063 + inSlope: -0.107312 + outSlope: -0.107312 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spread: 0 + pctChanceToPlay: 1 + priority: 0 + delay: {x: 0, y: 0} + looping: 0 + ospProps: + enableSpatialization: 1 + useFastOverride: 1 + gain: 0 + enableInvSquare: 1 + volumetric: 0 + invSquareFalloff: {x: 1, y: 250} + soundClips: + - {fileID: 8300000, guid: 7000b4d67a1320940b363f3cf891dfff, type: 3} + - {fileID: 8300000, guid: 8198ccc08475a764daaf226b841a55f1, type: 3} + visibilityToggle: 0 + - name: TestSound2 + playback: 0 + volume: 1 + pitchVariance: {x: 0.79999995, y: 1.25} + falloffDistance: {x: 1, y: 25} + falloffCurve: 1 + volumeFalloffCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + reverbZoneMix: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + spread: 0 + pctChanceToPlay: 1 + priority: 0 + delay: {x: 0, y: 0} + looping: 0 + ospProps: + enableSpatialization: 1 + useFastOverride: 0 + gain: 0 + enableInvSquare: 0 + volumetric: 0 + invSquareFalloff: {x: 1, y: 25} + soundClips: + - {fileID: 8300000, guid: 485ac48a563e2bf44bb4de7ead5a1f68, type: 3} + - {fileID: 8300000, guid: d3994560fb567c34a821fd9355c10eef, type: 3} + visibilityToggle: 0 + mixerGroup: {fileID: 24300001, guid: 1dd706bb85d8aef4e83a6229dbd62c36, type: 2} + maxPlayingSounds: 0 + preloadAudio: 0 + volumeOverride: 1 + playingSoundCount: 0 +--- !u!4 &767466535 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 767466533} + 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: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1050355579 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1050355581} + - component: {fileID: 1050355580} + m_Layer: 0 + m_Name: TestScript + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1050355580 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1050355579} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: cfae243ecd01edd49bd439c56a8b18cf, type: 3} + m_Name: + m_EditorClassIdentifier: + testSound1: + soundFXName: TestSound1 + testSound2: + soundFXName: TestSound2 +--- !u!4 &1050355581 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1050355579} + 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: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2106254871 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2106254876} + - component: {fileID: 2106254875} + - component: {fileID: 2106254874} + - component: {fileID: 2106254873} + - component: {fileID: 2106254872} + 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 &2106254872 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106254871} + m_Enabled: 1 +--- !u!124 &2106254873 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106254871} + m_Enabled: 1 +--- !u!92 &2106254874 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106254871} + m_Enabled: 1 +--- !u!20 &2106254875 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106254871} + 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.3 + far clip plane: 1000 + field of view: 60 + orthographic: 1 + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!4 &2106254876 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2106254871} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -10} + 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} diff --git a/Assets/Oculus/AudioManager/Scenes/Test.unity.meta b/Assets/Oculus/AudioManager/Scenes/Test.unity.meta new file mode 100644 index 0000000..b8047e1 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scenes/Test.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 600e5d49b0a68254286400e32c53addc +timeCreated: 1468506358 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts.meta b/Assets/Oculus/AudioManager/Scripts.meta new file mode 100644 index 0000000..7c41c17 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 25be027379f7fce4d97ba2bcaf313019 +folderAsset: yes +timeCreated: 1470780399 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio.meta b/Assets/Oculus/AudioManager/Scripts/Audio.meta new file mode 100644 index 0000000..3a66e26 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b8c0d722519c64144a78f8fc99cd40b5 +folderAsset: yes +timeCreated: 1468505670 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/AmbienceEmitter.cs b/Assets/Oculus/AudioManager/Scripts/Audio/AmbienceEmitter.cs new file mode 100644 index 0000000..0017fbd --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/AmbienceEmitter.cs @@ -0,0 +1,113 @@ +using UnityEngine; +using System.Collections; + +/* +----------------------- + + AmbienceEmitter() + +----------------------- +*/ +public class AmbienceEmitter : MonoBehaviour { + + public SoundFXRef[] ambientSounds = new SoundFXRef[0]; + public bool autoActivate = true; + [Tooltip("Automatically play the sound randomly again when checked. Should be OFF for looping sounds")] + public bool autoRetrigger = true; + [MinMax( 2.0f, 4.0f, 0.1f, 10.0f )] + public Vector2 randomRetriggerDelaySecs = new Vector2( 2.0f, 4.0f ); + [Tooltip( "If defined, the sounds will randomly play from these transform positions, otherwise the sound will play from this transform" )] + public Transform[] playPositions = new Transform[0]; + private bool activated = false; + private int playingIdx = -1; + private float nextPlayTime = 0.0f; + private float fadeTime = 0.25f; + private int lastPosIdx = -1; + + /* + ----------------------- + Awake() + ----------------------- + */ + void Awake() { + if ( autoActivate ) { + activated = true; + nextPlayTime = Time.time + Random.Range( randomRetriggerDelaySecs.x, randomRetriggerDelaySecs.y ); + } + // verify all the play positions are valid + foreach ( Transform t in playPositions ) { + if ( t == null ) { + Debug.LogWarning( "[AmbienceEmitter] Invalid play positions in " + name ); + playPositions = new Transform[0]; + break; + } + } + } + + /* + ----------------------- + Update() + ----------------------- + */ + void Update() { + if ( activated ) { + if ( ( playingIdx == -1 ) || autoRetrigger ) { + if ( Time.time >= nextPlayTime ) { + Play(); + if ( !autoRetrigger ) { + activated = false; + } + } + } + } + } + + /* + ----------------------- + OnTriggerEnter() + ----------------------- + */ + public void OnTriggerEnter( Collider col ) { + activated = !activated; + } + + /* + ----------------------- + Play() + ----------------------- + */ + public void Play() { + Transform transformToPlayFrom = transform; + if ( playPositions.Length > 0 ) { + int idx = Random.Range( 0, playPositions.Length ); + while ( ( playPositions.Length > 1 ) && ( idx == lastPosIdx ) ) { + idx = Random.Range( 0, playPositions.Length ); + } + transformToPlayFrom = playPositions[idx]; + lastPosIdx = idx; + } + playingIdx = ambientSounds[Random.Range(0, ambientSounds.Length)].PlaySoundAt( transformToPlayFrom.position ); + if ( playingIdx != -1 ) { + AudioManager.FadeInSound( playingIdx, fadeTime ); + nextPlayTime = Time.time + Random.Range( randomRetriggerDelaySecs.x, randomRetriggerDelaySecs.y ); + } + } + + /* + ----------------------- + EnableEmitter() + ----------------------- + */ + public void EnableEmitter( bool enable ) { + activated = enable; + if ( enable ) { + Play(); + } else { + if ( playingIdx != -1 ) { + AudioManager.FadeOutSound( playingIdx, fadeTime ); + } + } + + } + +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/AmbienceEmitter.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/AmbienceEmitter.cs.meta new file mode 100644 index 0000000..e5ecd9b --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/AmbienceEmitter.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c11944691f6b9cf44a391c95cb3f7dea +timeCreated: 1455050294 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager.cs b/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager.cs new file mode 100644 index 0000000..f77c3ea --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager.cs @@ -0,0 +1,425 @@ +using UnityEngine; +using UnityEngine.Audio; +using System.Collections; +using System.Collections.Generic; +#if UNITY_EDITOR +using UnityEditor; +using System; +using System.Reflection; +#endif + +public enum PreloadSounds { + Default, // default unity behavior + Preload, // audio clips are forced to preload + ManualPreload, // audio clips are forced to not preload, preloading must be done manually +} + +public enum Fade +{ + In, + Out +} + +[System.Serializable] +public class SoundGroup { + public SoundGroup( string name ) { + this.name = name; + } + public SoundGroup() { + mixerGroup = null; + maxPlayingSounds = 0; + preloadAudio = PreloadSounds.Default; + volumeOverride = 1.0f; + } + public void IncrementPlayCount() { + playingSoundCount = Mathf.Clamp( ++playingSoundCount, 0, maxPlayingSounds ); + } + public void DecrementPlayCount() { + playingSoundCount = Mathf.Clamp( --playingSoundCount, 0, maxPlayingSounds ); + } + public bool CanPlaySound() { + return ( maxPlayingSounds == 0 ) || ( playingSoundCount < maxPlayingSounds ); + } + + public string name = string.Empty; + public SoundFX[] soundList = new SoundFX[0]; + public AudioMixerGroup mixerGroup = null; // default = AudioManager.defaultMixerGroup + [Range(0,64)] + public int maxPlayingSounds = 0; // default = 0, unlimited + // TODO: this preload behavior is not yet implemented + public PreloadSounds preloadAudio = PreloadSounds.Default; // default = true, audio clip data will be preloaded + public float volumeOverride = 1.0f; // default = 1.0 + + [HideInInspector] + public int playingSoundCount = 0; +} + +/* +----------------------- + + AudioManager + +----------------------- +*/ +public partial class AudioManager : MonoBehaviour { + + [Tooltip("Make the audio manager persistent across all scene loads")] + public bool makePersistent = true; // true = don't destroy on load + [Tooltip("Enable the OSP audio plugin features")] + public bool enableSpatializedAudio = true; // true = enable spatialized audio + [Tooltip("Always play spatialized sounds with no reflections (Default)")] + public bool enableSpatializedFastOverride = false; // true = disable spatialized reflections override + [Tooltip("The audio mixer asset used for snapshot blends, etc.")] + public AudioMixer audioMixer = null; + [Tooltip( "The audio mixer group used for the pooled emitters" )] + public AudioMixerGroup defaultMixerGroup = null; + [Tooltip( "The audio mixer group used for the reserved pool emitter" )] + public AudioMixerGroup reservedMixerGroup = null; + [Tooltip( "The audio mixer group used for voice chat" )] + public AudioMixerGroup voiceChatMixerGroup = null; + [Tooltip("Log all PlaySound calls to the Unity console")] + public bool verboseLogging = false; // true = log all PlaySounds + [Tooltip("Maximum sound emitters")] + public int maxSoundEmitters = 32; // total number of sound emitters created + [Tooltip("Default volume for all sounds modulated by individual sound FX volumes")] + public float volumeSoundFX = 1.0f; // user pref: volume of all sound FX + [Tooltip("Sound FX fade time")] + public float soundFxFadeSecs = 1.0f; // sound FX fade time + + public float audioMinFallOffDistance = 1.0f; // minimum falloff distance + public float audioMaxFallOffDistance = 25.0f; // maximum falloff distance + + public SoundGroup[] soundGroupings = new SoundGroup[0]; + + private Dictionary soundFXCache = null; + + static private AudioManager theAudioManager = null; + static private FastList names = new FastList(); + static private string[] defaultSound = new string[1] { "Default Sound" }; + static private SoundFX nullSound = new SoundFX(); + static private bool hideWarnings = false; + static public bool enableSpatialization { get { return ( theAudioManager !=null ) ? theAudioManager.enableSpatializedAudio : false; } } + + static public AudioManager Instance { get { return theAudioManager; } } + static public float NearFallOff { get { return theAudioManager.audioMinFallOffDistance; } } + static public float FarFallOff { get { return theAudioManager.audioMaxFallOffDistance; } } + static public AudioMixerGroup EmitterGroup { get { return theAudioManager.defaultMixerGroup; } } + static public AudioMixerGroup ReservedGroup { get { return theAudioManager.reservedMixerGroup; } } + static public AudioMixerGroup VoipGroup { get { return theAudioManager.voiceChatMixerGroup; } } + + /* + ----------------------- + Awake() + ----------------------- + */ + void Awake() { + Init(); + } + + /* + ----------------------- + OnDestroy() + ----------------------- + */ + void OnDestroy() { + // we only want the initialized audio manager instance cleaning up the sound emitters + if ( theAudioManager == this ) { + if ( soundEmitterParent != null ) { + Destroy( soundEmitterParent ); + } + } + ///TODO - if you change scenes you'll want to call OnPreSceneLoad to detach the sound emitters + ///from anything they might be parented to or they will get destroyed with that object + ///there should only be one instance of the AudioManager across the life of the game/app + ///GameManager.OnPreSceneLoad -= OnPreSceneLoad; + } + + /* + ----------------------- + Init() + ----------------------- + */ + void Init() { + if ( theAudioManager != null ) { + if ( Application.isPlaying && ( theAudioManager != this ) ) { + enabled = false; + } + return; + } + theAudioManager = this; + + ///TODO - if you change scenes you'll want to call OnPreSceneLoad to detach the sound emitters + ///from anything they might be parented to or they will get destroyed with that object + ///there should only be one instance of the AudioManager across the life of the game/app + ///GameManager.OnPreSceneLoad += OnPreSceneLoad; + + // make sure the first one is a null sound + nullSound.name = "Default Sound"; + + // build the sound FX cache + RebuildSoundFXCache(); + + // create the sound emitters + if ( Application.isPlaying ) { + InitializeSoundSystem(); + if ( makePersistent && ( transform.parent == null ) ) { + // don't destroy the audio manager on scene loads + DontDestroyOnLoad( gameObject ); + } + } + +#if UNITY_EDITOR + Debug.Log( "[AudioManager] Initialized..." ); +#endif + } + + /* + ----------------------- + Update() + ----------------------- + */ + void Update() { + // update the free and playing lists + UpdateFreeEmitters(); + } + + /* + ----------------------- + RebuildSoundFXCache() + ----------------------- + */ + void RebuildSoundFXCache() { + // build the SoundFX dictionary for quick name lookups + int count = 0; + for ( int group = 0; group < soundGroupings.Length; group++ ) { + count += soundGroupings[group].soundList.Length; + } + soundFXCache = new Dictionary( count + 1 ); + // add the null sound + soundFXCache.Add( nullSound.name, nullSound ); + // add the rest + for ( int group = 0; group < soundGroupings.Length; group++ ) { + for ( int i = 0; i < soundGroupings[group].soundList.Length; i++ ) { + if ( soundFXCache.ContainsKey( soundGroupings[group].soundList[i].name ) ) { + Debug.LogError( "ERROR: Duplicate Sound FX name in the audio manager: '" + soundGroupings[group].name + "' > '" + soundGroupings[group].soundList[i].name + "'" ); + } else { + soundGroupings[group].soundList[i].Group = soundGroupings[group]; + soundFXCache.Add( soundGroupings[group].soundList[i].name, soundGroupings[group].soundList[i] ); + } + } + soundGroupings[group].playingSoundCount = 0; + } + } + + /* + ----------------------- + FindSoundFX() + ----------------------- + */ + static public SoundFX FindSoundFX( string name, bool rebuildCache = false ) { +#if UNITY_EDITOR + if ( theAudioManager == null ) { + Debug.LogError( "ERROR: audio manager not yet initialized or created!" + " Time: " + Time.time ); + return null; + } +#endif + if ( string.IsNullOrEmpty( name ) ) { + return nullSound; + } + if ( rebuildCache ) { + theAudioManager.RebuildSoundFXCache(); + } + if ( !theAudioManager.soundFXCache.ContainsKey( name ) ) { +#if DEBUG_BUILD || UNITY_EDITOR + Debug.LogError( "WARNING: Missing Sound FX in cache: " + name ); +#endif + return nullSound; + } + return theAudioManager.soundFXCache[name]; + } + + /* + ----------------------- + FindAudioManager() + ----------------------- + */ + static private bool FindAudioManager() { + GameObject audioManagerObject = GameObject.Find( "AudioManager" ); + if ( ( audioManagerObject == null ) || ( audioManagerObject.GetComponent() == null ) ) { + if ( !hideWarnings ) { + Debug.LogError( "[ERROR] AudioManager object missing from hierarchy!" ); + hideWarnings = true; + } + return false; + } else { + audioManagerObject.GetComponent().Init(); + } + return true; + } + + /* + ----------------------- + GetGameObject() + ----------------------- + */ + static public GameObject GetGameObject() { + if ( theAudioManager == null ) { + if ( !FindAudioManager() ) { + return null; + } + } + return theAudioManager.gameObject; + } + + /* + ----------------------- + NameMinusGroup() + strip off the sound group from the inspector dropdown + ----------------------- + */ + static public string NameMinusGroup( string name ) { + if ( name.IndexOf( "/" ) > -1 ) { + return name.Substring( name.IndexOf( "/" ) + 1 ); + } + return name; + } + + /* + ----------------------- + GetSoundFXNames() + used by the inspector + ----------------------- + */ + static public string[] GetSoundFXNames( string currentValue, out int currentIdx ) { + currentIdx = 0; + names.Clear(); + if ( theAudioManager == null ) { + if ( !FindAudioManager() ) { + return defaultSound; + } + } + names.Add( nullSound.name ); + for ( int group = 0; group < theAudioManager.soundGroupings.Length; group++ ) { + for ( int i = 0; i < theAudioManager.soundGroupings[group].soundList.Length; i++ ) { + if ( string.Compare( currentValue, theAudioManager.soundGroupings[group].soundList[i].name, true ) == 0 ) { + currentIdx = names.Count; + } + names.Add( theAudioManager.soundGroupings[group].name + "/" + theAudioManager.soundGroupings[group].soundList[i].name ); + } + } + //names.Sort( delegate( string s1, string s2 ) { return s1.CompareTo( s2 ); } ); + return names.ToArray(); + + } +#if UNITY_EDITOR + /* + ----------------------- + OnPrefabReimported() + ----------------------- + */ + static public void OnPrefabReimported() { + if ( theAudioManager != null ) { + Debug.Log( "[AudioManager] Reimporting the sound FX cache." ); + theAudioManager.RebuildSoundFXCache(); + } + } + + /* + ----------------------- + PlaySound() + used in the editor + ----------------------- + */ + static public void PlaySound( string soundFxName ) { + if ( theAudioManager == null ) { + if ( !FindAudioManager() ) { + return; + } + } + SoundFX soundFX = FindSoundFX( soundFxName, true ); + if ( soundFX == null ) { + return; + } + AudioClip clip = soundFX.GetClip(); + if ( clip != null ) { + Assembly unityEditorAssembly = typeof(AudioImporter).Assembly; + Type audioUtilClass = unityEditorAssembly.GetType("UnityEditor.AudioUtil"); + MethodInfo method = audioUtilClass.GetMethod( + "PlayClip", + BindingFlags.Static | BindingFlags.Public, + null, + new System.Type[] { typeof(AudioClip) }, + null ); + method.Invoke( null, new object[] { clip } ); + } + } + + /* + ----------------------- + IsSoundPlaying() + used in the editor + ----------------------- + */ + static public bool IsSoundPlaying( string soundFxName ) { + if ( theAudioManager == null ) { + if ( !FindAudioManager() ) { + return false; + } + } + SoundFX soundFX = FindSoundFX( soundFxName, true ); + if ( soundFX == null ) { + return false; + } + AudioClip clip = soundFX.GetClip(); + if ( clip != null ) { + Assembly unityEditorAssembly = typeof(AudioImporter).Assembly; + Type audioUtilClass = unityEditorAssembly.GetType("UnityEditor.AudioUtil"); + MethodInfo method = audioUtilClass.GetMethod( + "IsClipPlaying", + BindingFlags.Static | BindingFlags.Public, + null, + new System.Type[] { typeof(AudioClip) }, + null ); + return Convert.ToBoolean( method.Invoke( null, new object[] { clip } ) ); + } + + return false; + } + + /* + ----------------------- + StopSound() + used in the editor + ----------------------- + */ + static public void StopSound(string soundFxName) + { + if (theAudioManager == null) + { + if (!FindAudioManager()) + { + return; + } + } + SoundFX soundFX = FindSoundFX(soundFxName, true); + if (soundFX == null) + { + return; + } + AudioClip clip = soundFX.GetClip(); + if (clip != null) + { + Assembly unityEditorAssembly = typeof(AudioImporter).Assembly; + Type audioUtilClass = unityEditorAssembly.GetType("UnityEditor.AudioUtil"); + MethodInfo method = audioUtilClass.GetMethod( + "StopClip", + BindingFlags.Static | BindingFlags.Public, + null, + new System.Type[] { typeof(AudioClip) }, + null); + method.Invoke(null, new object[] { clip }); + } + } +#endif +} + diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager.cs.meta new file mode 100644 index 0000000..02c9d03 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6d1d30b41806244fca035fdae2896fb7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager_Sound.cs b/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager_Sound.cs new file mode 100644 index 0000000..b8e8181 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager_Sound.cs @@ -0,0 +1,782 @@ +using UnityEngine; +using UnityEngine.Audio; + +//------------------------------------------------------------------------- +// Types +//------------------------------------------------------------------------- + +public enum EmitterChannel { + None = -1, + Reserved = 0, // plays on the single reserved emitter + Any // queues to the next available emitter +} + +[System.Serializable] +public class MixerSnapshot { + public AudioMixerSnapshot snapshot = null; + public float transitionTime = 0.25f; +} + +/* +----------------------- + + GameManager Sound Routines + +----------------------- +*/ +public partial class AudioManager : MonoBehaviour { + + public enum Fade { + In, + Out + } + + private float audioMaxFallOffDistanceSqr = 25.0f * 25.0f; // past this distance, sounds are ignored for the local player + + private SoundEmitter[] soundEmitters = null; // pool of sound emitters to play sounds through + + private FastList playingEmitters = new FastList(); + private FastList nextFreeEmitters = new FastList(); + + private MixerSnapshot currentSnapshot = null; + + static private GameObject soundEmitterParent = null; // parent object for the sound emitters + static private Transform staticListenerPosition = null; // play position for regular 2D sounds + + static private bool showPlayingEmitterCount = false; + static private bool forceShowEmitterCount = false; + + static private bool soundEnabled = true; + static public bool SoundEnabled { get { return soundEnabled; } } + + static readonly AnimationCurve defaultReverbZoneMix = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } ); + + /* + ----------------------- + InitializeSoundSystem() + initialize persistent sound emitter objects that live across scene loads + ----------------------- + */ + void InitializeSoundSystem() { + + int bufferLength = 960; + int numBuffers = 4; + AudioSettings.GetDSPBufferSize( out bufferLength, out numBuffers ); + if ( Application.isPlaying ) { + Debug.Log( "[AudioManager] Audio Sample Rate: " + AudioSettings.outputSampleRate ); + Debug.Log( "[AudioManager] Audio Buffer Length: " + bufferLength + " Size: " + numBuffers ); + } + + // find the audio listener for playing regular 2D sounds + AudioListener audioListenerObject = GameObject.FindObjectOfType() as AudioListener; + if ( audioListenerObject == null ) { + Debug.LogError( "[AudioManager] Missing AudioListener object! Add one to the scene." ); + } else { + staticListenerPosition = audioListenerObject.transform; + } + + // we allocate maxSoundEmitters + reserved channels + soundEmitters = new SoundEmitter[maxSoundEmitters+(int)EmitterChannel.Any]; + + // see if the sound emitters have already been created, if so, nuke it, it shouldn't exist in the scene upon load + soundEmitterParent = GameObject.Find( "__SoundEmitters__" ); + if ( soundEmitterParent != null ) { + // delete any sound emitters hanging around + Destroy( soundEmitterParent ); + } + + // create them all + soundEmitterParent = new GameObject( "__SoundEmitters__" ); + for ( int i = 0; i < maxSoundEmitters + (int)EmitterChannel.Any; i++ ) { + GameObject emitterObject = new GameObject( "SoundEmitter_" + i ); + emitterObject.transform.parent = soundEmitterParent.transform; + emitterObject.transform.position = Vector3.zero; + // don't ever save this to the scene + emitterObject.hideFlags = HideFlags.DontSaveInEditor; + // add the sound emitter components + soundEmitters[i] = emitterObject.AddComponent(); + soundEmitters[i].SetDefaultParent( soundEmitterParent.transform ); + soundEmitters[i].SetChannel( i ); + soundEmitters[i].Stop(); + // save off the original index + soundEmitters[i].originalIdx = i; + } + // reset the free emitter lists + ResetFreeEmitters(); + soundEmitterParent.hideFlags = HideFlags.DontSaveInEditor; + + audioMaxFallOffDistanceSqr = audioMaxFallOffDistance * audioMaxFallOffDistance; + } + + /* + ----------------------- + UpdateFreeEmitters() + ----------------------- + */ + void UpdateFreeEmitters() { + if ( verboseLogging ) { + if ( Input.GetKeyDown( KeyCode.A ) ) { + forceShowEmitterCount = !forceShowEmitterCount; + } + if ( forceShowEmitterCount ) { + showPlayingEmitterCount = true; + } + } + // display playing emitter count when the sound system is overwhelmed + int total = 0, veryLow = 0, low = 0, def = 0, high = 0, veryHigh = 0; + + // find emitters that are done playing and add them to the nextFreeEmitters list + for ( int i = 0; i < playingEmitters.size; ) { + if ( playingEmitters[i] == null ) { + Debug.LogError( "[AudioManager] ERROR: playingEmitters list had a null emitter! Something nuked a sound emitter!!!" ); + playingEmitters.RemoveAtFast( i ); + return; + } + if ( !playingEmitters[i].IsPlaying() ) { + // add to the free list and remove from the playing list + if ( verboseLogging ) { + if ( nextFreeEmitters.Contains( playingEmitters[i] ) ) { + Debug.LogError( "[AudioManager] ERROR: playing sound emitter already in the free emitters list!" ); + } + } + playingEmitters[i].Stop(); + nextFreeEmitters.Add( playingEmitters[i] ); + playingEmitters.RemoveAtFast( i ); + continue; + } + // debugging/profiling + if ( verboseLogging && showPlayingEmitterCount ) { + total++; + switch ( playingEmitters[i].priority ) { + case SoundPriority.VeryLow: veryLow++; break; + case SoundPriority.Low: low++; break; + case SoundPriority.Default: def++; break; + case SoundPriority.High: high++; break; + case SoundPriority.VeryHigh: veryHigh++; break; + } + } + i++; + } + if ( verboseLogging && showPlayingEmitterCount ) { + Debug.LogWarning( string.Format( "[AudioManager] Playing sounds: Total {0} | VeryLow {1} | Low {2} | Default {3} | High {4} | VeryHigh {5} | Free {6}", Fmt( total ), Fmt( veryLow ), Fmt( low ), Fmt( def ), Fmt( high ), Fmt( veryHigh ), FmtFree( nextFreeEmitters.Count ) ) ); + showPlayingEmitterCount = false; + } + } + + /* + ----------------------- + Fmt() + ----------------------- + */ + string Fmt( int count ) { + float t = count / (float)theAudioManager.maxSoundEmitters; + if ( t < 0.5f ) { + return "" + count.ToString() + ""; + } else if ( t < 0.7 ) { + return "" + count.ToString() + ""; + } else { + return "" + count.ToString() + ""; + } + } + + /* + ----------------------- + FmtFree() + ----------------------- + */ + string FmtFree( int count ) { + float t = count / (float)theAudioManager.maxSoundEmitters; + if ( t < 0.2f ) { + return "" + count.ToString() + ""; + } else if ( t < 0.3 ) { + return "" + count.ToString() + ""; + } else { + return "" + count.ToString() + ""; + } + } + + /* + ----------------------- + OnPreSceneLoad() + ----------------------- + */ + void OnPreSceneLoad() { + // move any attached sounds back to the sound emitters parent before changing levels so they don't get destroyed + Debug.Log( "[AudioManager] OnPreSceneLoad cleanup" ); + for ( int i = 0; i < soundEmitters.Length; i++ ) { + soundEmitters[i].Stop(); + soundEmitters[i].ResetParent( soundEmitterParent.transform ); + } + // reset our emitter lists + ResetFreeEmitters(); + } + + /* + ----------------------- + ResetFreeEmitters() + ----------------------- + */ + void ResetFreeEmitters() { + nextFreeEmitters.Clear(); + playingEmitters.Clear(); + for ( int i = (int)EmitterChannel.Any; i < soundEmitters.Length; i++ ) { + nextFreeEmitters.Add( soundEmitters[i] ); + } + } + + /* + ----------------------- + FadeOutSoundChannel() + utility function to fade out a playing sound channel + ----------------------- + */ + static public void FadeOutSoundChannel( int channel, float delaySecs, float fadeTime ) { + theAudioManager.soundEmitters[channel].FadeOutDelayed( delaySecs, fadeTime ); + } + + /* + ----------------------- + StopSound() + ----------------------- + */ + static public bool StopSound( int idx, bool fadeOut = true, bool stopReserved = false ) { + if ( !stopReserved && ( idx == (int)EmitterChannel.Reserved ) ) { + return false; + } + if ( !fadeOut ) { + theAudioManager.soundEmitters[idx].Stop(); + } + else { + theAudioManager.soundEmitters[idx].FadeOut( theAudioManager.soundFxFadeSecs ); + } + + return true; + } + + /* + ----------------------- + FadeInSound() + ----------------------- + */ + public static void FadeInSound( int idx, float fadeTime, float volume ) { + theAudioManager.soundEmitters[idx].FadeIn( fadeTime, volume ); + } + + /* + ----------------------- + FadeInSound() + ----------------------- + */ + public static void FadeInSound( int idx, float fadeTime ) { + theAudioManager.soundEmitters[idx].FadeIn( fadeTime ); + } + + /* + ----------------------- + FadeOutSound() + ----------------------- + */ + public static void FadeOutSound( int idx, float fadeTime ) { + theAudioManager.soundEmitters[idx].FadeOut( fadeTime ); + } + + /* + ----------------------- + StopAllSounds() + ----------------------- + */ + public static void StopAllSounds( bool fadeOut, bool stopReserved = false ) { + for ( int i = 0; i < theAudioManager.soundEmitters.Length; i++ ) { + StopSound( i, fadeOut, stopReserved ); + } + } + + /* + ----------------------- + MuteAllSounds() + ----------------------- + */ + public void MuteAllSounds( bool mute, bool muteReserved = false ) { + for ( int i = 0; i < soundEmitters.Length; i++ ) { + if ( !muteReserved && ( i == (int)EmitterChannel.Reserved ) ) { + continue; + } + soundEmitters[i].audioSource.mute = true; + } + } + + /* + ----------------------- + UnMuteAllSounds() + ----------------------- + */ + public void UnMuteAllSounds( bool unmute, bool unmuteReserved = false ) { + for ( int i = 0; i < soundEmitters.Length; i++ ) { + if ( !unmuteReserved && ( i == (int)EmitterChannel.Reserved ) ) { + continue; + } + if ( soundEmitters[i].audioSource.isPlaying ) { + soundEmitters[i].audioSource.mute = false; + } + } + } + + /* + ----------------------- + GetEmitterEndTime() + ----------------------- + */ + static public float GetEmitterEndTime( int idx ) { + return theAudioManager.soundEmitters[idx].endPlayTime; + } + + /* + ----------------------- + SetEmitterTime() + ----------------------- + */ + static public float SetEmitterTime( int idx, float time ) { + return theAudioManager.soundEmitters[idx].time = time; + } + + /* + ----------------------- + PlaySound() + ----------------------- + */ + static public int PlaySound( AudioClip clip, float volume, EmitterChannel src = EmitterChannel.Any, float delay = 0.0f, float pitchVariance = 1.0f, bool loop = false ) { + if ( !SoundEnabled ) { + return -1; + } + return PlaySoundAt( ( staticListenerPosition != null ) ? staticListenerPosition.position : Vector3.zero, clip, volume, src, delay, pitchVariance, loop ); + } + + /* + ----------------------- + FindFreeEmitter() + ----------------------- + */ + static private int FindFreeEmitter( EmitterChannel src, SoundPriority priority ) { + // default to the reserved emitter + SoundEmitter next = theAudioManager.soundEmitters[0]; + if ( src == EmitterChannel.Any ) { + // pull from the free emitter list if possible + if ( theAudioManager.nextFreeEmitters.size > 0 ) { + // return the first in the list + next = theAudioManager.nextFreeEmitters[0]; + // remove it from the free list + theAudioManager.nextFreeEmitters.RemoveAtFast( 0 ); + } else { + // no free emitters available so pull from the lowest priority sound + if ( priority == SoundPriority.VeryLow ) { + // skip low priority sounds + return -1; + } else { + // find a playing emitter that has a lower priority than what we're requesting + // TODO - we could first search for Very Low, then Low, etc ... TBD if it's worth the effort + next = theAudioManager.playingEmitters.Find( item => item != null && item.priority < priority ); + if ( next == null ) { + // last chance to find a free emitter + if ( priority < SoundPriority.Default ) { + // skip sounds less than the default priority + if ( theAudioManager.verboseLogging ) { + Debug.LogWarning( "[AudioManager] skipping sound " + priority ); + } + return -1; + } else { + // grab a default priority emitter so that we don't cannabalize a high priority sound + next = theAudioManager.playingEmitters.Find( item => item != null && item.priority <= SoundPriority.Default ); ; + } + } + if ( next != null ) { + if ( theAudioManager.verboseLogging ) { + Debug.LogWarning( "[AudioManager] cannabalizing " + next.originalIdx + " Time: " + Time.time ); + } + // remove it from the playing list + next.Stop(); + theAudioManager.playingEmitters.RemoveFast( next ); + } + } + } + } + if ( next == null ) { + Debug.LogError( "[AudioManager] ERROR - absolutely couldn't find a free emitter! Priority = " + priority + " TOO MANY PlaySound* calls!" ); + showPlayingEmitterCount = true; + return -1; + } + return next.originalIdx; + } + + /* + ----------------------- + PlaySound() + ----------------------- + */ + static public int PlaySound( SoundFX soundFX, EmitterChannel src = EmitterChannel.Any, float delay = 0.0f ) { + if ( !SoundEnabled ) { + return -1; + } + return PlaySoundAt( ( staticListenerPosition != null ) ? staticListenerPosition.position : Vector3.zero, soundFX, src, delay ); + } + + /* + ----------------------- + PlaySoundAt() + ----------------------- + */ + static public int PlaySoundAt( Vector3 position, SoundFX soundFX, EmitterChannel src = EmitterChannel.Any, float delay = 0.0f, float volumeOverride = 1.0f, float pitchMultiplier = 1.0f ) { + if ( !SoundEnabled ) { + return -1; + } + + AudioClip clip = soundFX.GetClip(); + if ( clip == null ) { + return -1; + } + + // check the distance from the local player and ignore sounds out of range + if ( staticListenerPosition != null ) { + float distFromListener = ( staticListenerPosition.position - position ).sqrMagnitude; + if ( distFromListener > theAudioManager.audioMaxFallOffDistanceSqr ) { + return -1; + } + if ( distFromListener > soundFX.MaxFalloffDistSquared ) { + return -1; + } + } + + // check max playing sounds + if ( soundFX.ReachedGroupPlayLimit() ) { + if ( theAudioManager.verboseLogging ) { + Debug.Log( "[AudioManager] PlaySoundAt() with " + soundFX.name + " skipped due to group play limit" ); + } + return -1; + } + + int idx = FindFreeEmitter( src, soundFX.priority ); + if ( idx == -1 ) { + // no free emitters - should only happen on very low priority sounds + return -1; + } + SoundEmitter emitter = theAudioManager.soundEmitters[idx]; + + // make sure to detach the emitter from a previous parent + emitter.ResetParent( soundEmitterParent.transform ); + emitter.gameObject.SetActive( true ); + + // set up the sound emitter + AudioSource audioSource = emitter.audioSource; + ONSPAudioSource osp = emitter.osp; + + audioSource.enabled = true; + audioSource.volume = Mathf.Clamp01( Mathf.Clamp01( theAudioManager.volumeSoundFX * soundFX.volume ) * volumeOverride * soundFX.GroupVolumeOverride ); + audioSource.pitch = soundFX.GetPitch() * pitchMultiplier; + audioSource.time = 0.0f; + audioSource.spatialBlend = 1.0f; + audioSource.rolloffMode = soundFX.falloffCurve; + if ( soundFX.falloffCurve == AudioRolloffMode.Custom ) { + audioSource.SetCustomCurve( AudioSourceCurveType.CustomRolloff, soundFX.volumeFalloffCurve ); + } + audioSource.SetCustomCurve( AudioSourceCurveType.ReverbZoneMix, soundFX.reverbZoneMix ); + audioSource.dopplerLevel = 0; + audioSource.clip = clip; + audioSource.spread = soundFX.spread; + audioSource.loop = soundFX.looping; + audioSource.mute = false; + audioSource.minDistance = soundFX.falloffDistance.x; + audioSource.maxDistance = soundFX.falloffDistance.y; + audioSource.outputAudioMixerGroup = soundFX.GetMixerGroup( AudioManager.EmitterGroup ); + // set the play time so we can check when sounds are done + emitter.endPlayTime = Time.time + clip.length + delay; + // cache the default volume for fading + emitter.defaultVolume = audioSource.volume; + // sound priority + emitter.priority = soundFX.priority; + // reset this + emitter.onFinished = null; + // update the sound group limits + emitter.SetPlayingSoundGroup( soundFX.Group ); + // add to the playing list + if ( src == EmitterChannel.Any ) { + theAudioManager.playingEmitters.AddUnique( emitter ); + } + + // OSP properties + if ( osp != null ) { + osp.EnableSpatialization = soundFX.ospProps.enableSpatialization; + osp.EnableRfl = theAudioManager.enableSpatializedFastOverride || soundFX.ospProps.useFastOverride ? true : false; + osp.Gain = soundFX.ospProps.gain; + osp.UseInvSqr = soundFX.ospProps.enableInvSquare; + osp.Near = soundFX.ospProps.invSquareFalloff.x; + osp.Far = soundFX.ospProps.invSquareFalloff.y; + audioSource.spatialBlend = (soundFX.ospProps.enableSpatialization) ? 1.0f : 0.8f; + + // make sure to set the properties in the audio source before playing + osp.SetParameters(ref audioSource); + } + + audioSource.transform.position = position; + + if ( theAudioManager.verboseLogging ) { + Debug.Log( "[AudioManager] PlaySoundAt() channel = " + idx + " soundFX = " + soundFX.name + " volume = " + emitter.volume + " Delay = " + delay + " time = " + Time.time + "\n" ); + } + + // play the sound + if ( delay > 0f ) { + audioSource.PlayDelayed( delay ); + } else { + audioSource.Play(); + } + + return idx; + } + + /* + ----------------------- + PlayRandomSoundAt() + ----------------------- + */ + static public int PlayRandomSoundAt( Vector3 position, AudioClip[] clips, float volume, EmitterChannel src = EmitterChannel.Any, float delay = 0.0f, float pitch = 1.0f, bool loop = false ) { + if ( ( clips == null ) || ( clips.Length == 0 ) ) { + return -1; + } + int idx = Random.Range( 0, clips.Length ); + return PlaySoundAt( position, clips[idx], volume, src, delay, pitch, loop ); + } + + /* + ----------------------- + PlaySoundAt() + ----------------------- + */ + static public int PlaySoundAt( Vector3 position, AudioClip clip, float volume = 1.0f, EmitterChannel src = EmitterChannel.Any, float delay = 0.0f, float pitch = 1.0f, bool loop = false ) { + if ( !SoundEnabled ) { + return -1; + } + + if ( clip == null ) { + return -1; + } + + // check the distance from the local player and ignore sounds out of range + if ( staticListenerPosition != null ) { + if ( ( staticListenerPosition.position - position ).sqrMagnitude > theAudioManager.audioMaxFallOffDistanceSqr ) { + // no chance of being heard + return -1; + } + } + + int idx = FindFreeEmitter( src, 0 ); + if ( idx == -1 ) { + // no free emitters - should only happen on very low priority sounds + return -1; + } + SoundEmitter emitter = theAudioManager.soundEmitters[idx]; + + // make sure to detach the emitter from a previous parent + emitter.ResetParent( soundEmitterParent.transform ); + emitter.gameObject.SetActive( true ); + + // set up the sound emitter + AudioSource audioSource = emitter.audioSource; + ONSPAudioSource osp = emitter.osp; + + audioSource.enabled = true; + audioSource.volume = Mathf.Clamp01( theAudioManager.volumeSoundFX * volume ); + audioSource.pitch = pitch; + audioSource.spatialBlend = 0.8f; + audioSource.rolloffMode = AudioRolloffMode.Linear; + audioSource.SetCustomCurve( AudioSourceCurveType.ReverbZoneMix, defaultReverbZoneMix ); + audioSource.dopplerLevel = 0.0f; + audioSource.clip = clip; + audioSource.spread = 0.0f; + audioSource.loop = loop; + audioSource.mute = false; + audioSource.minDistance = theAudioManager.audioMinFallOffDistance; + audioSource.maxDistance = theAudioManager.audioMaxFallOffDistance; + audioSource.outputAudioMixerGroup = AudioManager.EmitterGroup; + // set the play time so we can check when sounds are done + emitter.endPlayTime = Time.time + clip.length + delay; + // cache the default volume for fading + emitter.defaultVolume = audioSource.volume; + // default priority + emitter.priority = 0; + // reset this + emitter.onFinished = null; + // update the sound group limits + emitter.SetPlayingSoundGroup( null ); + // add to the playing list + if ( src == EmitterChannel.Any ) { + theAudioManager.playingEmitters.AddUnique( emitter ); + } + + // disable spatialization (by default for regular AudioClips) + if ( osp != null ) { + osp.EnableSpatialization = false; + } + + audioSource.transform.position = position; + + if ( theAudioManager.verboseLogging ) { + Debug.Log( "[AudioManager] PlaySoundAt() channel = " + idx + " clip = " + clip.name + " volume = " + emitter.volume + " Delay = " + delay + " time = " + Time.time + "\n" ); + } + + // play the sound + if ( delay > 0f ) { + audioSource.PlayDelayed( delay ); + } else { + audioSource.Play(); + } + + return idx; + } + + /* + ----------------------- + SetOnFinished() + ----------------------- + */ + public static void SetOnFinished( int emitterIdx, System.Action onFinished ) { + if ( emitterIdx >= 0 && emitterIdx < theAudioManager.maxSoundEmitters ) { + theAudioManager.soundEmitters[emitterIdx].SetOnFinished( onFinished ); + } + } + + /* + ----------------------- + SetOnFinished() + ----------------------- + */ + public static void SetOnFinished( int emitterIdx, System.Action onFinished, object obj ) { + if ( emitterIdx >= 0 && emitterIdx < theAudioManager.maxSoundEmitters ) { + theAudioManager.soundEmitters[emitterIdx].SetOnFinished( onFinished, obj ); + } + } + + /* + ----------------------- + AttachSoundToParent() + ----------------------- + */ + public static void AttachSoundToParent( int idx, Transform parent ) { + if ( theAudioManager.verboseLogging ) { + string parentName = parent.name; + if ( parent.parent != null ) { + parentName = parent.parent.name + "/" + parentName; + } + Debug.Log( "[AudioManager] ATTACHING INDEX " + idx + " to " + parentName ); + } + theAudioManager.soundEmitters[idx].ParentTo( parent ); + } + + /* + ----------------------- + DetachSoundFromParent() + ----------------------- + */ + public static void DetachSoundFromParent( int idx ) { + if ( theAudioManager.verboseLogging ) { + Debug.Log( "[AudioManager] DETACHING INDEX " + idx ); + } + theAudioManager.soundEmitters[idx].DetachFromParent(); + } + + /* + ----------------------- + DetachSoundsFromParent() + ----------------------- + */ + public static void DetachSoundsFromParent( SoundEmitter[] emitters, bool stopSounds = true ) { + if ( emitters == null ) { + return; + } + foreach ( SoundEmitter emitter in emitters ) { + if ( emitter.defaultParent != null ) { + if ( stopSounds ) { + emitter.Stop(); + } + emitter.DetachFromParent(); + // make sure it's active + emitter.gameObject.SetActive( true ); + } else { + if ( stopSounds ) { + emitter.Stop(); + } + } + } + } + + /* + ----------------------- + SetEmitterMixerGroup() + ----------------------- + */ + public static void SetEmitterMixerGroup( int idx, AudioMixerGroup mixerGroup ) { + if ( ( theAudioManager != null ) && ( idx > -1 ) ) { + theAudioManager.soundEmitters[idx].SetAudioMixer( mixerGroup ); + } + } + + /* + ----------------------- + GetActiveSnapshot() + ----------------------- + */ + public static MixerSnapshot GetActiveSnapshot() { + return ( theAudioManager != null ) ? theAudioManager.currentSnapshot : null; + } + + /* + ----------------------- + SetCurrentSnapshot() + ----------------------- + */ + public static void SetCurrentSnapshot( MixerSnapshot mixerSnapshot ) { +#if UNITY_EDITOR + if ( mixerSnapshot == null || mixerSnapshot.snapshot == null ) { + Debug.LogError( "[AudioManager] ERROR setting empty mixer snapshot!" ); + } else { + Debug.Log( "[AudioManager] Setting audio mixer snapshot: " + ( ( mixerSnapshot != null && mixerSnapshot.snapshot != null ) ? mixerSnapshot.snapshot.name : "None" ) + " Time: " + Time.time ); + } +#endif + if ( theAudioManager != null ) { + if ( ( mixerSnapshot != null ) && ( mixerSnapshot.snapshot != null ) ) { + mixerSnapshot.snapshot.TransitionTo( mixerSnapshot.transitionTime ); + } else { + mixerSnapshot = null; + } + theAudioManager.currentSnapshot = mixerSnapshot; + } + } + + /* + ----------------------- + BlendWithCurrentSnapshot() + ----------------------- + */ + public static void BlendWithCurrentSnapshot( MixerSnapshot blendSnapshot, float weight, float blendTime = 0.0f ) { + if ( theAudioManager != null ) { + if ( theAudioManager.audioMixer == null ) { + Debug.LogWarning( "[AudioManager] can't call BlendWithCurrentSnapshot if the audio mixer is not set!" ); + return; + } + if ( blendTime == 0.0f ) { + blendTime = Time.deltaTime; + } + if ( ( theAudioManager.currentSnapshot != null ) && (theAudioManager.currentSnapshot.snapshot != null ) ) { + if ( ( blendSnapshot != null ) && ( blendSnapshot.snapshot != null ) ) { + weight = Mathf.Clamp01( weight ); + if ( weight == 0.0f ) { + // revert to the default snapshot + theAudioManager.currentSnapshot.snapshot.TransitionTo( blendTime ); + } else { + AudioMixerSnapshot[] snapshots = new AudioMixerSnapshot[] { theAudioManager.currentSnapshot.snapshot, blendSnapshot.snapshot }; + float[] weights = new float[] { 1.0f - weight, weight }; + theAudioManager.audioMixer.TransitionToSnapshots( snapshots, weights, blendTime ); + } + } + } + } + } + +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager_Sound.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager_Sound.cs.meta new file mode 100644 index 0000000..b819ea7 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/AudioManager_Sound.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 41cb0f893e9a44e83b09a66c55bd7856 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor.meta b/Assets/Oculus/AudioManager/Scripts/Audio/Editor.meta new file mode 100644 index 0000000..28043d1 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 02213405caaf04aeea7876974c06fa5a +folderAsset: yes +DefaultImporter: + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioImportPostProcessor.cs b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioImportPostProcessor.cs new file mode 100644 index 0000000..c3a96f5 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioImportPostProcessor.cs @@ -0,0 +1,41 @@ +using UnityEngine; +using UnityEditor; + +/* +----------------------- +AudioImportPostProcessor() +----------------------- +*/ +public class AudioImportPostProcessor : AssetPostprocessor { + + static void OnPostprocessAllAssets( string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths ) { + AudioManager audioManager = AudioManager.Instance; + if ( audioManager != null ) { + // find the asset path to the loaded audio manager prefab +#if UNITY_2018_2_OR_NEWER + Object prefabObject = PrefabUtility.GetCorrespondingObjectFromSource( audioManager ); +#else + Object prefabObject = PrefabUtility.GetPrefabParent( audioManager ); +#endif + if ( prefabObject != null ) { + string path = AssetDatabase.GetAssetPath( prefabObject ); + // check to see if the AudioManager prefab has been reimported. + // if so, rebuild everything + foreach ( string asset in importedAssets ) { + if ( asset.ToLower() == path.ToLower() ) { + // in the event the audio manager is selected, deselect it first before reloading + Debug.Log( "[AudioManager] AudioManager prefab reloaded: " + path ); + Selection.objects = new Object[0] { }; + // unfortunately even saving the audio manager prefab will trigger this action + //string msg = "The Audio Manager was reloaded. If you are going to be making modifications to the Audio Manager, "; + //msg += "please verify you have the latest version before proceeding. If in doubt, restart Unity before making modifications."; + //EditorUtility.DisplayDialog( "Audio Manager Prefab Reloaded", msg, "OK" ); + // do the actual reload + AudioManager.OnPrefabReimported(); + break; + } + } + } + } + } +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioImportPostProcessor.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioImportPostProcessor.cs.meta new file mode 100644 index 0000000..95789e5 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioImportPostProcessor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 48902580b26e3554d992bad48087eee5 +timeCreated: 1471010515 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioManagerInspector.cs b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioManagerInspector.cs new file mode 100644 index 0000000..89285de --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioManagerInspector.cs @@ -0,0 +1,626 @@ +using UnityEngine; +using UnityEditor; +using System.Collections.Generic; + +/* +----------------------- + + AudioManagerInspector + +----------------------- +*/ +[CustomEditor(typeof(AudioManager))] +public class AudioManagerInspector : Editor { + + private AudioManager audioManager = null; + private string dragDropIdentifier = "MoveSoundFX"; + private GUIStyle customDividerStyle = null; + + /* + ----------------------- + OnInspectorGUI() + ----------------------- + */ + public override void OnInspectorGUI() { + + audioManager = target as AudioManager; + + Event e = Event.current; + + // draw the default properties + DrawDefaultProperties(); + + // draw the categories section + DrawCategories( e ); + + serializedObject.Update(); + + // draw the sound effects for the selected category + DrawSoundEffects( e ); + + serializedObject.ApplyModifiedProperties(); + + CreateStyles(); + } + + /* + ----------------------- + MarkDirty() + ----------------------- + */ + void MarkDirty() { + serializedObject.SetIsDifferentCacheDirty(); + EditorUtility.SetDirty( audioManager ); + } + + static private int selectedGroup = 0; + private int nextGroup = -1; + private int editGroup = -1; + private FastList soundGroups = new FastList(); + private FastList groups = new FastList(); + private Rect dropArea = new Rect(); + private bool addSound = false; + private int deleteSoundIdx = -1; + private int dupeSoundIdx = -1; + private bool sortSounds = false; + private bool moveQueued = false; + private int origGroup = -1; + private int origIndex = -1; + private int moveToGroup = -1; + + /* + ----------------------- + DrawDefaultProperties() + ----------------------- + */ + void DrawDefaultProperties() { + + BeginContents(); + if ( DrawHeader( "Default Properties", true ) ) { + EditorGUILayout.BeginVertical( GUI.skin.box ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "makePersistent" ), new GUIContent( "Don't Destroy on Load" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "enableSpatializedAudio" ), new GUIContent( "Enable Spatialized Audio" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "enableSpatializedFastOverride" ), new GUIContent( "Force Disable Reflections" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "audioMixer" ), new GUIContent( "Master Audio Mixer" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "defaultMixerGroup" ), new GUIContent( "Pooled Emitter Mixer Group" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "reservedMixerGroup" ), new GUIContent( "Reserved Emitter Mixer Group" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "voiceChatMixerGroup" ), new GUIContent( "Voice Chat Mixer Group" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "verboseLogging" ), new GUIContent( "Verbose Logging" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "maxSoundEmitters" ), new GUIContent( "Max Sound Emitters" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "volumeSoundFX" ), new GUIContent( "Default Volume" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "soundFxFadeSecs" ), new GUIContent( "Sound FX Fade Secs" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "audioMinFallOffDistance" ), new GUIContent( "Minimum Falloff Distance" ) ); + EditorGUILayout.PropertyField( serializedObject.FindProperty( "audioMaxFallOffDistance" ), new GUIContent( "Maximum Falloff Distance" ) ); + EditorGUILayout.EndVertical(); + serializedObject.ApplyModifiedProperties(); + } + EndContents(); + } + + /* + ----------------------- + DrawSoundGroupProperties() + ----------------------- + */ + void DrawSoundGroupProperties() { + if ( selectedGroup == -1 ) { + return; + } + + SerializedProperty soundGroupsArray = serializedObject.FindProperty( "soundGroupings" ); + if ( selectedGroup >= soundGroupsArray.arraySize ) { + return; + } + SerializedProperty soundGroup = soundGroupsArray.GetArrayElementAtIndex( selectedGroup ); + string soundGroupName = soundGroup.FindPropertyRelative( "name" ).stringValue; + if ( DrawHeader( string.Format( "{0} Properties", soundGroupName ), true ) ) { + EditorGUILayout.BeginVertical( GUI.skin.box ); + EditorGUILayout.PropertyField( soundGroup.FindPropertyRelative( "mixerGroup" ), new GUIContent( "Override Mixer Group", "Leave empty to use the Audio Manager's default mixer group" ) ); + if ( !Application.isPlaying ) { + EditorGUILayout.PropertyField( soundGroup.FindPropertyRelative( "maxPlayingSounds" ), new GUIContent( "Max Playing Sounds Limit", "Max playing sounds for this sound group, 0 = no limit" ) ); + } else { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.PropertyField( soundGroup.FindPropertyRelative( "maxPlayingSounds" ), new GUIContent( "Max Playing Sounds Limit", "Max playing sounds for this sound group, 0 = no limit" ) ); + // cast to the actual object + int playingSounds = soundGroup.FindPropertyRelative( "playingSoundCount" ).intValue; + EditorGUILayout.LabelField( string.Format( "Playing: {0}", playingSounds ), GUILayout.Width( 80.0f ) ); + EditorGUILayout.EndHorizontal(); + } + EditorGUILayout.PropertyField( soundGroup.FindPropertyRelative( "preloadAudio" ), new GUIContent( "Preload Audio Clips", "Default = No special preloading, Preload = Audio clips are set to 'Preload', Manual Preload = Audio clips are set to not 'Preload'" ) ); + EditorGUILayout.PropertyField( soundGroup.FindPropertyRelative( "volumeOverride" ), new GUIContent( "Volume Override", "All sounds played in this group will have volume scaled by this amount" ) ); + if ( soundGroup.FindPropertyRelative( "volumeOverride" ).floatValue == 0.0f ) { + EditorGUILayout.HelpBox( "With a volumeOverride of 0.0, these sounds will not play!", MessageType.Warning ); + } + EditorGUILayout.EndVertical(); + serializedObject.ApplyModifiedProperties(); + } + } + + /* + ----------------------- + DrawCategories() + ----------------------- + */ + void DrawCategories( Event e ) { + + // do any housework before we start drawing + if ( moveQueued ) { + // make a temp copy + List origSoundList = new List( audioManager.soundGroupings[origGroup].soundList ); + SoundFX temp = origSoundList[origIndex]; + List moveToSoundList = new List( audioManager.soundGroupings[moveToGroup].soundList ); + // add it to the move to group + moveToSoundList.Add( temp ); + audioManager.soundGroupings[moveToGroup].soundList = moveToSoundList.ToArray(); + // and finally, remove it from the original group + origSoundList.RemoveAt( origIndex ); + audioManager.soundGroupings[origGroup].soundList = origSoundList.ToArray(); + Debug.Log( "> Moved '" + temp.name + "' from " + "'" + audioManager.soundGroupings[origGroup].name + "' to '" + audioManager.soundGroupings[moveToGroup].name ); + MarkDirty(); + moveQueued = false; + } + // switch to the next group + if ( nextGroup > -1 ) { + selectedGroup = nextGroup; + nextGroup = -1; + } + // add a sound + if ( addSound ) { + List soundList = new List( audioManager.soundGroupings[selectedGroup].soundList ); + SoundFX soundFX = new SoundFX(); + soundFX.name = audioManager.soundGroupings[selectedGroup].name.ToLower() + "_new_unnamed_sound_fx"; + soundList.Add( soundFX ); + audioManager.soundGroupings[selectedGroup].soundList = soundList.ToArray(); + MarkDirty(); + addSound = false; + } + // sort the sounds + if ( sortSounds ) { + List soundList = new List( audioManager.soundGroupings[selectedGroup].soundList ); + soundList.Sort( delegate ( SoundFX sfx1, SoundFX sfx2 ) { return string.Compare( sfx1.name, sfx2.name ); } ); + audioManager.soundGroupings[selectedGroup].soundList = soundList.ToArray(); + MarkDirty(); + sortSounds = false; + } + // delete a sound + if ( deleteSoundIdx > -1 ) { + List soundList = new List( audioManager.soundGroupings[selectedGroup].soundList ); + soundList.RemoveAt( deleteSoundIdx ); + audioManager.soundGroupings[selectedGroup].soundList = soundList.ToArray(); + MarkDirty(); + deleteSoundIdx = -1; + } + // duplicate a sound + if ( dupeSoundIdx > -1 ) { + List soundList = new List( audioManager.soundGroupings[selectedGroup].soundList ); + SoundFX origSoundFX = soundList[dupeSoundIdx]; + // clone this soundFX + string json = JsonUtility.ToJson( origSoundFX ); + SoundFX soundFX = JsonUtility.FromJson( json ); + soundFX.name += "_duplicated"; + soundList.Insert( dupeSoundIdx + 1, soundFX ); + audioManager.soundGroupings[selectedGroup].soundList = soundList.ToArray(); + MarkDirty(); + dupeSoundIdx = -1; + } + + if ( e.type == EventType.Repaint ) { + groups.Clear(); + } + + GUILayout.Space( 6f ); + + Color defaultColor = GUI.contentColor; + BeginContents(); + + if ( DrawHeader( "Sound FX Groups", true ) ) { + EditorGUILayout.BeginVertical( GUI.skin.box ); + soundGroups.Clear(); + for ( int i = 0; i < audioManager.soundGroupings.Length; i++ ) { + soundGroups.Add( audioManager.soundGroupings[i] ); + } + for ( int i = 0; i < soundGroups.size; i++ ) { + EditorGUILayout.BeginHorizontal(); + { + if ( i == selectedGroup ) { + GUI.contentColor = ( i == editGroup ) ? Color.white : Color.yellow; + } else { + GUI.contentColor = defaultColor; + } + if ( ( e.type == EventType.KeyDown ) && ( ( e.keyCode == KeyCode.Return ) || ( e.keyCode == KeyCode.KeypadEnter ) ) ) { + // toggle editing + if ( editGroup >= 0 ) { + editGroup = -1; + } + Event.current.Use(); + } + if ( i == editGroup ) { + soundGroups[i].name = GUILayout.TextField( soundGroups[i].name, GUILayout.MinWidth( Screen.width - 80f ) ); + } else { + GUILayout.Label( soundGroups[i].name, ( i == selectedGroup ) ? EditorStyles.whiteLabel : EditorStyles.label, GUILayout.ExpandWidth( true ) ); + } + GUILayout.FlexibleSpace(); + if ( GUILayout.Button( GUIContent.none, "OL Minus", GUILayout.Width(17f) ) ) { // minus button + if ( EditorUtility.DisplayDialog( "Delete '" + soundGroups[i].name + "'", "Are you sure you want to delete the selected sound group?", "Continue", "Cancel" ) ) { + soundGroups.RemoveAt( i ); + MarkDirty(); + } + } + } + EditorGUILayout.EndHorizontal(); + // build a list of items + Rect lastRect = GUILayoutUtility.GetLastRect(); + if ( e.type == EventType.Repaint ) { + groups.Add ( new ItemRect( i, lastRect, null ) ); + } + if ( ( e.type == EventType.MouseDown ) && lastRect.Contains( e.mousePosition ) ) { + if ( ( i != selectedGroup ) || ( e.clickCount == 2 ) ) { + nextGroup = i; + if ( e.clickCount == 2 ) { + editGroup = i; + } else if ( editGroup != nextGroup ) { + editGroup = -1; + } + Repaint(); + } + } + } + // add the final plus button + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if ( GUILayout.Button( GUIContent.none, "OL Plus", GUILayout.Width(17f) ) ) { // plus button + soundGroups.Add( new SoundGroup( "unnamed sound group" ) ); + selectedGroup = editGroup = soundGroups.size - 1; + MarkDirty(); + } + EditorGUILayout.EndHorizontal(); + EditorGUILayout.EndVertical(); + + // reset the color + GUI.contentColor = defaultColor; + + // the sort and import buttons + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if ( GUILayout.Button( "Sort", GUILayout.Width( 70f ) ) ) { + soundGroups.Sort( delegate( SoundGroup sg1, SoundGroup sg2 ) { return string.Compare( sg1.name, sg2.name ); } ); + MarkDirty(); + } + EditorGUILayout.EndHorizontal(); + + // draw a rect around the selected item + if ( ( selectedGroup >= 0 ) && ( selectedGroup < groups.size ) ) { + EditorGUI.DrawRect( groups[selectedGroup].rect, new Color( 1f, 1f, 1f, 0.06f ) ); + } + + // finally move the sound groups back into the audio manager + if ( soundGroups.size > 0 ) { + audioManager.soundGroupings = soundGroups.ToArray(); + } + + // calculate the drop area rect + if ( ( e.type == EventType.Repaint ) && ( groups.size > 0 ) ) { + dropArea.x = groups[0].rect.x; + dropArea.y = groups[0].rect.y; + dropArea.width = groups[0].rect.width; + dropArea.height = ( groups[groups.size-1].rect.y - groups[0].rect.y ) + groups[groups.size-1].rect.height; + } + } + // draw the sound group properties now + DrawSoundGroupProperties(); + + EndContents(); + + EditorGUILayout.HelpBox("Create and delete sound groups by clicking + and - respectively. Double click to rename sound groups. Drag and drop sounds from below to the groups above to move them.", MessageType.Info); + + } + + public class CustomDragData{ + public int originalGroupIndex; + public int originalIndex; + public SerializedProperty originalProperty; + } + + public class ItemRect { + public ItemRect( int index, Rect rect, SerializedProperty prop ) { + this.index = index; + this.rect = rect; + this.prop = prop; + } + public int index; + public Rect rect; + public SerializedProperty prop; + } + + private FastList items = new FastList(); + + /* + ----------------------- + CreateStyles() + ----------------------- + */ + void CreateStyles() { + if ( customDividerStyle == null ) { + customDividerStyle = new GUIStyle( EditorStyles.label ); + customDividerStyle.normal.background = MakeTex( 4, 4, new Color( 0.5f, 0.5f, 0.5f, 0.25f ) ); + customDividerStyle.margin.right -= 16; + } + } + + /* + ----------------------- + MakeTex() + ----------------------- + */ + private Texture2D MakeTex( int width, int height, Color col ) { + Color[] pix = new Color[width*height]; + + for ( int i = 0; i < pix.Length; i++ ) + pix[i] = col; + + Texture2D result = new Texture2D(width, height); + result.SetPixels( pix ); + result.Apply(); + + return result; + } + + /* + ----------------------- + DrawSoundEffects() + ----------------------- + */ + void DrawSoundEffects( Event e ) { + if ( ( selectedGroup < 0 ) || ( audioManager.soundGroupings.Length == 0 ) || ( selectedGroup >= audioManager.soundGroupings.Length ) ) { + return; + } + + if ( e.type == EventType.Repaint ) { + items.Clear(); + } else { + CheckStartDrag( e ); + } + + BeginContents(); + if ( DrawHeader( "Sound Effects", true ) ) { + GUILayout.Space(3f); + GUILayout.BeginVertical( GUI.skin.box ); + + SerializedProperty soundGroupsArray = serializedObject.FindProperty( "soundGroupings" ); + SerializedProperty soundGroup = soundGroupsArray.GetArrayElementAtIndex( selectedGroup ); + SerializedProperty soundList = soundGroup.FindPropertyRelative( "soundList" ); + + CreateStyles(); + + Rect prevRect = new Rect(); + if ( soundList.arraySize > 0 ) { + // show all the sounds + for ( int i = 0; i < soundList.arraySize; i++ ) { + EditorGUI.indentLevel = 1; + SerializedProperty soundFX = soundList.GetArrayElementAtIndex( i ); + SerializedProperty visToggle = soundFX.FindPropertyRelative( "visibilityToggle" ); + EditorGUILayout.BeginHorizontal( customDividerStyle ); + { + string soundFXName = soundFX.FindPropertyRelative( "name" ).stringValue; + // save the visibility state + visToggle.boolValue = EditorGUILayout.Foldout( visToggle.boolValue, soundFXName ); + + // play button + if ( GUILayout.Button( "\u25BA", GUILayout.Width( 17f ), GUILayout.Height( 16f ) ) ) { + if ( AudioManager.IsSoundPlaying( soundFXName ) ) { + AudioManager.StopSound( soundFXName ); + } else { + AudioManager.PlaySound( soundFXName ); + } + } + } + EditorGUILayout.EndHorizontal(); + if ( visToggle.boolValue ) { + EditorGUILayout.PropertyField( soundFX, true ); + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if ( GUILayout.Button( "Delete FX", GUILayout.Width( Screen.width / 3.0f ) ) ) { + if ( EditorUtility.DisplayDialog( "Delete " + soundFX.displayName, "Are you sure?", "Yes", "No!" ) ) { + deleteSoundIdx = i; + } + } + if ( GUILayout.Button( "Duplicate FX", GUILayout.Width( Screen.width / 3.0f ) ) ) { + dupeSoundIdx = i; + } + GUILayout.FlexibleSpace(); + EditorGUILayout.EndHorizontal(); + GUILayout.Space( 10.0f ); + } + if ( e.type == EventType.Repaint ) { + // GetLastRect() is now returning the last rect drawn in the property drawer, + // not the rect used for the entire SoundFX + Rect curRect = prevRect; + curRect.y = prevRect.y + EditorGUIUtility.singleLineHeight; + Rect lastRect = GUILayoutUtility.GetLastRect(); + curRect.height = ( lastRect.y + lastRect.height ) - curRect.y; + curRect.width = Screen.width; + items.Add( new ItemRect( i, curRect, soundFX ) ); + } + prevRect = GUILayoutUtility.GetLastRect(); + } + } else { + EditorGUILayout.LabelField( " " ); + } + GUILayout.EndVertical(); + GUILayout.Space(3f); + EditorGUILayout.BeginHorizontal(); + GUILayout.FlexibleSpace(); + if ( GUILayout.Button( "Add FX", GUILayout.Width( 70f ) ) ) { + //soundList.InsertArrayElementAtIndex( soundList.arraySize ); + //MarkDirty(); + addSound = true; + } + if ( GUILayout.Button( "Sort", GUILayout.Width( 70f ) ) ) { + sortSounds = true; + } + EditorGUILayout.EndHorizontal(); + + } + EndContents(); + + UpdateDrag( e ); + + } + + /* + ----------------------- + CheckStartDrag() + ----------------------- + */ + void CheckStartDrag( Event e ) { + + if ( ( e.type == EventType.MouseDrag ) && ( e.button == 0 ) ) { + for ( int i = 0; i < items.size; i++ ) { + if ( items[i].rect.Contains( e.mousePosition ) ) { + DragAndDrop.PrepareStartDrag();// reset data + + CustomDragData dragData = new CustomDragData(); + dragData.originalGroupIndex = selectedGroup; + dragData.originalIndex = items[i].index; + dragData.originalProperty = items[i].prop; + + DragAndDrop.SetGenericData( dragDropIdentifier, dragData ); + + DragAndDrop.objectReferences = new Object[0]; + + DragAndDrop.StartDrag( dragData.originalProperty.FindPropertyRelative( "name" ).stringValue ); + e.Use(); + } + } + } + } + + /* + ----------------------- + FindGroupIndex() + ----------------------- + */ + int FindGroupIndex( Event e ) { + for ( int i = 0; i < groups.size; i++ ) { + if ( groups[i].rect.Contains( e.mousePosition ) ) { + return i; + } + } + return -1; + } + + /* + ----------------------- + UpdateDrag() + ----------------------- + */ + void UpdateDrag( Event e ) { + + CustomDragData dragData = DragAndDrop.GetGenericData( dragDropIdentifier ) as CustomDragData; + if ( dragData == null ) { + return; + } + + int groupIndex = FindGroupIndex( e ); + + switch ( e.type ) { + case EventType.DragUpdated: + if ( ( groupIndex >= 0 ) && ( groupIndex != selectedGroup ) ) { + DragAndDrop.visualMode = DragAndDropVisualMode.Move; + } else { + DragAndDrop.visualMode = DragAndDropVisualMode.Rejected; + } + e.Use(); + break; + case EventType.Repaint: + if ( ( DragAndDrop.visualMode == DragAndDropVisualMode.None ) || + ( DragAndDrop.visualMode == DragAndDropVisualMode.Rejected ) ) { + break; + } + if ( groupIndex >= 0 && groupIndex < groups.size ) { + EditorGUI.DrawRect( groups[groupIndex].rect, new Color( 0f, 1f, 0f, 0.1f ) ); + } + break; + case EventType.DragPerform: + DragAndDrop.AcceptDrag(); + // queue the sound FX move + QueueSoundFXMove( dragData.originalGroupIndex, dragData.originalIndex, groupIndex ); + e.Use(); + break; + case EventType.MouseUp: + // in case MouseDrag never occurred: + DragAndDrop.PrepareStartDrag(); + break; + } + } + + /* + ----------------------- + QueueSoundFXMove() + ----------------------- + */ + void QueueSoundFXMove( int origGroupIndex, int origSoundIndex, int newGroupIndex ) { + moveQueued = true; + origGroup = origGroupIndex; + origIndex = origSoundIndex; + moveToGroup = newGroupIndex; + } + + /* + ----------------------- + DrawHeader() + ----------------------- + */ + static public bool DrawHeader (string text) { return DrawHeader(text, text, false); } + static public bool DrawHeader (string text, string key) { return DrawHeader(text, key, false); } + static public bool DrawHeader (string text, bool forceOn) { return DrawHeader(text, text, forceOn); } + static public bool DrawHeader( string text, string key, bool forceOn ) { + bool state = EditorPrefs.GetBool(key, true); + + GUILayout.Space(3f); + if (!forceOn && !state) GUI.backgroundColor = new Color(0.8f, 0.8f, 0.8f); + GUILayout.BeginHorizontal(); + GUILayout.Space(3f); + + GUI.changed = false; + text = "" + text + ""; + if (state) text = "\u25BC " + text; + else text = "\u25B6 " + text; + if (!GUILayout.Toggle(true, text, "dragtab", GUILayout.MinWidth(20f))) state = !state; + if (GUI.changed) EditorPrefs.SetBool(key, state); + + GUILayout.Space(2f); + GUILayout.EndHorizontal(); + GUI.backgroundColor = Color.white; + if (!forceOn && !state) GUILayout.Space(3f); + return state; + } + + /* + ----------------------- + BeginContents() + ----------------------- + */ + static public void BeginContents() { + GUILayout.BeginHorizontal(); + GUILayout.Space(4f); + EditorGUILayout.BeginHorizontal(GUILayout.MinHeight(10f)); + GUILayout.BeginVertical(); + GUILayout.Space(2f); + } + + /* + ----------------------- + EndContents() + ----------------------- + */ + static public void EndContents() { + GUILayout.Space(3f); + GUILayout.EndVertical(); + EditorGUILayout.EndHorizontal(); + GUILayout.Space(3f); + GUILayout.EndHorizontal(); + GUILayout.Space(3f); + } + +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioManagerInspector.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioManagerInspector.cs.meta new file mode 100644 index 0000000..b5a07f7 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/AudioManagerInspector.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9f04a80514947486d9793cab0005447f +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MinMaxPropertyDrawer.cs b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MinMaxPropertyDrawer.cs new file mode 100644 index 0000000..528dcc1 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MinMaxPropertyDrawer.cs @@ -0,0 +1,61 @@ +using UnityEditor; +using UnityEngine; + +/* +----------------------- + + MinMaxPropertyDrawer + +----------------------- +*/ +[CustomPropertyDrawer (typeof (MinMaxAttribute))] +public class MinMaxPropertyDrawer : PropertyDrawer { + + // Provide easy access to the MinMaxAttribute for reading information from it. + MinMaxAttribute minMax { get { return ((MinMaxAttribute)attribute); } } + + /* + ----------------------- + GetPropertyHeight() + ----------------------- + */ + public override float GetPropertyHeight( SerializedProperty prop, GUIContent label ) { + return base.GetPropertyHeight( prop, label ) * 2f; + } + + /* + ----------------------- + OnGUI() + ----------------------- + */ + public override void OnGUI( Rect position, SerializedProperty property, GUIContent label ) { + Rect sliderPosition = EditorGUI.PrefixLabel( position, label ); + SerializedProperty min = property.FindPropertyRelative( "x" ); + SerializedProperty max = property.FindPropertyRelative( "y" ); + + // draw the range and the reset button first so that the slider doesn't grab all the input + Rect rangePosition = sliderPosition; + rangePosition.y += rangePosition.height * 0.5f; + rangePosition.height *= 0.5f; + Rect contentPosition = rangePosition; + EditorGUI.indentLevel = 0; + EditorGUIUtility.labelWidth = 30f; + contentPosition.width *= 0.3f; + EditorGUI.PropertyField(contentPosition, min, new GUIContent( "Min" ) ); + contentPosition.x += contentPosition.width + 20f; + EditorGUI.PropertyField( contentPosition, max, new GUIContent( "Max" ) ); + contentPosition.x += contentPosition.width + 20f; + contentPosition.width = 50.0f; + if ( GUI.Button( contentPosition, "Reset" ) ) { + min.floatValue = minMax.minDefaultVal; + max.floatValue = minMax.maxDefaultVal; + } + float minValue = min.floatValue; + float maxValue = max.floatValue; + EditorGUI.MinMaxSlider( sliderPosition, GUIContent.none, ref minValue, ref maxValue, minMax.min, minMax.max ); + // round to readable values + min.floatValue = Mathf.Round( minValue / 0.01f ) * 0.01f; + max.floatValue = Mathf.Round( maxValue / 0.01f ) * 0.01f; + } + +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MinMaxPropertyDrawer.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MinMaxPropertyDrawer.cs.meta new file mode 100644 index 0000000..1114479 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MinMaxPropertyDrawer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 225aed143a64c4a6a93f3a07656ac5cd +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MixerSnapshotPropertyDrawer.cs b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MixerSnapshotPropertyDrawer.cs new file mode 100644 index 0000000..743ba60 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MixerSnapshotPropertyDrawer.cs @@ -0,0 +1,45 @@ +using UnityEditor; +using UnityEngine; + +/* +----------------------- + + MixerSnapshotPropertyDrawer + +----------------------- +*/ +[CustomPropertyDrawer( typeof( MixerSnapshot ) )] +public class MixerSnapshotPropertyDrawer : PropertyDrawer { + + // Draw the property inside the given rect + public override void OnGUI( Rect position, SerializedProperty property, GUIContent label ) { + // Using BeginProperty / EndProperty on the parent property means that + // prefab override logic works on the entire property. + EditorGUI.BeginProperty( position, label, property ); + + // Draw label + position = EditorGUI.PrefixLabel( position, GUIUtility.GetControlID( FocusType.Passive ), label ); + + // Don't make child fields be indented + var indent = EditorGUI.indentLevel; + EditorGUI.indentLevel = 0; + EditorGUIUtility.labelWidth = 65; + + float width = ( position.width - 15.0f ) / 2.0f; + + // Calculate rects + var srcRect = new Rect( position.x, position.y, width + 20, position.height ); position.x += width + 25.0f; + var destRect = new Rect( position.x, position.y, width - 60, position.height ); position.x += width - 60.0f; + var secsRect = new Rect( position.x, position.y, 40, position.height ); + + // Draw fields - pass GUIContent.none to each so they are drawn without labels + EditorGUI.PropertyField( srcRect, property.FindPropertyRelative( "snapshot" ), GUIContent.none ); + EditorGUI.PropertyField( destRect, property.FindPropertyRelative( "transitionTime" ), new GUIContent( "Transition" ) ); + EditorGUI.LabelField( secsRect, new GUIContent( "sec(s)" ) ); + + // Set indent back to what it was + EditorGUI.indentLevel = indent; + + EditorGUI.EndProperty(); + } +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MixerSnapshotPropertyDrawer.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MixerSnapshotPropertyDrawer.cs.meta new file mode 100644 index 0000000..8116165 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/MixerSnapshotPropertyDrawer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 82a91f30f2305c14dbfd2cc3c289dc59 +timeCreated: 1472247018 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/OSPPropsPropertyDrawer.cs b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/OSPPropsPropertyDrawer.cs new file mode 100644 index 0000000..528fe4f --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/OSPPropsPropertyDrawer.cs @@ -0,0 +1,62 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + +/* +----------------------- + +OSPPropsPropertyDrawer + +----------------------- +*/ +[CustomPropertyDrawer(typeof(OSPProps))] +public class OSPPropsPropertyDrawer : PropertyDrawer { + + static float lineHeight = EditorGUIUtility.singleLineHeight + 2.0f; + static float indent = 32.0f; + // TODO - some day just enumerate these + static string[] props = new string[] { "useFastOverride", "gain", "enableInvSquare", "volumetric" , "invSquareFalloff" }; + static string[] names = new string[] { "Reflections Enabled", "Gain", "Enable Oculus Atten.", "Volumetric", "Range" }; + static int[] lines = new int[] { 1, 1, 1, 1, 2, 2 }; + /* + ----------------------- + OnGUI() + ----------------------- + */ + public override void OnGUI( Rect position, SerializedProperty prop, GUIContent label ) { + SerializedProperty playSpatializedProp = prop.FindPropertyRelative("enableSpatialization"); + position.height = lineHeight; + EditorGUI.PropertyField( position, playSpatializedProp ); + if ( playSpatializedProp.boolValue ) { + position.y += lineHeight + 4.0f; + Rect posLine = position; + posLine.x += indent; + posLine.width -= indent; + posLine.height = 1f; + GUI.Box( posLine, "" ); + position.y -= 10.0f; + for ( int i = 0; i < props.Length; i++ ) { + position.y += lineHeight; + position.height = ( lineHeight * lines[i] ); + SerializedProperty sibling = prop.FindPropertyRelative( props[i] ); + EditorGUI.PropertyField( position, sibling, new GUIContent( names[i] ) ); + } + } + } + + /* + ----------------------- + GetPropertyHeight() + ----------------------- + */ + public override float GetPropertyHeight (SerializedProperty prop, GUIContent label) { + SerializedProperty playSpatializedProp = prop.FindPropertyRelative("enableSpatialization"); + if ( !playSpatializedProp.boolValue ) { + return base.GetPropertyHeight( prop, label ); + } else { + return base.GetPropertyHeight( prop, label ) + ( lineHeight * ( props.Length + 1 ) ) + 16.0f; + } + } + +} + diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/OSPPropsPropertyDrawer.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/OSPPropsPropertyDrawer.cs.meta new file mode 100644 index 0000000..1f97341 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/OSPPropsPropertyDrawer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9fc79251b168140d68851f1e8c283514 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXPropertyDrawer.cs b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXPropertyDrawer.cs new file mode 100644 index 0000000..855ce1e --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXPropertyDrawer.cs @@ -0,0 +1,63 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + +/* +----------------------- + +SoundFXPropertyDrawer + +----------------------- +*/ +[CustomPropertyDrawer(typeof(SoundFX))] +public class SoundFXPropertyDrawer : PropertyDrawer { + + static float lineHeight = EditorGUIUtility.singleLineHeight + 2.0f; + + static string[] props = new string[] { "name", "playback", "volume", "pitchVariance", "falloffDistance", "falloffCurve", "reverbZoneMix", "spread", "pctChanceToPlay", "priority", "delay", "looping", "ospProps", "soundClips" }; + + /* + ----------------------- + OnGUI() + ----------------------- + */ + public override void OnGUI( Rect position, SerializedProperty prop, GUIContent label ) { + + EditorGUILayout.BeginVertical(); + for ( int i = 0; i < props.Length; i++ ) { + EditorGUI.indentLevel = 2; + SerializedProperty property = prop.FindPropertyRelative( props[i] ); + if ( props[i] == "reverbZoneMix" ) { + EditorGUILayout.BeginHorizontal(); + SerializedProperty reverbCurve = prop.FindPropertyRelative( "reverbZoneMix" ); + EditorGUILayout.PropertyField( reverbCurve, true, GUILayout.Width( Screen.width - 130.0f ) ); + if ( GUILayout.Button( "Reset", GUILayout.Width( 50.0f ) ) ) { + reverbCurve.animationCurveValue = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } ); + } + EditorGUILayout.EndHorizontal(); + } else { + EditorGUILayout.PropertyField( property, true, GUILayout.Width( Screen.width - 80.0f ) ); + position.y += lineHeight + 4.0f; + if ( props[i] == "falloffCurve" ) { + if ( property.enumValueIndex == (int)AudioRolloffMode.Custom ) { + EditorGUILayout.PropertyField( prop.FindPropertyRelative( "volumeFalloffCurve" ), true, GUILayout.Width( Screen.width - 80.0f ) ); + position.y += lineHeight + 4.0f; + } + } + } + } + EditorGUILayout.EndVertical(); + GUILayout.Space( 5.0f ); + } + + /* + ----------------------- + GetPropertyHeight() + ----------------------- + */ + public override float GetPropertyHeight (SerializedProperty prop, GUIContent label) { + return base.GetPropertyHeight( prop, label ); + } + +} + diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXPropertyDrawer.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXPropertyDrawer.cs.meta new file mode 100644 index 0000000..ba7613b --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXPropertyDrawer.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e791ce392b6937f47b1f7c90c6b402db +timeCreated: 1468857307 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXRefPropertyDrawer.cs b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXRefPropertyDrawer.cs new file mode 100644 index 0000000..6b58785 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXRefPropertyDrawer.cs @@ -0,0 +1,58 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; + +/* +----------------------- + +SoundFXRefPropertyDrawer + +----------------------- +*/ +[CustomPropertyDrawer(typeof(SoundFXRef))] +public class SoundFXRefPropertyDrawer : PropertyDrawer { + + static private GUIStyle disabledStyle = null; + + /* + ----------------------- + OnGUI() + ----------------------- + */ + public override void OnGUI( Rect position, SerializedProperty prop, GUIContent label ) { + int idx = 0; + Rect buttonPosition = position; + buttonPosition.x = position.x + position.width - 40f; + buttonPosition.width = 20f; + position.width = buttonPosition.x - position.x - 2f; + SerializedProperty nameProp = prop.FindPropertyRelative( "soundFXName" ); + if ( AudioManager.GetGameObject() == null ) { + if ( disabledStyle == null ) { + disabledStyle = new GUIStyle(); + disabledStyle.normal.textColor = Color.gray; + } + EditorGUI.LabelField(position, label.text, nameProp.stringValue, disabledStyle ); + } + else { + string[] soundFXNames = AudioManager.GetSoundFXNames( nameProp.stringValue, out idx ); + + idx = EditorGUI.Popup( position, label.text, idx, soundFXNames ); + nameProp.stringValue = AudioManager.NameMinusGroup( soundFXNames[idx] ); + // play button + if ( GUI.Button( buttonPosition, "\u25BA" ) ) { + if ( AudioManager.IsSoundPlaying( nameProp.stringValue ) ) { + AudioManager.StopSound( nameProp.stringValue ); + } else { + AudioManager.PlaySound( nameProp.stringValue ); + } + } + buttonPosition.x += 22.0f; + // select audio manager + if ( GUI.Button( buttonPosition, "\u2630" ) ) { + Selection.activeGameObject = AudioManager.GetGameObject(); + } + + } + } +} + diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXRefPropertyDrawer.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXRefPropertyDrawer.cs.meta new file mode 100644 index 0000000..a7af21a --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/Editor/SoundFXRefPropertyDrawer.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6204bcaba636340b48858c9f10ab9016 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/MinMaxAttribute.cs b/Assets/Oculus/AudioManager/Scripts/Audio/MinMaxAttribute.cs new file mode 100644 index 0000000..8992b7a --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/MinMaxAttribute.cs @@ -0,0 +1,21 @@ +using UnityEngine; + +/* +----------------------- + + MinMaxAttribute + +----------------------- +*/ +public class MinMaxAttribute : PropertyAttribute { + public float minDefaultVal = 1.0f; + public float maxDefaultVal = 1.0f; + public float min = 0.0f; + public float max = 1.0f; + public MinMaxAttribute( float minDefaultVal, float maxDefaultVal, float min, float max ) { + this.minDefaultVal = minDefaultVal; + this.maxDefaultVal = maxDefaultVal; + this.min = min; + this.max = max; + } +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/MinMaxAttribute.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/MinMaxAttribute.cs.meta new file mode 100644 index 0000000..5739109 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/MinMaxAttribute.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 15126f023faf44286a08bdb5bdbdb6e7 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/SoundEmitter.cs b/Assets/Oculus/AudioManager/Scripts/Audio/SoundEmitter.cs new file mode 100644 index 0000000..46ae4d3 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/SoundEmitter.cs @@ -0,0 +1,428 @@ +using UnityEngine; +using UnityEngine.Audio; +using System.Collections; + +/* +----------------------- + + SoundEmitter() + +----------------------- +*/ +public class SoundEmitter : MonoBehaviour { + public enum FadeState { + Null, + FadingIn, + FadingOut, + Ducking, + } + + // OPTIMIZE + + public float volume { get { return audioSource.volume; } set { audioSource.volume = value; } } + public float pitch { get { return audioSource.pitch; } set { audioSource.pitch = value; } } + public AudioClip clip { get { return audioSource.clip; } set { audioSource.clip = value; } } + public float time { get { return audioSource.time; } set { audioSource.time = value; } } + public float length { get { return ( audioSource.clip != null ) ? audioSource.clip.length : 0.0f; } } + public bool loop { get { return audioSource.loop; } set { audioSource.loop = value; } } + public bool mute { get { return audioSource.mute; } set { audioSource.mute = value; } } + public AudioVelocityUpdateMode velocityUpdateMode { get { return audioSource.velocityUpdateMode; } set { audioSource.velocityUpdateMode = value; } } + public bool isPlaying { get { return audioSource.isPlaying; } } + + public EmitterChannel channel = EmitterChannel.Reserved; + public bool disableSpatialization = false; + private FadeState state = FadeState.Null; + [System.NonSerialized] + [HideInInspector] + public AudioSource audioSource = null; + [System.NonSerialized] + [HideInInspector] + public SoundPriority priority = SoundPriority.Default; + [System.NonSerialized] + [HideInInspector] + public ONSPAudioSource osp = null; + [System.NonSerialized] + [HideInInspector] + public float endPlayTime = 0.0f; + private Transform lastParentTransform = null; + [System.NonSerialized] + [HideInInspector] + public float defaultVolume = 1.0f; + [System.NonSerialized] + [HideInInspector] + public Transform defaultParent = null; + [System.NonSerialized] + [HideInInspector] + public int originalIdx = -1; + [System.NonSerialized] + [HideInInspector] + public System.Action onFinished = null; + [System.NonSerialized] + [HideInInspector] + public System.Action onFinishedObject = null; + [System.NonSerialized] + [HideInInspector] + public object onFinishedParam; + [System.NonSerialized] + [HideInInspector] + public SoundGroup playingSoundGroup = null; + + /* + ----------------------- + Awake() + ----------------------- + */ + void Awake() { + // unity defaults to 'playOnAwake = true' + audioSource = GetComponent(); + if ( audioSource == null ) { + audioSource = gameObject.AddComponent(); + } + // is the spatialized audio enabled? + if ( AudioManager.enableSpatialization && !disableSpatialization ) { + osp = GetComponent(); + if ( osp == null ) { + osp = gameObject.AddComponent(); + } + } + audioSource.playOnAwake = false; + audioSource.Stop(); + } + + /* + ----------------------- + SetPlayingSoundGroup() + ----------------------- + */ + public void SetPlayingSoundGroup( SoundGroup soundGroup ) { + playingSoundGroup = soundGroup; + if ( soundGroup != null ) { + soundGroup.IncrementPlayCount(); + } + } + + /* + ----------------------- + SetOnFinished() + ----------------------- + */ + public void SetOnFinished( System.Action onFinished ) { + this.onFinished = onFinished; + } + + /* + ----------------------- + SetOnFinished() + ----------------------- + */ + public void SetOnFinished( System.Action onFinished, object obj ) { + onFinishedObject = onFinished; + onFinishedParam = obj; + } + + /* + ----------------------- + SetChannel() + ----------------------- + */ + public void SetChannel( int _channel ) { + channel = (EmitterChannel)_channel; + } + + /* + ----------------------- + SetDefaultParent() + ----------------------- + */ + public void SetDefaultParent( Transform parent ) { + defaultParent = parent; + } + + /* + ----------------------- + SetAudioMixer() + ----------------------- + */ + public void SetAudioMixer( AudioMixerGroup _mixer ) { + if ( audioSource != null ) { + audioSource.outputAudioMixerGroup = _mixer; + } + } + + /* + ----------------------- + IsPlaying() + ----------------------- + */ + public bool IsPlaying() { + if ( loop && audioSource.isPlaying ) { + return true; + } + return endPlayTime > Time.time; + } + + /* + ----------------------- + Play() + ----------------------- + */ + public void Play() { + // overrides everything + state = FadeState.Null; + endPlayTime = Time.time + length; + StopAllCoroutines(); + audioSource.Play(); + } + + /* + ----------------------- + Pause() + ----------------------- + */ + public void Pause() { + // overrides everything + state = FadeState.Null; + StopAllCoroutines(); + audioSource.Pause(); + } + + /* + ----------------------- + Stop() + ----------------------- + */ + public void Stop() { + // overrides everything + state = FadeState.Null; + StopAllCoroutines(); + if ( audioSource != null ) { + audioSource.Stop(); + } + if ( onFinished != null ) { + onFinished(); + onFinished = null; + } + if ( onFinishedObject != null ) { + onFinishedObject( onFinishedParam ); + onFinishedObject = null; + } + if ( playingSoundGroup != null ) { + playingSoundGroup.DecrementPlayCount(); + playingSoundGroup = null; + } + } + + /* + ----------------------- + GetSampleTime() + ----------------------- + */ + int GetSampleTime() { + return audioSource.clip.samples - audioSource.timeSamples; + } + + /* + ----------------------- + ParentTo() + ----------------------- + */ + public void ParentTo( Transform parent ) { + if ( lastParentTransform != null ) { + Debug.LogError( "[SoundEmitter] You must detach the sound emitter before parenting to another object!" ); + return; + } + lastParentTransform = transform.parent; + transform.parent = parent; + } + + /* + ----------------------- + DetachFromParent() + ----------------------- + */ + public void DetachFromParent() { + if ( lastParentTransform == null ) { + transform.parent = defaultParent; + return; + } + transform.parent = lastParentTransform; + lastParentTransform = null; + } + + /* + ----------------------- + ResetParent() + ----------------------- + */ + public void ResetParent( Transform parent ) { + transform.parent = parent; + lastParentTransform = null; + } + + /* + ----------------------- + SyncTo() + ----------------------- + */ + public void SyncTo( SoundEmitter other, float fadeTime, float toVolume ) { + StartCoroutine( DelayedSyncTo( other, fadeTime, toVolume ) ); + } + + /* + ----------------------- + DelayedSyncTo() + have to wait until the end of frame to do proper sync'ing + ----------------------- + */ + IEnumerator DelayedSyncTo( SoundEmitter other, float fadeTime, float toVolume ) { + yield return new WaitForEndOfFrame(); + //audio.timeSamples = other.GetSampleTime(); + //audio.time = Mathf.Min( Mathf.Max( 0.0f, other.time - other.length ), other.time ); + audioSource.time = other.time; + audioSource.Play(); + FadeTo( fadeTime, toVolume ); + } + + /* + ----------------------- + FadeTo() + ----------------------- + */ + public void FadeTo( float fadeTime, float toVolume ) { + //Log.Print( ">>> FADE TO: " + channel ); + + + // don't override a fade out + if ( state == FadeState.FadingOut ) { + //Log.Print( " ....ABORTED" ); + return; + } + state = FadeState.Ducking; + StopAllCoroutines(); + StartCoroutine( FadeSoundChannelTo( fadeTime, toVolume ) ); + } + + /* + ----------------------- + FadeIn() + ----------------------- + */ + public void FadeIn( float fadeTime, float defaultVolume ) { + + //Log.Print( ">>> FADE IN: " + channel ); + audioSource.volume = 0.0f; + state = FadeState.FadingIn; + StopAllCoroutines(); + StartCoroutine( FadeSoundChannel( 0.0f, fadeTime, Fade.In, defaultVolume ) ); + } + + /* + ----------------------- + FadeIn() + ----------------------- + */ + public void FadeIn( float fadeTime ) { + + //Log.Print( ">>> FADE IN: " + channel ); + audioSource.volume = 0.0f; + state = FadeState.FadingIn; + StopAllCoroutines(); + StartCoroutine( FadeSoundChannel( 0.0f, fadeTime, Fade.In, defaultVolume ) ); + } + + /* + ----------------------- + FadeOut() + ----------------------- + */ + public void FadeOut( float fadeTime ) { + //Log.Print( ">>> FADE OUT: " + channel ); + if ( !audioSource.isPlaying ) { + //Log.Print( " ... SKIPPING" ); + return; + } + state = FadeState.FadingOut; + StopAllCoroutines(); + StartCoroutine( FadeSoundChannel( 0.0f, fadeTime, Fade.Out, audioSource.volume ) ); + } + + /* + ----------------------- + FadeOutDelayed() + ----------------------- + */ + public void FadeOutDelayed( float delayedSecs, float fadeTime ) { + //Log.Print( ">>> FADE OUT DELAYED: " + channel ); + if ( !audioSource.isPlaying ) { + //Log.Print( " ... SKIPPING" ); + return; + } + state = FadeState.FadingOut; + StopAllCoroutines(); + StartCoroutine( FadeSoundChannel( delayedSecs, fadeTime, Fade.Out, audioSource.volume ) ); + } + + /* + ----------------------- + FadeSoundChannelTo() + ----------------------- + */ + IEnumerator FadeSoundChannelTo( float fadeTime, float toVolume ) { + float start = audioSource.volume; + float end = toVolume; + float startTime = Time.realtimeSinceStartup; + float elapsedTime = 0.0f; + + while ( elapsedTime < fadeTime ) { + elapsedTime = Time.realtimeSinceStartup - startTime; + float t = elapsedTime / fadeTime; + audioSource.volume = Mathf.Lerp( start, end, t ); + yield return 0; + } + state = FadeState.Null; + } + + /* + ----------------------- + FadeSoundChannel() + ----------------------- + */ + IEnumerator FadeSoundChannel( float delaySecs, float fadeTime, Fade fadeType, float defaultVolume ) { + if ( delaySecs > 0.0f ) { + yield return new WaitForSeconds( delaySecs ); + } + float start = ( fadeType == Fade.In ) ? 0.0f : defaultVolume; + float end = ( fadeType == Fade.In ) ? defaultVolume : 0.0f; + bool restartPlay = false; + + if ( fadeType == Fade.In ) { + if ( Time.time == 0.0f ) { + restartPlay = true; + } + audioSource.volume = 0.0f; + audioSource.Play(); + } + + float startTime = Time.realtimeSinceStartup; + float elapsedTime = 0.0f; + + while ( elapsedTime < fadeTime ) { + elapsedTime = Time.realtimeSinceStartup - startTime; + float t = elapsedTime / fadeTime; + audioSource.volume = Mathf.Lerp( start, end, t ); + yield return 0; + if ( restartPlay && ( Time.time > 0.0f ) ) { + audioSource.Play(); + restartPlay = false; + } + if ( !audioSource.isPlaying ) { + break; + } + } + + if ( fadeType == Fade.Out ) { + Stop(); + } + state = FadeState.Null; + } +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/SoundEmitter.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/SoundEmitter.cs.meta new file mode 100644 index 0000000..64b29f4 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/SoundEmitter.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: ecd24e91b27c645fc95f6c42115c13cc +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/SoundFX.cs b/Assets/Oculus/AudioManager/Scripts/Audio/SoundFX.cs new file mode 100644 index 0000000..ee91090 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/SoundFX.cs @@ -0,0 +1,306 @@ +using UnityEngine; +using UnityEngine.Audio; + +public enum SoundFXNext { + Random = 0, + Sequential = 1, +} + +public enum FreqHint { + None = 0, + Wide = 1, + Narrow = 2, +} + +public enum SoundPriority { + VeryLow = -2, + Low = -1, + Default = 0, + High = 1, + VeryHigh = 2, +} + +[System.Serializable] +public class OSPProps { + public OSPProps() { + enableSpatialization = false; + useFastOverride = false; + gain = 0.0f; + enableInvSquare = false; + volumetric = 0.0f; + invSquareFalloff = new Vector2( 1.0f, 25.0f ); + } + + [Tooltip( "Set to true to play the sound FX spatialized with binaural HRTF, default = false")] + public bool enableSpatialization = false; + [Tooltip( "Play the sound FX with reflections, default = false")] + public bool useFastOverride = false; + [Tooltip( "Boost the gain on the spatialized sound FX, default = 0.0")] + [Range( 0.0f, 24.0f )] + public float gain = 0.0f; + [Tooltip("Enable Inverse Square attenuation curve, default = false")] + public bool enableInvSquare = false; + [Tooltip("Change the sound from point source (0.0f) to a spherical volume, default = 0.0")] + [Range(0.0f, 1000.0f)] + public float volumetric = 0.0f; + [Tooltip("Set the near and far falloff value for the OSP attenuation curve, default = 1.0")] + [MinMax ( 1.0f, 25.0f, 0.0f, 250.0f )] + public Vector2 invSquareFalloff = new Vector2( 1.0f, 25.0f ); +} + +/* +----------------------- + +SoundFX + +----------------------- +*/ +[System.Serializable] +public class SoundFX { + public SoundFX() { + playback = SoundFXNext.Random; + volume = 1.0f; + pitchVariance = Vector2.one; + falloffDistance = new Vector2( 1.0f, 25.0f ); + falloffCurve = AudioRolloffMode.Linear; + volumeFalloffCurve = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } ); + reverbZoneMix = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } ); + spread = 0.0f; + pctChanceToPlay = 1.0f; + priority = SoundPriority.Default; + delay = Vector2.zero; + looping = false; + ospProps = new OSPProps(); + } + + [Tooltip( "Each sound FX should have a unique name")] + public string name = string.Empty; + [Tooltip( "Sound diversity playback option when multiple audio clips are defined, default = Random")] + public SoundFXNext playback = SoundFXNext.Random; + [Tooltip( "Default volume for this sound FX, default = 1.0")] + [Range (0.0f, 1.0f)] + public float volume = 1.0f; + [Tooltip( "Random pitch variance each time a sound FX is played, default = 1.0 (none)")] + [MinMax ( 1.0f, 1.0f, 0.0f, 2.0f )] + public Vector2 pitchVariance = Vector2.one; + [Tooltip( "Falloff distance for the sound FX, default = 1m min to 25m max")] + [MinMax ( 1.0f, 25.0f, 0.0f, 250.0f )] + public Vector2 falloffDistance = new Vector2( 1.0f, 25.0f ); + [Tooltip( "Volume falloff curve - sets how the sound FX attenuates over distance, default = Linear")] + public AudioRolloffMode falloffCurve = AudioRolloffMode.Linear; + [Tooltip( "Defines the custom volume falloff curve")] + public AnimationCurve volumeFalloffCurve = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } ); + [Tooltip( "The amount by which the signal from the AudioSource will be mixed into the global reverb associated with the Reverb Zones | Valid range is 0.0 - 1.1, default = 1.0" )] + public AnimationCurve reverbZoneMix = new AnimationCurve( new Keyframe[2] { new Keyframe( 0f, 1.0f ), new Keyframe( 1f, 1f ) } ); + [Tooltip( "Sets the spread angle (in degrees) of a 3d stereo or multichannel sound in speaker space, default = 0")] + [Range (0.0f, 360.0f)] + public float spread = 0.0f; + [Tooltip( "The percentage chance that this sound FX will play | 0.0 = none, 1.0 = 100%, default = 1.0")] + [Range (0.0f, 1.0f)] + public float pctChanceToPlay = 1.0f; + [Tooltip( "Sets the priority for this sound to play and/or to override a currently playing sound FX, default = Default")] + public SoundPriority priority = SoundPriority.Default; + [Tooltip( "Specifies the default delay when this sound FX is played, default = 0.0 secs")] + [MinMax ( 0.0f, 0.0f, 0.0f, 2.0f )] + public Vector2 delay = Vector2.zero; // this overrides any delay passed into PlaySound() or PlaySoundAt() + [Tooltip( "Set to true for the sound to loop continuously, default = false")] + public bool looping = false; + public OSPProps ospProps = new OSPProps(); + [Tooltip( "List of the audio clips assigned to this sound FX")] + public AudioClip[] soundClips = new AudioClip[1]; + // editor only - unfortunately if we set it not to serialize, we can't query it from the editor + public bool visibilityToggle = false; + // runtime vars + [System.NonSerialized] + private SoundGroup soundGroup = null; + private int lastIdx = -1; + private int playingIdx = -1; + + public int Length { get { return soundClips.Length; } } + public bool IsValid { get { return ( ( soundClips.Length != 0 ) && ( soundClips[0] != null ) ); } } + public SoundGroup Group { get { return soundGroup; } set { soundGroup = value; } } + public float MaxFalloffDistSquared { get { return falloffDistance.y * falloffDistance.y; } } + public float GroupVolumeOverride { get { return ( soundGroup != null ) ? soundGroup.volumeOverride : 1.0f; } } + + /* + ----------------------- + GetClip() + ----------------------- + */ + public AudioClip GetClip() { + if ( soundClips.Length == 0 ) { + return null; + } else if ( soundClips.Length == 1 ) { + return soundClips[0]; + } + if ( playback == SoundFXNext.Random ) { + // random, but don't pick the last one + int idx = Random.Range( 0, soundClips.Length ); + while ( idx == lastIdx ) { + idx = Random.Range( 0, soundClips.Length ); + } + lastIdx = idx; + return soundClips[idx]; + } else { + // sequential + if ( ++lastIdx >= soundClips.Length ) { + lastIdx = 0; + } + return soundClips[lastIdx]; + } + } + + /* + ----------------------- + GetMixerGroup() + ----------------------- + */ + public AudioMixerGroup GetMixerGroup( AudioMixerGroup defaultMixerGroup ) { + if ( soundGroup != null ) { + return ( soundGroup.mixerGroup != null ) ? soundGroup.mixerGroup : defaultMixerGroup; + } + return defaultMixerGroup; + } + + /* + ----------------------- + ReachedGroupPlayLimit() + ----------------------- + */ + public bool ReachedGroupPlayLimit() { + if ( soundGroup != null ) { + return !soundGroup.CanPlaySound(); + } + return false; + } + + /* + ----------------------- + GetClipLength() + ----------------------- + */ + public float GetClipLength( int idx ) { + if ( ( idx == -1 ) || ( soundClips.Length == 0 ) || ( idx >= soundClips.Length ) || ( soundClips[idx] == null ) ) { + return 0.0f; + } else { + return soundClips[idx].length; + } + } + + /* + ----------------------- + GetPitch() + ----------------------- + */ + public float GetPitch() { + return Random.Range( pitchVariance.x, pitchVariance.y ); + } + + /* + ----------------------- + PlaySound() + ----------------------- + */ + public int PlaySound( float delaySecs = 0.0f ) { + playingIdx = -1; + + if ( !IsValid ) { + return playingIdx; + } + + // check the random chance to play here to save the function calls + if ( ( pctChanceToPlay > 0.99f ) || ( Random.value < pctChanceToPlay ) ) { + if ( delay.y > 0.0f ) { + delaySecs = Random.Range( delay.x, delay.y ); + } + playingIdx = AudioManager.PlaySound( this, EmitterChannel.Any, delaySecs ); + } + + return playingIdx; + } + + /* + ----------------------- + PlaySoundAt() + ----------------------- + */ + public int PlaySoundAt( Vector3 pos, float delaySecs = 0.0f, float volumeOverride = 1.0f, float pitchMultiplier = 1.0f ) { + playingIdx = -1; + + if ( !IsValid ) { + return playingIdx; + } + + // check the random chance to play here to save the function calls + if ( ( pctChanceToPlay > 0.99f ) || ( Random.value < pctChanceToPlay ) ) { + if ( delay.y > 0.0f ) { + delaySecs = Random.Range( delay.x, delay.y ); + } + playingIdx = AudioManager.PlaySoundAt( pos, this, EmitterChannel.Any, delaySecs, volumeOverride, pitchMultiplier ); + } + + return playingIdx; + } + + /* + ----------------------- + SetOnFinished() + get a callback when the sound is finished playing + ----------------------- + */ + public void SetOnFinished( System.Action onFinished ) { + if ( playingIdx > -1 ) { + AudioManager.SetOnFinished( playingIdx, onFinished ); + } + } + + /* + ----------------------- + SetOnFinished() + get a callback with an object parameter when the sound is finished playing + ----------------------- + */ + public void SetOnFinished( System.Action onFinished, object obj ) { + if ( playingIdx > -1 ) { + AudioManager.SetOnFinished( playingIdx, onFinished, obj ); + } + } + + /* + ----------------------- + StopSound() + ----------------------- + */ + public bool StopSound() { + bool stopped = false; + + if (playingIdx > -1){ + stopped = AudioManager.StopSound(playingIdx); + playingIdx = -1; + } + + return stopped; + } + + /* + ----------------------- + AttachToParent() + ----------------------- + */ + public void AttachToParent( Transform parent) { + if (playingIdx > -1) { + AudioManager.AttachSoundToParent(playingIdx, parent); + } + } + + /* + ----------------------- + DetachFromParent() + ----------------------- + */ + public void DetachFromParent() { + if (playingIdx > -1) { + AudioManager.DetachSoundFromParent(playingIdx); + } + } +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/SoundFX.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/SoundFX.cs.meta new file mode 100644 index 0000000..54131c1 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/SoundFX.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: b0a1e5e7b5cff46a187b02100f0e4a3c +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/SoundFXRef.cs b/Assets/Oculus/AudioManager/Scripts/Audio/SoundFXRef.cs new file mode 100644 index 0000000..51f1dc4 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/SoundFXRef.cs @@ -0,0 +1,139 @@ +using UnityEngine; +using System.Collections; + +/* +----------------------- +SoundFXRef +just a references to a SoundFX.. all the SoundFX methods are called indirectly from here +----------------------- +*/ +[System.Serializable] +public class SoundFXRef { + + public string soundFXName = string.Empty; + + private bool initialized = false; + private SoundFX soundFXCached = null; + public SoundFX soundFX { + get { + if ( !initialized ) { + Init(); + } + return soundFXCached; + } + } + public string name { get { return soundFXName; } set { soundFXName = value; Init(); } } + + /* + ----------------------- + Init() + ----------------------- + */ + void Init() { + // look up the actual SoundFX object + soundFXCached = AudioManager.FindSoundFX( soundFXName ); + if ( soundFXCached == null ) { + soundFXCached = AudioManager.FindSoundFX( string.Empty ); + } + initialized = true; + } + + /* + ----------------------- + Length() + ----------------------- + */ + public int Length { get { return soundFX.Length; } } + + /* + ----------------------- + IsValid() + ----------------------- + */ + public bool IsValid { get { return soundFX.IsValid; } } + + /* + ----------------------- + GetClip() + ----------------------- + */ + public AudioClip GetClip() { + return soundFX.GetClip(); + } + + /* + ----------------------- + GetClipLength() + ----------------------- + */ + public float GetClipLength( int idx ) { + return soundFX.GetClipLength( idx ); + } + + /* + ----------------------- + PlaySound() + ----------------------- + */ + public int PlaySound( float delaySecs = 0.0f ) { + return soundFX.PlaySound( delaySecs ); + } + + /* + ----------------------- + PlaySoundAt() + ----------------------- + */ + public int PlaySoundAt( Vector3 pos, float delaySecs = 0.0f, float volume = 1.0f, float pitchMultiplier = 1.0f ) { + return soundFX.PlaySoundAt( pos, delaySecs, volume, pitchMultiplier ); + } + + /* + ----------------------- + SetOnFinished() + get a callback when the sound is finished playing + ----------------------- + */ + public void SetOnFinished( System.Action onFinished ) { + soundFX.SetOnFinished( onFinished ); + } + + /* + ----------------------- + SetOnFinished() + get a callback with an object parameter when the sound is finished playing + ----------------------- + */ + public void SetOnFinished( System.Action onFinished, object obj ) { + soundFX.SetOnFinished( onFinished, obj ); + } + + /* + ----------------------- + StopSound() + ----------------------- + */ + public bool StopSound() { + return soundFX.StopSound(); + } + + /* + ----------------------- + AttachToParent() + ----------------------- + */ + public void AttachToParent( Transform parent) + { + soundFX.AttachToParent( parent); + } + + /* + ----------------------- + DetachFromParent() + ----------------------- + */ + public void DetachFromParent() + { + soundFX.DetachFromParent(); + } +} diff --git a/Assets/Oculus/AudioManager/Scripts/Audio/SoundFXRef.cs.meta b/Assets/Oculus/AudioManager/Scripts/Audio/SoundFXRef.cs.meta new file mode 100644 index 0000000..f371711 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Audio/SoundFXRef.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 48176edab546a48de9b146105d7c5f47 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Utils.meta b/Assets/Oculus/AudioManager/Scripts/Utils.meta new file mode 100644 index 0000000..5bc01f0 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Utils.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 02268a883a27b9c4abac4ee978caec4d +folderAsset: yes +timeCreated: 1468506022 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Utils/Editor.meta b/Assets/Oculus/AudioManager/Scripts/Utils/Editor.meta new file mode 100644 index 0000000..a7fb901 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Utils/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b43e7f73d4ffc2545a17b938f63e6bc0 +folderAsset: yes +timeCreated: 1468507225 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Utils/Editor/DrawerInspectorNote.cs b/Assets/Oculus/AudioManager/Scripts/Utils/Editor/DrawerInspectorNote.cs new file mode 100644 index 0000000..db94d65 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Utils/Editor/DrawerInspectorNote.cs @@ -0,0 +1,77 @@ +using UnityEngine; +using UnityEditor; +using System.Collections; +using System.Collections.Generic; + +[CustomPropertyDrawer(typeof(InspectorNoteAttribute))] +public class DrawerInspectorNote : DecoratorDrawer +{ + public override void OnGUI( Rect position ) + { + InspectorNoteAttribute note = attribute as InspectorNoteAttribute; + + // our header is always present + Rect posLabel = position; + posLabel.y += 13; + posLabel.x -= 2; + posLabel.height += 13; + EditorGUI.LabelField(posLabel, note.header, EditorStyles.whiteLargeLabel); + + // do we have a message too? + if (!string.IsNullOrEmpty(note.message)) + { + Color color = GUI.color; + Color faded = color; + faded.a = 0.6f; + + Rect posExplain = posLabel; + posExplain.y += 15; + GUI.color = faded; + EditorGUI.LabelField(posExplain, note.message, EditorStyles.whiteMiniLabel); + GUI.color = color; + } + + Rect posLine = position; + posLine.y += string.IsNullOrEmpty(note.message) ? 30 : 42; + posLine.height = 1f; + GUI.Box(posLine, ""); + } + + public override float GetHeight() { + InspectorNoteAttribute note = attribute as InspectorNoteAttribute; + return string.IsNullOrEmpty( note.message ) ? 38 : 50; + } +} + +[CustomPropertyDrawer( typeof( InspectorCommentAttribute ) )] +public class DrawerInspectorComment : DecoratorDrawer { + public override void OnGUI( Rect position ) { + InspectorCommentAttribute comment = attribute as InspectorCommentAttribute; + + // our header is always present + Rect posLabel = position; + //posLabel.y += 13; + //posLabel.x -= 2; + //posLabel.height += 13; + //EditorGUI.LabelField( posLabel, comment.header, EditorStyles.whiteLargeLabel ); + + // do we have a message too? + if ( !string.IsNullOrEmpty( comment.message ) ) { + Color color = GUI.color; + Color faded = color; + faded.a = 0.6f; + + Rect posExplain = posLabel; + posExplain.y += 15; + GUI.color = faded; + EditorGUI.LabelField( posExplain, comment.message, EditorStyles.whiteMiniLabel ); + GUI.color = color; + } + + } + + public override float GetHeight() { + InspectorNoteAttribute note = attribute as InspectorNoteAttribute; + return string.IsNullOrEmpty( note.message ) ? 38 : 50; + } +} diff --git a/Assets/Oculus/AudioManager/Scripts/Utils/Editor/DrawerInspectorNote.cs.meta b/Assets/Oculus/AudioManager/Scripts/Utils/Editor/DrawerInspectorNote.cs.meta new file mode 100644 index 0000000..591e271 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Utils/Editor/DrawerInspectorNote.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: f244e745a5bf8412d9d81d43dff35cf5 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/AudioManager/Scripts/Utils/FastList.cs b/Assets/Oculus/AudioManager/Scripts/Utils/FastList.cs new file mode 100644 index 0000000..601c393 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Utils/FastList.cs @@ -0,0 +1,283 @@ +using UnityEngine; +using System; +using System.Collections; +using System.Collections.Generic; + +public class FastList { + + /// + /// Comparison function should return -1 if left is less than right, 1 if left is greater than right, and 0 if they match. + /// + public delegate int CompareFunc(T left, T right); + + + public T[] array = null; + public int size = 0; + + public FastList () { + } + + public FastList(int size) { + if (size > 0) { + this.size = 0; + array = new T[size]; + } + else { + this.size = 0; + } + } + + public int Count { + get { return size;} + set { } + } + + public T this[int i] { + get { return array[i];} + set { array[i] = value;} + } + + //Add item to end of list. + public void Add(T item) { + if (array == null || size == array.Length) { + Allocate(); + } + array[size] = item; + size++; + } + + //Add item to end of list if it is unique. + public void AddUnique( T item ) { + if ( array == null || size == array.Length ) { + Allocate(); + } + if ( !Contains( item ) ) { + array[size] = item; + size++; + } + } + + //Add items to the end of the list + public void AddRange( IEnumerable items ) { + foreach ( T item in items ) { + Add( item ); + } + } + + //Insert item at specified index + public void Insert(int index, T item) { + if (array == null || size == array.Length) { + Allocate(); + } + if (index < size) { + //move things back 1 + for (int i = size; i > index; i--) { + array[i] = array[i-1]; + } + array[index] = item; + size++; + } + else Add(item); + } + + //Removes specified item and keeps everything else in order + public bool Remove(T item) { + if (array != null) { + for (int i = 0; i < size; i++) { + if (item.Equals(array[i])) { //found it, push everything up + size--; + for (int j = i; j < size; j++) { + array[j] = array[j+1]; + } + array[size] = default(T); + return true; + } + } + } + return false; + } + + //Removes item at specified index while keeping everything else in order + //O(n) + public void RemoveAt(int index) { + if (array != null && size > 0 && index < size) { + size--; + for (int i = index; i < size; i++) { + array[i] = array[i+1]; + } + array[size] = default(T); + } + } + + //Removes the specified item from the list and replaces with last item. Return true if removed, false if not found. + public bool RemoveFast(T item) { + if (array != null) { + for (int i = 0; i < size; i++) { + if ( item.Equals( array[i] )) { //found + //Move last item here + if (i < (size - 1)) { + T lastItem = array[size-1]; + array[size-1] = default(T); + array[i] = lastItem; + } else { + array[i] = default(T); + } + size--; + return true; + } + } + } + return false; + } + + //Removes item at specified index and replace with last item. + public void RemoveAtFast(int index) { + if (array != null && index < size && index >= 0) { + //last element + if (index == size - 1) { + array[index] = default(T); + } + else { + T lastItem = array[size - 1]; + array[index] = lastItem; + array[size - 1] = default(T); + } + size--; + + } + } + + //Return whether an item is contained within the list + //O(n) + public bool Contains(T item) { + if (array == null || size <= 0 ) return false; + for (int i = 0; i < size; i++) { + if (array[i].Equals(item)) { return true;} + } + return false; + } + + //Returns index of specified item, or -1 if not found. + //O(n) + public int IndexOf(T item) { + if (size <= 0 || array == null) { return -1;} + for (int i = 0; i < size; i++) { + if (item.Equals(array[i])) { return i;} + } + return -1; + } + + public T Pop() { + if (array != null && size > 0) { + T lastItem = array[size-1]; + array[size-1] = default(T); + size--; + return lastItem; + } + + return default(T); + } + + public T[] ToArray() { + Trim(); + return array; + } + + public void Sort (CompareFunc comparer) { + int start = 0; + int end = size - 1; + bool changed = true; + + while (changed) { + changed = false; + + for (int i = start; i < end; i++) { + + if (comparer(array[i], array[i + 1]) > 0) { + T temp = array[i]; + array[i] = array[i+1]; + array[i+1] = temp; + changed = true; + } + else if (!changed) { + start = (i==0) ? 0 : i-1; + } + } + } + } + + public void InsertionSort(CompareFunc comparer) { + for (int i = 1; i < size; i++) { + T curr = array[i]; + int j = i; + while (j > 0 && comparer(array[j - 1], curr) > 0) { + array[j] = array[j-1]; + j--; + } + array[j] = curr; + } + } + + public IEnumerator GetEnumerator() { + if (array != null) { + for (int i = 0; i < size; i++) { + yield return array[i]; + } + } + } + + public T Find(Predicate match) { + if (match != null) { + if (array != null) { + for (int i = 0; i < size; i++) { + if (match(array[i])) { return array[i];} + } + } + } + return default(T); + } + + //Allocate more space to internal array. + void Allocate() { + T[] newArray; + if (array == null) { + newArray = new T[32]; + } + else { + newArray = new T[Mathf.Max(array.Length << 1, 32)]; + } + if (array != null && size > 0) { + array.CopyTo(newArray, 0); + } + + array = newArray; + } + + + void Trim() { + if (size > 0) { + T[] newArray = new T[size]; + for (int i = 0; i < size; i++) { + newArray[i] = array[i]; + } + array = newArray; + } + else { + array = null; + } + } + + //Set size to 0, does not delete array from memory + public void Clear() { + size = 0; + } + + //Delete array from memory + public void Release() { + Clear(); + array = null; + } + + + +} diff --git a/Assets/Oculus/AudioManager/Scripts/Utils/FastList.cs.meta b/Assets/Oculus/AudioManager/Scripts/Utils/FastList.cs.meta new file mode 100644 index 0000000..708d34f --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Utils/FastList.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 5ad95fb7eea735748bd34c963525ea21 +timeCreated: 1432749689 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/AudioManager/Scripts/Utils/InspectorNoteAttribute.cs b/Assets/Oculus/AudioManager/Scripts/Utils/InspectorNoteAttribute.cs new file mode 100644 index 0000000..0c5db7b --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Utils/InspectorNoteAttribute.cs @@ -0,0 +1,35 @@ +using UnityEngine; + +/* +----------------------- + + InspectorNoteAttribute() + +----------------------- +*/ +public class InspectorNoteAttribute : PropertyAttribute +{ + public readonly string header; + public readonly string message; + + public InspectorNoteAttribute(string header, string message = "") + { + this.header = header; + this.message = message; + } +} + +/* +----------------------- + + InspectorCommentAttribute() + +----------------------- +*/ +public class InspectorCommentAttribute : PropertyAttribute { + public readonly string message; + + public InspectorCommentAttribute( string message = "" ) { + this.message = message; + } +} diff --git a/Assets/Oculus/AudioManager/Scripts/Utils/InspectorNoteAttribute.cs.meta b/Assets/Oculus/AudioManager/Scripts/Utils/InspectorNoteAttribute.cs.meta new file mode 100644 index 0000000..f6e86d6 --- /dev/null +++ b/Assets/Oculus/AudioManager/Scripts/Utils/InspectorNoteAttribute.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4616bbe65d311471f8d71174295f4986 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/Assets/Oculus/Avatar.meta b/Assets/Oculus/Avatar.meta new file mode 100644 index 0000000..8868f27 --- /dev/null +++ b/Assets/Oculus/Avatar.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 9f086770200dde84c98766f2308b6877 +folderAsset: yes +timeCreated: 1538788975 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content.meta b/Assets/Oculus/Avatar/Content.meta new file mode 100644 index 0000000..6257510 --- /dev/null +++ b/Assets/Oculus/Avatar/Content.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b7b5af4818686f84f844c1ae9df0f700 +folderAsset: yes +timeCreated: 1466716731 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Materials.meta b/Assets/Oculus/Avatar/Content/Materials.meta new file mode 100644 index 0000000..ce02c64 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 03c5cda4272cb2746a668ce131f04c0f +folderAsset: yes +timeCreated: 1466717994 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarMaterialStateShader.cginc b/Assets/Oculus/Avatar/Content/Materials/AvatarMaterialStateShader.cginc new file mode 100644 index 0000000..34c31b7 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarMaterialStateShader.cginc @@ -0,0 +1,318 @@ +#ifndef AVATAR_UTIL_CG_INCLUDED +#define AVATAR_UTIL_CG_INCLUDED + +#include "UnityCG.cginc" + +#define SAMPLE_MODE_COLOR 0 +#define SAMPLE_MODE_TEXTURE 1 +#define SAMPLE_MODE_TEXTURE_SINGLE_CHANNEL 2 +#define SAMPLE_MODE_PARALLAX 3 +#define SAMPLE_MODE_RSRM 4 + +#define MASK_TYPE_NONE 0 +#define MASK_TYPE_POSITIONAL 1 +#define MASK_TYPE_REFLECTION 2 +#define MASK_TYPE_FRESNEL 3 +#define MASK_TYPE_PULSE 4 + +#define BLEND_MODE_ADD 0 +#define BLEND_MODE_MULTIPLY 1 + +#ifdef LAYERS_1 +#define LAYER_COUNT 1 +#elif LAYERS_2 +#define LAYER_COUNT 2 +#elif LAYERS_3 +#define LAYER_COUNT 3 +#elif LAYERS_4 +#define LAYER_COUNT 4 +#elif LAYERS_5 +#define LAYER_COUNT 5 +#elif LAYERS_6 +#define LAYER_COUNT 6 +#elif LAYERS_7 +#define LAYER_COUNT 7 +#elif LAYERS_8 +#define LAYER_COUNT 8 +#endif + +#define DECLARE_LAYER_UNIFORMS(index) \ + int _LayerSampleMode##index; \ + int _LayerBlendMode##index; \ + int _LayerMaskType##index; \ + fixed4 _LayerColor##index; \ + sampler2D _LayerSurface##index; \ + float4 _LayerSurface##index##_ST; \ + float4 _LayerSampleParameters##index; \ + float4 _LayerMaskParameters##index; \ + float4 _LayerMaskAxis##index; + +DECLARE_LAYER_UNIFORMS(0) +DECLARE_LAYER_UNIFORMS(1) +DECLARE_LAYER_UNIFORMS(2) +DECLARE_LAYER_UNIFORMS(3) +DECLARE_LAYER_UNIFORMS(4) +DECLARE_LAYER_UNIFORMS(5) +DECLARE_LAYER_UNIFORMS(6) +DECLARE_LAYER_UNIFORMS(7) + +struct VertexOutput +{ + float4 pos : SV_POSITION; + float2 texcoord : TEXCOORD0; + float3 worldPos : TEXCOORD1; + float3 worldNormal : TEXCOORD2; + float3 viewDir : TEXCOORD3; + float4 vertColor : COLOR; + +#if NORMAL_MAP_ON || PARALLAX_ON + float3 worldTangent : TANGENT; + float3 worldBitangent : TEXCOORD5; +#endif +}; + +float _Alpha; +int _BaseMaskType; +float4 _BaseMaskParameters; +float4 _BaseMaskAxis; +fixed4 _DarkMultiplier; +fixed4 _BaseColor; +sampler2D _AlphaMask; +float4 _AlphaMask_ST; +sampler2D _AlphaMask2; +float4 _AlphaMask2_ST; +sampler2D _NormalMap; +float4 _NormalMap_ST; +sampler2D _ParallaxMap; +float4 _ParallaxMap_ST; +sampler2D _RoughnessMap; +float4 _RoughnessMap_ST; +float4x4 _ProjectorWorldToLocal; + +VertexOutput vert(appdata_full v) +{ + VertexOutput o; + UNITY_INITIALIZE_OUTPUT(VertexOutput, o); + + o.texcoord = v.texcoord.xy; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + o.vertColor = v.color; + o.viewDir = normalize(_WorldSpaceCameraPos.xyz - o.worldPos); + o.worldNormal = normalize(mul(unity_ObjectToWorld, float4(v.normal, 0.0)).xyz); + +#if NORMAL_MAP_ON || PARALLAX_ON + o.worldTangent = normalize(mul(unity_ObjectToWorld, float4(v.tangent.xyz, 0.0)).xyz); + o.worldBitangent = normalize(cross(o.worldNormal, o.worldTangent) * v.tangent.w); +#endif + + o.pos = UnityObjectToClipPos(v.vertex); + return o; +} + +#ifndef NORMAL_MAP_ON +#define COMPUTE_NORMAL IN.worldNormal +#else +#define COMPUTE_NORMAL normalize(mul(lerp(float3(0, 0, 1), surfaceNormal, normalMapStrength), tangentTransform)) +#endif + +float3 ComputeColor( + VertexOutput IN, + float2 uv, +#if PARALLAX_ON || NORMAL_MAP_ON + float3x3 tangentTransform, +#endif +#ifdef NORMAL_MAP_ON + float3 surfaceNormal, +#endif + sampler2D surface, + float4 surface_ST, + fixed4 color, + int sampleMode, + float4 sampleParameters +) { + if (sampleMode == SAMPLE_MODE_TEXTURE) { + float2 panning = _Time.g * sampleParameters.xy; + return tex2D(surface, (uv + panning) * surface_ST.xy + surface_ST.zw).rgb * color.rgb; + } + else if (sampleMode == SAMPLE_MODE_TEXTURE_SINGLE_CHANNEL) { + float4 channelMask = sampleParameters; + float4 channels = tex2D(surface, uv * surface_ST.xy + surface_ST.zw); + return dot(channels, channelMask) * color.rgb; + } +#ifdef PARALLAX_ON + else if (sampleMode == SAMPLE_MODE_PARALLAX) { + float parallaxMinHeight = sampleParameters.x; + float parallaxMaxHeight = sampleParameters.y; + float parallaxValue = tex2D(_ParallaxMap, TRANSFORM_TEX(uv, _ParallaxMap)).r; + float scaledHeight = lerp(parallaxMinHeight, parallaxMaxHeight, parallaxValue); + float2 parallaxUV = mul(tangentTransform, IN.viewDir).xy * scaledHeight; + return tex2D(surface, (uv * surface_ST.xy + surface_ST.zw) + parallaxUV).rgb * color.rgb; + } +#endif + else if (sampleMode == SAMPLE_MODE_RSRM) { + float roughnessMin = sampleParameters.x; + float roughnessMax = sampleParameters.y; +#ifdef ROUGHNESS_ON + float roughnessValue = tex2D(_RoughnessMap, TRANSFORM_TEX(uv, _RoughnessMap)).r; + float scaledRoughness = lerp(roughnessMin, roughnessMax, roughnessValue); +#else + float scaledRoughness = roughnessMin; +#endif + +#ifdef NORMAL_MAP_ON + float normalMapStrength = sampleParameters.z; +#endif + float3 viewReflect = reflect(-IN.viewDir, COMPUTE_NORMAL); + float viewAngle = viewReflect.y * 0.5 + 0.5; + return tex2D(surface, float2(scaledRoughness, viewAngle)).rgb * color.rgb; + } + return color.rgb; +} + +float ComputeMask( + VertexOutput IN, +#ifdef NORMAL_MAP_ON + float3x3 tangentTransform, + float3 surfaceNormal, +#endif + int maskType, + float4 layerParameters, + float3 maskAxis +) { + if (maskType == MASK_TYPE_POSITIONAL) { + float centerDistance = layerParameters.x; + float fadeAbove = layerParameters.y; + float fadeBelow = layerParameters.z; + float3 objPos = mul(unity_WorldToObject, float4(IN.worldPos, 1.0)).xyz; + float d = dot(objPos, maskAxis); + if (d > centerDistance) { + return saturate(1.0 - (d - centerDistance) / fadeAbove); + } + else { + return saturate(1.0 - (centerDistance - d) / fadeBelow); + } + } + else if (maskType == MASK_TYPE_REFLECTION) { + float fadeStart = layerParameters.x; + float fadeEnd = layerParameters.y; +#ifdef NORMAL_MAP_ON + float normalMapStrength = layerParameters.z; +#endif + float power = layerParameters.w; + float3 viewReflect = reflect(-IN.viewDir, COMPUTE_NORMAL); + float d = max(0.0, dot(viewReflect, maskAxis)); + return saturate(1.0 - (d - fadeStart) / (fadeEnd - fadeStart)); + } + else if (maskType == MASK_TYPE_FRESNEL) { + float power = layerParameters.x; + float fadeStart = layerParameters.y; + float fadeEnd = layerParameters.z; +#ifdef NORMAL_MAP_ON + float normalMapStrength = layerParameters.w; +#endif + float d = saturate(1.0 - max(0.0, dot(IN.viewDir, COMPUTE_NORMAL))); + float p = pow(d, power); + return saturate(lerp(fadeStart, fadeEnd, p)); + } + else if (maskType == MASK_TYPE_PULSE) { + float distance = layerParameters.x; + float speed = layerParameters.y; + float power = layerParameters.z; + float3 objPos = mul(unity_WorldToObject, float4(IN.worldPos, 1.0)).xyz; + float d = dot(objPos, maskAxis); + float theta = 6.2831 * frac((d - _Time.g * speed) / distance); + return saturate(pow((sin(theta) * 0.5 + 0.5), power)); + } + else { + return 1.0; + } +} + +float3 ComputeBlend(float3 source, float3 blend, float mask, int blendMode) { + if (blendMode == BLEND_MODE_MULTIPLY) { + return source * (blend * mask); + } + else { + return source + (blend * mask); + } +} + +float4 ComputeSurface(VertexOutput IN) +{ +#if PROJECTOR_ON + float3 projectorPos = mul(_ProjectorWorldToLocal, float4(IN.worldPos, 1.0)).xyz; + if (abs(projectorPos.x) > 1.0 || abs(projectorPos.y) > 1.0 || abs(projectorPos.z) > 1.0) + { + discard; + } + float2 uv = projectorPos.xy * 0.5 + 0.5; +#else + float2 uv = IN.texcoord.xy; +#endif + + fixed4 c = _BaseColor; + IN.worldNormal = normalize(IN.worldNormal); + +#if PARALLAX_ON || NORMAL_MAP_ON + float3x3 tangentTransform = float3x3(IN.worldTangent, IN.worldBitangent, IN.worldNormal); +#endif + +#ifdef NORMAL_MAP_ON + float3 surfaceNormal = UnpackNormal(tex2D(_NormalMap, TRANSFORM_TEX(uv, _NormalMap))); +#endif + +#if PARALLAX_ON || NORMAL_MAP_ON +#ifndef NORMAL_MAP_ON +#define COLOR_INPUTS IN, uv, tangentTransform +#define MASK_INPUTS IN +#else +#define COLOR_INPUTS IN, uv, tangentTransform, surfaceNormal +#define MASK_INPUTS IN, tangentTransform, surfaceNormal +#endif +#else +#define COLOR_INPUTS IN, uv +#define MASK_INPUTS IN +#endif + +#define LAYER_COLOR(index) ComputeColor(COLOR_INPUTS, _LayerSurface##index, _LayerSurface##index##_ST, _LayerColor##index, _LayerSampleMode##index, _LayerSampleParameters##index) +#define LAYER_MASK(index) ComputeMask(MASK_INPUTS, _LayerMaskType##index, _LayerMaskParameters##index, _LayerMaskAxis##index##.xyz) +#define LAYER_BLEND(index, c) ComputeBlend(c, LAYER_COLOR(index), LAYER_MASK(index), _LayerBlendMode##index) + + c.rgb = LAYER_BLEND(0, c.rgb); +#if LAYER_COUNT > 1 + c.rgb = LAYER_BLEND(1, c.rgb); +#endif +#if LAYER_COUNT > 2 + c.rgb = LAYER_BLEND(2, c.rgb); +#endif +#if LAYER_COUNT > 3 + c.rgb = LAYER_BLEND(3, c.rgb); +#endif +#if LAYER_COUNT > 4 + c.rgb = LAYER_BLEND(4, c.rgb); +#endif +#if LAYER_COUNT > 5 + c.rgb = LAYER_BLEND(5, c.rgb); +#endif +#if LAYER_COUNT > 6 + c.rgb = LAYER_BLEND(6, c.rgb); +#endif +#if LAYER_COUNT > 7 + c.rgb = LAYER_BLEND(7, c.rgb); +#endif + +#ifdef VERTALPHA_ON + float scaledValue = IN.vertColor.a * 2.0; + float alpha0weight = max(0.0, 1.0 - scaledValue); + float alpha2weight = max(0.0, scaledValue - 1.0); + float alpha1weight = 1.0 - alpha0weight - alpha2weight; + c.a = _Alpha * c.a * (tex2D(_AlphaMask, TRANSFORM_TEX(uv, _AlphaMask)).r * alpha1weight + tex2D(_AlphaMask2, TRANSFORM_TEX(uv, _AlphaMask2)).r * alpha2weight + alpha0weight) * ComputeMask(MASK_INPUTS, _BaseMaskType, _BaseMaskParameters, _BaseMaskAxis); +#else + c.a = _Alpha * c.a * tex2D(_AlphaMask, TRANSFORM_TEX(uv, _AlphaMask)).r * IN.vertColor.a * ComputeMask(MASK_INPUTS, _BaseMaskType, _BaseMaskParameters, _BaseMaskAxis); +#endif + c.rgb = lerp(c.rgb, c.rgb * _DarkMultiplier, IN.vertColor.r); + + return c; +} + +#endif diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarMaterialStateShader.cginc.meta b/Assets/Oculus/Avatar/Content/Materials/AvatarMaterialStateShader.cginc.meta new file mode 100644 index 0000000..1abee25 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarMaterialStateShader.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 462c52c09cf9a244bbc11a016d763ea7 +timeCreated: 1443137462 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShader.shader b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShader.shader new file mode 100644 index 0000000..eebfd1b --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShader.shader @@ -0,0 +1,141 @@ +Shader "OvrAvatar/AvatarSurfaceShader" { + Properties{ + // Global parameters + _Alpha("Alpha", Range(0.0, 1.0)) = 1.0 + _DarkMultiplier("Dark Multiplier", Color) = (0.6, 0.6, 0.6, 1.0) + _BaseColor("Base Color", Color) = (0.0, 0.0, 0.0, 0.0) + _BaseMaskType("Base Mask Type", Int) = 0 + _BaseMaskParameters("Base Mask Parameters", Vector) = (0, 0, 0, 0) + _BaseMaskAxis("Base Mask Axis", Vector) = (0, 1, 0, 0) + _AlphaMask("Alpha Mask", 2D) = "white" {} + _NormalMap("Normal Map", 2D) = "" {} + _ParallaxMap("Parallax Map", 2D) = "" {} + _RoughnessMap("Roughness Map", 2D) = "" {} + + // Layer 0 parameters + _LayerSampleMode0("Layer Sample Mode 0", Int) = 0 + _LayerBlendMode0("Layer Blend Mode 0", Int) = 0 + _LayerMaskType0("Layer Mask Type 0", Int) = 0 + _LayerColor0("Layer Color 0", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface0("Layer Surface 0", 2D) = "" {} + _LayerSampleParameters0("Layer Sample Parameters 0", Vector) = (0, 0, 0, 0) + _LayerMaskParameters0("Layer Mask Parameters 0", Vector) = (0, 0, 0, 0) + _LayerMaskAxis0("Layer Mask Axis 0", Vector) = (0, 1, 0, 0) + + // Layer 1 parameters + _LayerSampleMode1("Layer Sample Mode 1", Int) = 0 + _LayerBlendMode1("Layer Blend Mode 1", Int) = 0 + _LayerMaskType1("Layer Mask Type 1", Int) = 0 + _LayerColor1("Layer Color 1", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface1("Layer Surface 1", 2D) = "" {} + _LayerSampleParameters1("Layer Sample Parameters 1", Vector) = (0, 0, 0, 0) + _LayerMaskParameters1("Layer Mask Parameters 1", Vector) = (0, 0, 0, 0) + _LayerMaskAxis1("Layer Mask Axis 1", Vector) = (0, 1, 0, 0) + + // Layer 2 parameters + _LayerSampleMode2("Layer Sample Mode 2", Int) = 0 + _LayerBlendMode2("Layer Blend Mode 2", Int) = 0 + _LayerMaskType2("Layer Mask Type 2", Int) = 0 + _LayerColor2("Layer Color 2", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface2("Layer Surface 2", 2D) = "" {} + _LayerSampleParameters2("Layer Sample Parameters 2", Vector) = (0, 0, 0, 0) + _LayerMaskParameters2("Layer Mask Parameters 2", Vector) = (0, 0, 0, 0) + _LayerMaskAxis2("Layer Mask Axis 2", Vector) = (0, 1, 0, 0) + + // Layer 3 parameters + _LayerSampleMode3("Layer Sample Mode 3", Int) = 0 + _LayerBlendMode3("Layer Blend Mode 3", Int) = 0 + _LayerMaskType3("Layer Mask Type 3", Int) = 0 + _LayerColor3("Layer Color 3", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface3("Layer Surface 3", 2D) = "" {} + _LayerSampleParameters3("Layer Sample Parameters 3", Vector) = (0, 0, 0, 0) + _LayerMaskParameters3("Layer Mask Parameters 3", Vector) = (0, 0, 0, 0) + _LayerMaskAxis3("Layer Mask Axis 3", Vector) = (0, 1, 0, 0) + + // Layer 4 parameters + _LayerSampleMode4("Layer Sample Mode 4", Int) = 0 + _LayerBlendMode4("Layer Blend Mode 4", Int) = 0 + _LayerMaskType4("Layer Mask Type 4", Int) = 0 + _LayerColor4("Layer Color 4", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface4("Layer Surface 4", 2D) = "" {} + _LayerSampleParameters4("Layer Sample Parameters 4", Vector) = (0, 0, 0, 0) + _LayerMaskParameters4("Layer Mask Parameters 4", Vector) = (0, 0, 0, 0) + _LayerMaskAxis4("Layer Mask Axis 4", Vector) = (0, 1, 0, 0) + + // Layer 5 parameters + _LayerSampleMode5("Layer Sample Mode 5", Int) = 0 + _LayerBlendMode5("Layer Blend Mode 5", Int) = 0 + _LayerMaskType5("Layer Mask Type 5", Int) = 0 + _LayerColor5("Layer Color 5", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface5("Layer Surface 5", 2D) = "" {} + _LayerSampleParameters5("Layer Sample Parameters 5", Vector) = (0, 0, 0, 0) + _LayerMaskParameters5("Layer Mask Parameters 5", Vector) = (0, 0, 0, 0) + _LayerMaskAxis5("Layer Mask Axis 5", Vector) = (0, 1, 0, 0) + + // Layer 6 parameters + _LayerSampleMode6("Layer Sample Mode 6", Int) = 0 + _LayerBlendMode6("Layer Blend Mode 6", Int) = 0 + _LayerMaskType6("Layer Mask Type 6", Int) = 0 + _LayerColor6("Layer Color 6", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface6("Layer Surface 6", 2D) = "" {} + _LayerSampleParameters6("Layer Sample Parameters 6", Vector) = (0, 0, 0, 0) + _LayerMaskParameters6("Layer Mask Parameters 6", Vector) = (0, 0, 0, 0) + _LayerMaskAxis6("Layer Mask Axis 6", Vector) = (0, 1, 0, 0) + + // Layer 7 parameters + _LayerSampleMode7("Layer Sample Mode 7", Int) = 0 + _LayerBlendMode7("Layer Blend Mode 7", Int) = 0 + _LayerMaskType7("Layer Mask Type 7", Int) = 0 + _LayerColor7("Layer Color 7", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface7("Layer Surface 7", 2D) = "" {} + _LayerSampleParameters7("Layer Sample Parameters 7", Vector) = (0, 0, 0, 0) + _LayerMaskParameters7("Layer Mask Parameters 7", Vector) = (0, 0, 0, 0) + _LayerMaskAxis7("Layer Mask Axis 7", Vector) = (0, 1, 0, 0) + } + + SubShader + { + Tags + { + "Queue" = "Transparent" + "RenderType" = "Transparent" + } + + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + LOD 200 + + Pass + { + Name "FORWARD" + Tags + { + "LightMode" = "ForwardBase" + } + + CGPROGRAM + #pragma only_renderers d3d11 gles3 gles + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #pragma multi_compile PROJECTOR_OFF PROJECTOR_ON + #pragma multi_compile NORMAL_MAP_OFF NORMAL_MAP_ON + #pragma multi_compile PARALLAX_OFF PARALLAX_ON + #pragma multi_compile ROUGHNESS_OFF ROUGHNESS_ON + #pragma multi_compile VERTALPHA_OFF VERTALPHA_ON + #pragma multi_compile LAYERS_1 LAYERS_2 LAYERS_3 LAYERS_4 LAYERS_5 LAYERS_6 LAYERS_7 LAYERS_8 + + #include "Assets/Oculus/Avatar/Content/Materials/AvatarMaterialStateShader.cginc" + + float4 frag(VertexOutput IN) : COLOR + { + return ComputeSurface(IN); + } + + ENDCG + } + } + + FallBack "Diffuse" + CustomEditor "AvatarMaterialEditor" +} diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShader.shader.meta b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShader.shader.meta new file mode 100644 index 0000000..f0911d7 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d0f6e1942d3d1f946a96fd8a00175474 +timeCreated: 1470862124 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBS.shader b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBS.shader new file mode 100644 index 0000000..b0bab0e --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBS.shader @@ -0,0 +1,79 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "OvrAvatar/AvatarSurfaceShaderPBS" { + Properties{ + // Global parameters + _Alpha("Alpha", Range(0.0, 1.0)) = 1.0 + _Albedo("Albedo (RGB)", 2D) = "" {} + _Surface("Metallic (R) Occlusion (G) and Smoothness (A)", 2D) = "" {} + } + SubShader{ + Tags { + "Queue" = "Transparent" + "RenderType" = "Transparent" + } + + Pass { + ZWrite On + Cull Off + ColorMask 0 + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #include "UnityCG.cginc" + + struct v2f { + float4 position : SV_POSITION; + }; + v2f vert(appdata_full v) { + // Output + v2f output; + output.position = UnityObjectToClipPos(v.vertex); + return output; + } + + float4 frag(v2f input) : COLOR { + return 0; + } + ENDCG + } + + LOD 200 + + CGPROGRAM + +// Physically based Standard lighting model, and enable shadows on all light types +#pragma surface surf Standard vertex:vert nolightmap alpha noforwardadd + +float _Alpha; +sampler2D _Albedo; +float4 _Albedo_ST; +sampler2D _Surface; +float4 _Surface_ST; + +struct Input { + float2 texcoord; +}; + +void vert(inout appdata_full v, out Input o) { + UNITY_INITIALIZE_OUTPUT(Input, o); + o.texcoord = v.texcoord.xy; +} + +void surf (Input IN, inout SurfaceOutputStandard o) { + o.Albedo = tex2D(_Albedo, TRANSFORM_TEX(IN.texcoord, _Albedo)).rgb; + float4 surfaceParams = tex2D(_Surface, TRANSFORM_TEX(IN.texcoord, _Surface)); + o.Metallic = surfaceParams.r; + o.Occlusion = surfaceParams.g; + o.Smoothness = surfaceParams.a; + o.Alpha = _Alpha; +} + +#pragma only_renderers d3d11 gles3 gles + +ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBS.shader.meta b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBS.shader.meta new file mode 100644 index 0000000..4625073 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBS.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: d7662dbac0646464a9b4a48e93989adb +timeCreated: 1470862124 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBSV2.shader b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBSV2.shader new file mode 100644 index 0000000..cf67a20 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBSV2.shader @@ -0,0 +1,39 @@ +Shader "OvrAvatar/AvatarSurfaceShaderPBSV2" { + Properties { + _AlbedoMultiplier ("Albedo Multiplier", Color) = (1,1,1,1) + _Albedo ("Albedo (RGB)", 2D) = "white" {} + _Metallicness("Metallicness", 2D) = "grey" {} + _GlossinessScale ("Glossiness Scale", Range(0,1)) = 0.5 + } + SubShader { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _Albedo; + sampler2D _Metallicness; + + struct Input { + float2 uv_Albedo; + }; + + float _GlossinessScale; + float4 _AlbedoMultiplier; + + void surf (Input IN, inout SurfaceOutputStandard o) { + fixed4 c = tex2D (_Albedo, IN.uv_Albedo) * _AlbedoMultiplier; + o.Albedo = c.rgb; + o.Metallic = tex2D (_Metallicness, IN.uv_Albedo).r; + o.Smoothness = _GlossinessScale; + o.Alpha = 1.0; + } + ENDCG + } + FallBack "Diffuse" +} \ No newline at end of file diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBSV2.shader.meta b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBSV2.shader.meta new file mode 100644 index 0000000..414e4a6 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderPBSV2.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3934b2d879c6eb94eb26fa19814c7fcd +timeCreated: 1512064795 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderSelfOccluding.shader b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderSelfOccluding.shader new file mode 100644 index 0000000..76ce51e --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderSelfOccluding.shader @@ -0,0 +1,175 @@ +Shader "OvrAvatar/AvatarSurfaceShaderSelfOccluding" { + Properties{ + // Global parameters + _Alpha("Alpha", Range(0.0, 1.0)) = 1.0 + _DarkMultiplier("Dark Multiplier", Color) = (0.6, 0.6, 0.6, 1.0) + _BaseColor("Base Color", Color) = (0.0, 0.0, 0.0, 0.0) + _BaseMaskType("Base Mask Type", Int) = 0 + _BaseMaskParameters("Base Mask Parameters", Vector) = (0, 0, 0, 0) + _BaseMaskAxis("Base Mask Axis", Vector) = (0, 1, 0, 0) + _AlphaMask("Alpha Mask", 2D) = "white" {} + _NormalMap("Normal Map", 2D) = "" {} + _ParallaxMap("Parallax Map", 2D) = "" {} + _RoughnessMap("Roughness Map", 2D) = "" {} + + // Layer 0 parameters + _LayerSampleMode0("Layer Sample Mode 0", Int) = 0 + _LayerBlendMode0("Layer Blend Mode 0", Int) = 0 + _LayerMaskType0("Layer Mask Type 0", Int) = 0 + _LayerColor0("Layer Color 0", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface0("Layer Surface 0", 2D) = "" {} + _LayerSampleParameters0("Layer Sample Parameters 0", Vector) = (0, 0, 0, 0) + _LayerMaskParameters0("Layer Mask Parameters 0", Vector) = (0, 0, 0, 0) + _LayerMaskAxis0("Layer Mask Axis 0", Vector) = (0, 1, 0, 0) + + // Layer 1 parameters + _LayerSampleMode1("Layer Sample Mode 1", Int) = 0 + _LayerBlendMode1("Layer Blend Mode 1", Int) = 0 + _LayerMaskType1("Layer Mask Type 1", Int) = 0 + _LayerColor1("Layer Color 1", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface1("Layer Surface 1", 2D) = "" {} + _LayerSampleParameters1("Layer Sample Parameters 1", Vector) = (0, 0, 0, 0) + _LayerMaskParameters1("Layer Mask Parameters 1", Vector) = (0, 0, 0, 0) + _LayerMaskAxis1("Layer Mask Axis 1", Vector) = (0, 1, 0, 0) + + // Layer 2 parameters + _LayerSampleMode2("Layer Sample Mode 2", Int) = 0 + _LayerBlendMode2("Layer Blend Mode 2", Int) = 0 + _LayerMaskType2("Layer Mask Type 2", Int) = 0 + _LayerColor2("Layer Color 2", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface2("Layer Surface 2", 2D) = "" {} + _LayerSampleParameters2("Layer Sample Parameters 2", Vector) = (0, 0, 0, 0) + _LayerMaskParameters2("Layer Mask Parameters 2", Vector) = (0, 0, 0, 0) + _LayerMaskAxis2("Layer Mask Axis 2", Vector) = (0, 1, 0, 0) + + // Layer 3 parameters + _LayerSampleMode3("Layer Sample Mode 3", Int) = 0 + _LayerBlendMode3("Layer Blend Mode 3", Int) = 0 + _LayerMaskType3("Layer Mask Type 3", Int) = 0 + _LayerColor3("Layer Color 3", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface3("Layer Surface 3", 2D) = "" {} + _LayerSampleParameters3("Layer Sample Parameters 3", Vector) = (0, 0, 0, 0) + _LayerMaskParameters3("Layer Mask Parameters 3", Vector) = (0, 0, 0, 0) + _LayerMaskAxis3("Layer Mask Axis 3", Vector) = (0, 1, 0, 0) + + // Layer 4 parameters + _LayerSampleMode4("Layer Sample Mode 4", Int) = 0 + _LayerBlendMode4("Layer Blend Mode 4", Int) = 0 + _LayerMaskType4("Layer Mask Type 4", Int) = 0 + _LayerColor4("Layer Color 4", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface4("Layer Surface 4", 2D) = "" {} + _LayerSampleParameters4("Layer Sample Parameters 4", Vector) = (0, 0, 0, 0) + _LayerMaskParameters4("Layer Mask Parameters 4", Vector) = (0, 0, 0, 0) + _LayerMaskAxis4("Layer Mask Axis 4", Vector) = (0, 1, 0, 0) + + // Layer 5 parameters + _LayerSampleMode5("Layer Sample Mode 5", Int) = 0 + _LayerBlendMode5("Layer Blend Mode 5", Int) = 0 + _LayerMaskType5("Layer Mask Type 5", Int) = 0 + _LayerColor5("Layer Color 5", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface5("Layer Surface 5", 2D) = "" {} + _LayerSampleParameters5("Layer Sample Parameters 5", Vector) = (0, 0, 0, 0) + _LayerMaskParameters5("Layer Mask Parameters 5", Vector) = (0, 0, 0, 0) + _LayerMaskAxis5("Layer Mask Axis 5", Vector) = (0, 1, 0, 0) + + // Layer 6 parameters + _LayerSampleMode6("Layer Sample Mode 6", Int) = 0 + _LayerBlendMode6("Layer Blend Mode 6", Int) = 0 + _LayerMaskType6("Layer Mask Type 6", Int) = 0 + _LayerColor6("Layer Color 6", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface6("Layer Surface 6", 2D) = "" {} + _LayerSampleParameters6("Layer Sample Parameters 6", Vector) = (0, 0, 0, 0) + _LayerMaskParameters6("Layer Mask Parameters 6", Vector) = (0, 0, 0, 0) + _LayerMaskAxis6("Layer Mask Axis 6", Vector) = (0, 1, 0, 0) + + // Layer 7 parameters + _LayerSampleMode7("Layer Sample Mode 7", Int) = 0 + _LayerBlendMode7("Layer Blend Mode 7", Int) = 0 + _LayerMaskType7("Layer Mask Type 7", Int) = 0 + _LayerColor7("Layer Color 7", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface7("Layer Surface 7", 2D) = "" {} + _LayerSampleParameters7("Layer Sample Parameters 7", Vector) = (0, 0, 0, 0) + _LayerMaskParameters7("Layer Mask Parameters 7", Vector) = (0, 0, 0, 0) + _LayerMaskAxis7("Layer Mask Axis 7", Vector) = (0, 1, 0, 0) + } + + SubShader + { + Tags + { + "Queue" = "Transparent" + "RenderType" = "Transparent" + } + + Pass + { + ZWrite On + Cull Off + ColorMask 0 + Offset 1, 1 + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #include "UnityCG.cginc" + + struct v2f + { + float4 position : SV_POSITION; + }; + + v2f vert(appdata_full v) + { + // Output + v2f output; + output.position = UnityObjectToClipPos(v.vertex); + return output; + } + + float4 frag(v2f input) : COLOR + { + return 0; + } + + ENDCG + } + + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + LOD 200 + + Pass + { + Name "FORWARD" + Tags + { + "LightMode" = "ForwardBase" + } + + CGPROGRAM + #pragma only_renderers d3d11 gles3 gles + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #pragma multi_compile PROJECTOR_OFF PROJECTOR_ON + #pragma multi_compile NORMAL_MAP_OFF NORMAL_MAP_ON + #pragma multi_compile PARALLAX_OFF PARALLAX_ON + #pragma multi_compile ROUGHNESS_OFF ROUGHNESS_ON + #pragma multi_compile VERTALPHA_OFF VERTALPHA_ON + #pragma multi_compile LAYERS_1 LAYERS_2 LAYERS_3 LAYERS_4 LAYERS_5 LAYERS_6 LAYERS_7 LAYERS_8 + + #include "Assets/Oculus/Avatar/Content/Materials/AvatarMaterialStateShader.cginc" + + float4 frag(VertexOutput IN) : SV_Target + { + return ComputeSurface(IN); + } + + ENDCG + } + } + + FallBack "Diffuse" + CustomEditor "AvatarMaterialEditor" +} diff --git a/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderSelfOccluding.shader.meta b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderSelfOccluding.shader.meta new file mode 100644 index 0000000..1a00873 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Materials/AvatarSurfaceShaderSelfOccluding.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 10513ef587704324487f3061a7e6699d +timeCreated: 1470862124 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Prefabs.meta b/Assets/Oculus/Avatar/Content/Prefabs.meta new file mode 100644 index 0000000..a1f059c --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Prefabs.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: e2c4ef7503877e647b22a4089384f04f +folderAsset: yes +timeCreated: 1466717433 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Prefabs/LocalAvatar.prefab b/Assets/Oculus/Avatar/Content/Prefabs/LocalAvatar.prefab new file mode 100644 index 0000000..ea2dd46 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Prefabs/LocalAvatar.prefab @@ -0,0 +1,793 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &157742 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 448722} + - component: {fileID: 11477770} + m_Layer: 0 + m_Name: controller_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &158226 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 463470} + - component: {fileID: 11437430} + - component: {fileID: 8254050} + - component: {fileID: 11441414} + m_Layer: 0 + m_Name: LocalAvatar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &184120 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 400938} + - component: {fileID: 11405130} + m_Layer: 0 + m_Name: controller_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &400938 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 184120} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 463470} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &448722 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157742} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 463470} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &463470 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 158226} + 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: 4000010416372058} + - {fileID: 4000014100970646} + - {fileID: 4000013364346644} + - {fileID: 400938} + - {fileID: 4000011212216358} + - {fileID: 448722} + - {fileID: 4581494204247758} + - {fileID: 4468369968689664} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!82 &8254050 +AudioSource: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 158226} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 +--- !u!114 &11405130 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 184120} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &11437430 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 158226} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 00f3402a2ea5bff4880c0313515240cd, type: 3} + m_Name: + m_EditorClassIdentifier: + DefaultBodyMaterialManager: {fileID: 114949324920430652} + DefaultHandMaterialManager: {fileID: 114029231360713414} + Driver: {fileID: 11441414} + Base: {fileID: 114000010884708534} + Body: {fileID: 114000012186362028} + ControllerLeft: {fileID: 11405130} + ControllerRight: {fileID: 11477770} + HandLeft: {fileID: 114000011404857786} + HandRight: {fileID: 114000010372160784} + RecordPackets: 0 + UseSDKPackets: 1 + StartWithControllers: 0 + FirstPersonLayer: + layerIndex: 0 + ThirdPersonLayer: + layerIndex: 0 + ShowFirstPerson: 1 + ShowThirdPerson: 0 + Capabilities: -1 + SurfaceShader: {fileID: 4800000, guid: 73f67c4e7bf718b4385aa6b1f8a06591, type: 3} + SurfaceShaderSelfOccluding: {fileID: 4800000, guid: 69f342b79d37541489919a19cfd8a924, + type: 3} + SurfaceShaderPBS: {fileID: 4800000, guid: 5e52aa58207bbf24d8eb8ec969e9ae88, type: 3} + SurfaceShaderPBSV2Single: {fileID: 4800000, guid: c26fc51e445dcfd4db09305d861dc11c, + type: 3} + SurfaceShaderPBSV2Combined: {fileID: 4800000, guid: 37d2b8298f61cd2469465fc36108675d, + type: 3} + SurfaceShaderPBSV2Simple: {fileID: 4800000, guid: 36b8b481cf607814a8cec318f0148d63, + type: 3} + SurfaceShaderPBSV2Loading: {fileID: 4800000, guid: 822f5e641dc5dd54ca9555b727b3277f, + type: 3} + oculusUserID: 0 + LeftHandCustomPose: {fileID: 0} + RightHandCustomPose: {fileID: 0} + PacketSettings: + UpdateRate: 0.033333335 + VoiceAmplitude: 0 + EnableMouthVertexAnimation: 0 +--- !u!114 &11441414 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 158226} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac27124318cf8e84aa7350c2ac1cdb80, type: 3} + m_Name: + m_EditorClassIdentifier: + Mode: 0 +--- !u!114 &11477770 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 157742} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !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: 158226} + m_IsPrefabParent: 1 +--- !u!1 &1000010482306814 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011212216358} + - component: {fileID: 114000010372160784} + m_Layer: 0 + m_Name: hand_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010910743596 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000010416372058} + - component: {fileID: 114000010884708534} + m_Layer: 0 + m_Name: base + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011125779090 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000013364346644} + - component: {fileID: 114000011404857786} + m_Layer: 0 + m_Name: hand_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012026592076 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000014100970646} + - component: {fileID: 114000012186362028} + m_Layer: 0 + m_Name: body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1098047352992398 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4581494204247758} + - component: {fileID: 114949324920430652} + m_Layer: 0 + m_Name: DefaultBodyMaterialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1231602751420816 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4468369968689664} + - component: {fileID: 114029231360713414} + m_Layer: 0 + m_Name: DefaultHandMaterialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4000010416372058 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010910743596} + 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: 463470} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011212216358 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010482306814} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 463470} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000013364346644 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011125779090} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 463470} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000014100970646 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012026592076} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.6, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 463470} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4468369968689664 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1231602751420816} + 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: 463470} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4581494204247758 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1098047352992398} + 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: 463470} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &114000010372160784 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010482306814} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114000010884708534 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010910743596} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0e33623ec5372748b5703f61a4df82d, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114000011404857786 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011125779090} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114000012186362028 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012026592076} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb7a6650b6cb46545967d3b380b7396c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114029231360713414 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1231602751420816} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a139d83bf6796734db220df8a5bfacbd, type: 3} + m_Name: + m_EditorClassIdentifier: + DiffuseFallbacks: + - {fileID: 2800000, guid: 7d8da3d06466cc04da8c020819170a59, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: b3e87b1024f5fa8408d004b398e7b0c0, type: 3} + NormalFallbacks: + - {fileID: 2800000, guid: 93a54b3b63bcc6d49b16f6bdb655b940, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 22a046c12fc7f3c4d98a98add109fa96, type: 3} + BodyColorTints: + - {r: 0.9764706, g: 0.8509804, b: 0.6862745, a: 1} + - {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + - {r: 0.9764706, g: 0.9019608, b: 0.6745098, a: 1} + - {r: 0.7647059, g: 0.6039216, b: 0.2509804, a: 1} + - {r: 0.45490196, g: 0.1882353, b: 0, a: 1} + - {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + LocalAvatarConfig: + ComponentMaterialProperties: [] + MaterialPropertyBlock: + Colors: [] + DiffuseIntensities: [] + RimIntensities: [] + BacklightIntensities: [] + ReflectionIntensities: [] + DefaultAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + Textures: [] + DiffuseIntensity: 0.301 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: [] + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 0.80784315, g: 0.80784315, b: 0.80784315, a: 1} + Textures: [] + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.22352941, g: 0.11372549, b: 0, a: 1} + Textures: [] + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + Textures: [] + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + DiffuseIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + RimIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + BacklightIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + ReflectionIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 +--- !u!114 &114949324920430652 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1098047352992398} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a139d83bf6796734db220df8a5bfacbd, type: 3} + m_Name: + m_EditorClassIdentifier: + DiffuseFallbacks: + - {fileID: 2800000, guid: 7d8da3d06466cc04da8c020819170a59, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: b3e87b1024f5fa8408d004b398e7b0c0, type: 3} + NormalFallbacks: + - {fileID: 2800000, guid: 93a54b3b63bcc6d49b16f6bdb655b940, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 22a046c12fc7f3c4d98a98add109fa96, type: 3} + BodyColorTints: + - {r: 0.9764706, g: 0.8509804, b: 0.6862745, a: 1} + - {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + - {r: 0.9764706, g: 0.9019608, b: 0.6745098, a: 1} + - {r: 0.7647059, g: 0.6039216, b: 0.2509804, a: 1} + - {r: 0.45490196, g: 0.1882353, b: 0, a: 1} + - {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + LocalAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.86, b: 0.77, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.3 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.6235, g: 0.4627, b: 0.3412, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: -5.3487954e+9, g: 771.1758, b: -5.6686517e+23, a: 4.9667446e-34} + Textures: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 1, y: 0.86, z: 0.77, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 0.6235, y: 0.4627, z: 0.3412, w: 1} + - {x: -0.025753247, y: -2.0311036e-13, z: -6.2685677e-31, w: -2.0021067e+22} + DiffuseIntensities: + - 0.3 + - 0.1 + - 0 + - 0.15 + - 0.15 + RimIntensities: + - 5 + - 2 + - 2.84 + - 4 + - 4 + BacklightIntensities: + - 1 + - 0.7 + - 0.7 + - 0.7 + - 0.7 + ReflectionIntensities: + - 0 + - 0.3 + - 0.4 + - 0 + - 0 + DefaultAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.86, b: 0.77, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.3 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.6235, g: 0.4627, b: 0.3412, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: -5.3487954e+9, g: 771.1758, b: -5.6686517e+23, a: 4.9667446e-34} + Textures: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 1, y: 0.86, z: 0.77, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 0.6235, y: 0.4627, z: 0.3412, w: 1} + - {x: -0.025753247, y: -2.0311036e-13, z: -6.2685677e-31, w: -2.0021067e+22} + DiffuseIntensities: + - 0.3 + - 0.1 + - 0 + - 0.15 + - 0.15 + RimIntensities: + - 5 + - 2 + - 2.84 + - 4 + - 4 + BacklightIntensities: + - 1 + - 0.7 + - 0.7 + - 0.7 + - 0.7 + ReflectionIntensities: + - 0 + - 0.3 + - 0.4 + - 0 + - 0 diff --git a/Assets/Oculus/Avatar/Content/Prefabs/LocalAvatar.prefab.meta b/Assets/Oculus/Avatar/Content/Prefabs/LocalAvatar.prefab.meta new file mode 100644 index 0000000..4844c05 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Prefabs/LocalAvatar.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 84c8b8609f9bb434eaf5248f17ff1293 +timeCreated: 1466806466 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Prefabs/RemoteAvatar.prefab b/Assets/Oculus/Avatar/Content/Prefabs/RemoteAvatar.prefab new file mode 100644 index 0000000..575f84c --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Prefabs/RemoteAvatar.prefab @@ -0,0 +1,2830 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &143252 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 496618} + - component: {fileID: 11464902} + - component: {fileID: 11461908} + m_Layer: 0 + m_Name: RemoteAvatar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &154294 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 489662} + - component: {fileID: 114000010091674760} + m_Layer: 0 + m_Name: hand_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &165584 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 429728} + - component: {fileID: 114000012345544872} + m_Layer: 0 + m_Name: body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &166844 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 435882} + - component: {fileID: 11465430} + m_Layer: 0 + m_Name: controller_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &178596 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 433868} + - component: {fileID: 11470276} + m_Layer: 0 + m_Name: controller_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &188284 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 407044} + - component: {fileID: 114000012207304612} + m_Layer: 0 + m_Name: hand_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &407044 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 188284} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 496618} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &429728 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165584} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1.6, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 496618} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &433868 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178596} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4000012540091686} + m_Father: {fileID: 496618} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &435882 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166844} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4000011967535116} + m_Father: {fileID: 496618} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &489662 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 154294} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 496618} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &496618 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 143252} + 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: 4000011021225538} + - {fileID: 429728} + - {fileID: 489662} + - {fileID: 407044} + - {fileID: 433868} + - {fileID: 435882} + - {fileID: 4461464600332690} + - {fileID: 4823973753068400} + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &11461908 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 143252} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c198a42a3843ca04fa633b60f428ff51, type: 3} + m_Name: + m_EditorClassIdentifier: + Mode: 0 +--- !u!114 &11464902 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 143252} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 00f3402a2ea5bff4880c0313515240cd, type: 3} + m_Name: + m_EditorClassIdentifier: + DefaultBodyMaterialManager: {fileID: 114533516196804206} + DefaultHandMaterialManager: {fileID: 114144217084364882} + Driver: {fileID: 11461908} + Base: {fileID: 114000010148578704} + Body: {fileID: 114000012345544872} + ControllerLeft: {fileID: 11470276} + ControllerRight: {fileID: 11465430} + HandLeft: {fileID: 114000010091674760} + HandRight: {fileID: 114000012207304612} + RecordPackets: 0 + UseSDKPackets: 1 + StartWithControllers: 0 + FirstPersonLayer: + layerIndex: 0 + ThirdPersonLayer: + layerIndex: 0 + ShowFirstPerson: 0 + ShowThirdPerson: 1 + Capabilities: -1 + SurfaceShader: {fileID: 4800000, guid: 73f67c4e7bf718b4385aa6b1f8a06591, type: 3} + SurfaceShaderSelfOccluding: {fileID: 4800000, guid: 69f342b79d37541489919a19cfd8a924, + type: 3} + SurfaceShaderPBS: {fileID: 4800000, guid: 5e52aa58207bbf24d8eb8ec969e9ae88, type: 3} + SurfaceShaderPBSV2Single: {fileID: 4800000, guid: c26fc51e445dcfd4db09305d861dc11c, + type: 3} + SurfaceShaderPBSV2Combined: {fileID: 4800000, guid: 37d2b8298f61cd2469465fc36108675d, + type: 3} + SurfaceShaderPBSV2Simple: {fileID: 4800000, guid: 36b8b481cf607814a8cec318f0148d63, + type: 3} + SurfaceShaderPBSV2Loading: {fileID: 4800000, guid: 822f5e641dc5dd54ca9555b727b3277f, + type: 3} + oculusUserID: 0 + LeftHandCustomPose: {fileID: 0} + RightHandCustomPose: {fileID: 0} + PacketSettings: + UpdateRate: 0.033333335 + VoiceAmplitude: 0 + EnableMouthVertexAnimation: 0 +--- !u!114 &11465430 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 166844} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &11470276 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 178596} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !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: 143252} + m_IsPrefabParent: 1 +--- !u!1 &1000010176019332 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000013053309248} + - component: {fileID: 137000012539278394} + m_Layer: 0 + m_Name: rctrl:a_button_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010186355062 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000013448249666} + m_Layer: 0 + m_Name: rctrl:b_hold + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010353348604 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011939430368} + - component: {fileID: 137000012561251176} + m_Layer: 0 + m_Name: lctrl:ring_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010404229384 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011568184020} + - component: {fileID: 137000012327971406} + m_Layer: 0 + m_Name: lctrl:surface_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010462727460 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000010715895894} + m_Layer: 0 + m_Name: rctrl:right_touch_controller_world + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010540851970 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012605354570} + - component: {fileID: 137000012577831356} + m_Layer: 0 + m_Name: rctrl:b_button_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010567967398 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012724529694} + m_Layer: 0 + m_Name: rctrl:b_trigger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010618960340 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012540091686} + - component: {fileID: 95000014191315040} + m_Layer: 0 + m_Name: left_touch_controller_model_skel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010732039748 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000014027683858} + - component: {fileID: 137000014239696370} + m_Layer: 0 + m_Name: rctrl:o_button_decal_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000010829465458 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000013426853722} + m_Layer: 0 + m_Name: lctrl:geometry_null + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011032731176 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000013724697446} + m_Layer: 0 + m_Name: rctrl:b_stick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011186482016 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011967535116} + - component: {fileID: 95000011808594792} + m_Layer: 0 + m_Name: right_touch_controller_model_skel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011251501750 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012705674684} + - component: {fileID: 137000013198274284} + m_Layer: 0 + m_Name: rctrl:ring_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011296493708 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011540650158} + m_Layer: 0 + m_Name: lctrl:b_trigger + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011598347302 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012705338176} + m_Layer: 0 + m_Name: rctrl:b_stick_IGNORE + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011605533530 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000010811930704} + m_Layer: 0 + m_Name: lctrl:b_stick + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011727251070 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012384171158} + m_Layer: 0 + m_Name: rctrl:b_button01 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011772014684 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011564629680} + - component: {fileID: 137000014119152936} + m_Layer: 0 + m_Name: rctrl:o_button_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011875671922 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000013166053970} + - component: {fileID: 137000010724210166} + m_Layer: 0 + m_Name: rctrl:side_trigger_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011963518446 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012961726978} + - component: {fileID: 137000011963534174} + m_Layer: 0 + m_Name: lctrl:thumbstick_ball_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000011996807892 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000013876876732} + m_Layer: 0 + m_Name: rctrl:b_button02 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012054331002 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011636682892} + - component: {fileID: 137000013701477334} + m_Layer: 0 + m_Name: rctrl:thumbstick_ball_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012150430946 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012272704210} + - component: {fileID: 137000012107674410} + m_Layer: 0 + m_Name: lctrl:o_button_decal_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012196631598 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012842689428} + m_Layer: 0 + m_Name: lctrl:left_touch_controller_world + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012207203502 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011814646714} + m_Layer: 0 + m_Name: lctrl:b_stick_IGNORE + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012459128118 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000010499556928} + - component: {fileID: 137000010692100556} + m_Layer: 0 + m_Name: lctrl:x_button_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012540503508 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000010768823692} + m_Layer: 0 + m_Name: rctrl:b_button03 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012561114658 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011465109902} + - component: {fileID: 137000011798888872} + m_Layer: 0 + m_Name: lctrl:o_button_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012687583852 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012029189976} + m_Layer: 0 + m_Name: lctrl:b_button01 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012703596256 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000010465752764} + - component: {fileID: 137000012369293346} + m_Layer: 0 + m_Name: rctrl:controller_body_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012739084852 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011697994020} + - component: {fileID: 137000012017572084} + m_Layer: 0 + m_Name: lctrl:main_trigger_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012820484798 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011581298260} + m_Layer: 0 + m_Name: rctrl:geometry_null + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000012913350438 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011021225538} + - component: {fileID: 114000010148578704} + m_Layer: 0 + m_Name: base + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013039583002 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000013285752372} + m_Layer: 0 + m_Name: lctrl:b_button03 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013068196432 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012208151102} + - component: {fileID: 137000011002884086} + m_Layer: 0 + m_Name: lctrl:controller_body_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013237565076 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000012351109320} + - component: {fileID: 137000012071317434} + m_Layer: 0 + m_Name: rctrl:surface_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013362553720 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011208292394} + - component: {fileID: 137000010318330296} + m_Layer: 0 + m_Name: lctrl:side_trigger_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013632609248 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000014115540756} + - component: {fileID: 137000010086889286} + m_Layer: 0 + m_Name: rctrl:main_trigger_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013724541018 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011684154134} + m_Layer: 0 + m_Name: lctrl:b_button02 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013773920210 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000010076381212} + m_Layer: 0 + m_Name: lctrl:b_hold + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1000013783390420 +GameObject: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4000011937531554} + - component: {fileID: 137000010625253534} + m_Layer: 0 + m_Name: lctrl:y_button_PLY + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1387099181202896 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4461464600332690} + - component: {fileID: 114533516196804206} + m_Layer: 0 + m_Name: DefaultBodyMaterialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!1 &1952448560374888 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + serializedVersion: 5 + m_Component: + - component: {fileID: 4823973753068400} + - component: {fileID: 114144217084364882} + m_Layer: 0 + m_Name: DefaultHandMaterialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &4000010076381212 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013773920210} + m_LocalRotation: {x: -0.18065539, y: -0.13555649, z: -0.067166515, w: 0.97184193} + m_LocalPosition: {x: 0.013074442, y: -0.025639696, z: -0.027427113} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000012842689428} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000010465752764 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012703596256} + 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: 4000011581298260} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000010499556928 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012459128118} + 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: 4000013426853722} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000010715895894 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010462727460} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0.7071068, w: -8.659561e-17} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4000012384171158} + - {fileID: 4000013876876732} + - {fileID: 4000010768823692} + - {fileID: 4000013448249666} + - {fileID: 4000013724697446} + - {fileID: 4000012724529694} + m_Father: {fileID: 4000011967535116} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000010768823692 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012540503508} + m_LocalRotation: {x: 0.07876507, y: 0.01894126, z: 0.5343878, w: 0.8413483} + m_LocalPosition: {x: -0.012083728, y: -0.01402681, z: -0.0007126567} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000010715895894} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000010811930704 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011605533530} + m_LocalRotation: {x: 0.0027868259, y: 0.70437866, z: -0.0031505642, w: 0.7098119} + m_LocalPosition: {x: 0.010637393, y: 0.00497835, z: -0.009418557} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4000011814646714} + m_Father: {fileID: 4000012842689428} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011021225538 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012913350438} + 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: 496618} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011208292394 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013362553720} + 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: 4000013426853722} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011465109902 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012561114658} + 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: 4000013426853722} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011540650158 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011296493708} + m_LocalRotation: {x: -0.05795374, y: -0.05660452, z: 0.9967023, w: 0.0046757394} + m_LocalPosition: {x: -0.001420367, y: 0.021865888, z: -0.005495974} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000012842689428} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011564629680 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011772014684} + 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: 4000011581298260} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011568184020 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010404229384} + 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: 4000013426853722} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011581298260 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012820484798} + 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: + - {fileID: 4000013053309248} + - {fileID: 4000012605354570} + - {fileID: 4000010465752764} + - {fileID: 4000014115540756} + - {fileID: 4000014027683858} + - {fileID: 4000011564629680} + - {fileID: 4000012705674684} + - {fileID: 4000013166053970} + - {fileID: 4000012351109320} + - {fileID: 4000011636682892} + m_Father: {fileID: 4000011967535116} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011636682892 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012054331002} + 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: 4000011581298260} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011684154134 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013724541018} + m_LocalRotation: {x: 0.017080953, y: -0.07918932, z: 0.52647054, w: 0.84632504} + m_LocalPosition: {x: -0.0091353385, y: 0.005499125, z: -0.00011681918} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000012842689428} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011697994020 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012739084852} + 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: 4000013426853722} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011814646714 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012207203502} + m_LocalRotation: {x: 0, y: -0.70108956, z: -0, w: 0.71307325} + m_LocalPosition: {x: -0.019321036, y: 0, z: 9.992007e-18} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000010811930704} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011937531554 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013783390420} + 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: 4000013426853722} + m_RootOrder: 9 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011939430368 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010353348604} + 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: 4000013426853722} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000011967535116 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011186482016} + 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: 4000011581298260} + - {fileID: 4000010715895894} + m_Father: {fileID: 435882} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012029189976 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012687583852} + m_LocalRotation: {x: 0.05660452, y: -0.05795374, z: -0.0046757394, w: 0.9967023} + m_LocalPosition: {x: -0.0019170768, y: -0.0073837424, z: -0.00091214647} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000012842689428} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012208151102 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013068196432} + 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: 4000013426853722} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012272704210 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012150430946} + 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: 4000013426853722} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012351109320 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013237565076} + 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: 4000011581298260} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012384171158 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011727251070} + m_LocalRotation: {x: 0.056604527, y: 0.05795374, z: 0.004675739, w: 0.9967023} + m_LocalPosition: {x: 0.0019170768, y: -0.0073837424, z: -0.00091214647} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000010715895894} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012540091686 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010618960340} + 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: 4000013426853722} + - {fileID: 4000012842689428} + m_Father: {fileID: 433868} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012605354570 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010540851970} + 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: 4000011581298260} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012705338176 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011598347302} + m_LocalRotation: {x: -4.5059287e-17, y: -0.70108956, z: -6.5911624e-17, w: 0.71307325} + m_LocalPosition: {x: -0.019321036, y: 0, z: 9.992007e-18} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000013724697446} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012705674684 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011251501750} + 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: 4000011581298260} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012724529694 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010567967398} + m_LocalRotation: {x: 0.056604527, y: 0.05795374, z: 0.004675739, w: 0.9967023} + m_LocalPosition: {x: 0.001420367, y: 0.021865888, z: -0.005495974} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000010715895894} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012842689428 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012196631598} + m_LocalRotation: {x: 0, y: 0.7071068, z: 0.7071068, w: -8.659561e-17} + m_LocalPosition: {x: -0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4000012029189976} + - {fileID: 4000011684154134} + - {fileID: 4000013285752372} + - {fileID: 4000010076381212} + - {fileID: 4000010811930704} + - {fileID: 4000011540650158} + m_Father: {fileID: 4000012540091686} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000012961726978 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011963518446} + 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: 4000013426853722} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000013053309248 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010176019332} + 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: 4000011581298260} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000013166053970 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011875671922} + 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: 4000011581298260} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000013285752372 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013039583002} + m_LocalRotation: {x: 0.05660452, y: -0.05795374, z: -0.0046757394, w: 0.9967023} + m_LocalPosition: {x: 0.012083728, y: -0.01402681, z: -0.0007126567} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000012842689428} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000013426853722 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010829465458} + 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: + - {fileID: 4000012208151102} + - {fileID: 4000011697994020} + - {fileID: 4000012272704210} + - {fileID: 4000011465109902} + - {fileID: 4000011939430368} + - {fileID: 4000011208292394} + - {fileID: 4000011568184020} + - {fileID: 4000012961726978} + - {fileID: 4000010499556928} + - {fileID: 4000011937531554} + m_Father: {fileID: 4000012540091686} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000013448249666 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010186355062} + m_LocalRotation: {x: -0.17913595, y: 0.14914332, z: 0.022661837, w: 0.97218984} + m_LocalPosition: {x: -0.013074442, y: -0.025639696, z: -0.027427113} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000010715895894} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000013724697446 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011032731176} + m_LocalRotation: {x: -0.003149668, y: 0.7098123, z: 0.002783398, w: 0.7043784} + m_LocalPosition: {x: -0.010637393, y: 0.00497835, z: -0.009418557} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 4000012705338176} + m_Father: {fileID: 4000010715895894} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000013876876732 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011996807892} + m_LocalRotation: {x: 0.07876507, y: 0.01894126, z: 0.5343878, w: 0.8413483} + m_LocalPosition: {x: 0.009152712, y: 0.0054823146, z: 0.000030916483} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 4000010715895894} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000014027683858 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010732039748} + 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: 4000011581298260} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4000014115540756 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013632609248} + 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: 4000011581298260} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4461464600332690 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1387099181202896} + 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: 496618} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &4823973753068400 +Transform: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1952448560374888} + 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: 496618} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!95 &95000011808594792 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011186482016} + m_Enabled: 1 + m_Avatar: {fileID: 9000000, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Controller: {fileID: 0} + m_CullingMode: 1 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!95 &95000014191315040 +Animator: + serializedVersion: 3 + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010618960340} + m_Enabled: 1 + m_Avatar: {fileID: 9000000, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Controller: {fileID: 0} + m_CullingMode: 1 + m_UpdateMode: 0 + m_ApplyRootMotion: 0 + m_LinearVelocityBlending: 0 + m_WarningMessage: + m_HasTransformHierarchy: 1 + m_AllowConstantClipSamplingOptimization: 1 +--- !u!114 &114000010091674760 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 154294} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114000010148578704 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012913350438} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0e33623ec5372748b5703f61a4df82d, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114000012207304612 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 188284} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114000012345544872 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 165584} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb7a6650b6cb46545967d3b380b7396c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!114 &114144217084364882 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1952448560374888} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a139d83bf6796734db220df8a5bfacbd, type: 3} + m_Name: + m_EditorClassIdentifier: + DiffuseFallbacks: + - {fileID: 2800000, guid: 7d8da3d06466cc04da8c020819170a59, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: b3e87b1024f5fa8408d004b398e7b0c0, type: 3} + NormalFallbacks: + - {fileID: 2800000, guid: 93a54b3b63bcc6d49b16f6bdb655b940, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 22a046c12fc7f3c4d98a98add109fa96, type: 3} + BodyColorTints: + - {r: 0.9764706, g: 0.8509804, b: 0.6862745, a: 1} + - {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + - {r: 0.9764706, g: 0.9019608, b: 0.6745098, a: 1} + - {r: 0.7647059, g: 0.6039216, b: 0.2509804, a: 1} + - {r: 0.45490196, g: 0.1882353, b: 0, a: 1} + - {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + LocalAvatarConfig: + ComponentMaterialProperties: [] + MaterialPropertyBlock: + Colors: [] + DiffuseIntensities: [] + RimIntensities: [] + BacklightIntensities: [] + ReflectionIntensities: [] + DefaultAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + Textures: [] + DiffuseIntensity: 0.301 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: [] + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 0.80784315, g: 0.80784315, b: 0.80784315, a: 1} + Textures: [] + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.22352941, g: 0.11372549, b: 0, a: 1} + Textures: [] + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + Textures: [] + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + DiffuseIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + RimIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + BacklightIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + ReflectionIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 +--- !u!114 &114533516196804206 +MonoBehaviour: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1387099181202896} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a139d83bf6796734db220df8a5bfacbd, type: 3} + m_Name: + m_EditorClassIdentifier: + DiffuseFallbacks: + - {fileID: 2800000, guid: 7d8da3d06466cc04da8c020819170a59, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: b3e87b1024f5fa8408d004b398e7b0c0, type: 3} + NormalFallbacks: + - {fileID: 2800000, guid: 93a54b3b63bcc6d49b16f6bdb655b940, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 22a046c12fc7f3c4d98a98add109fa96, type: 3} + BodyColorTints: + - {r: 0.9764706, g: 0.8509804, b: 0.6862745, a: 1} + - {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + - {r: 0.9764706, g: 0.9019608, b: 0.6745098, a: 1} + - {r: 0.7647059, g: 0.6039216, b: 0.2509804, a: 1} + - {r: 0.45490196, g: 0.1882353, b: 0, a: 1} + - {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + LocalAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.86, b: 0.77, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.3 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.6235, g: 0.4627, b: 0.3412, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: -5.3487954e+9, g: 771.1758, b: -5.6686517e+23, a: 4.9667446e-34} + Textures: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 1, y: 0.86, z: 0.77, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 0.6235, y: 0.4627, z: 0.3412, w: 1} + - {x: -0.025753247, y: -2.0311036e-13, z: -6.2685677e-31, w: -2.0021067e+22} + DiffuseIntensities: + - 0.3 + - 0.1 + - 0 + - 0.15 + - 0.15 + RimIntensities: + - 5 + - 2 + - 2.84 + - 4 + - 4 + BacklightIntensities: + - 1 + - 0.7 + - 0.7 + - 0.7 + - 0.7 + ReflectionIntensities: + - 0 + - 0.3 + - 0.4 + - 0 + - 0 + DefaultAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.86, b: 0.77, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.3 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.6235, g: 0.4627, b: 0.3412, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: -5.3487954e+9, g: 771.1758, b: -5.6686517e+23, a: 4.9667446e-34} + Textures: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 1, y: 0.86, z: 0.77, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 0.6235, y: 0.4627, z: 0.3412, w: 1} + - {x: -0.025753247, y: -2.0311036e-13, z: -6.2685677e-31, w: -2.0021067e+22} + DiffuseIntensities: + - 0.3 + - 0.1 + - 0 + - 0.15 + - 0.15 + RimIntensities: + - 5 + - 2 + - 2.84 + - 4 + - 4 + BacklightIntensities: + - 1 + - 0.7 + - 0.7 + - 0.7 + - 0.7 + ReflectionIntensities: + - 0 + - 0.3 + - 0.4 + - 0 + - 0 +--- !u!137 &137000010086889286 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013632609248} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300000, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000012724529694} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000012724529694} + m_AABB: + m_Center: {x: -0.00066094473, y: -0.0013324618, z: -0.013972076} + m_Extent: {x: 0.014561898, y: 0.009363493, z: 0.013364943} + m_DirtyAABB: 0 +--- !u!137 &137000010318330296 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013362553720} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300004, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000010076381212} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000010076381212} + m_AABB: + m_Center: {x: -0.015075567, y: -0.000016345643, z: 0.0018507377} + m_Extent: {x: 0.0069265487, y: 0.01454833, z: 0.0073075653} + m_DirtyAABB: 0 +--- !u!137 &137000010625253534 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013783390420} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300014, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000011684154134} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000011684154134} + m_AABB: + m_Center: {x: 0.000002396293, y: -0.000002480112, z: 0.0004961204} + m_Extent: {x: 0.0050600627, y: 0.005023708, z: 0.0025072547} + m_DirtyAABB: 0 +--- !u!137 &137000010692100556 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012459128118} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300012, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000012029189976} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000012029189976} + m_AABB: + m_Center: {x: -0.0000007278286, y: 0.000013420358, z: 0.00049956236} + m_Extent: {x: 0.0050891, y: 0.0051111123, z: 0.0025754925} + m_DirtyAABB: 0 +--- !u!137 &137000010724210166 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011875671922} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300002, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000013448249666} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000013448249666} + m_AABB: + m_Center: {x: 0.015085924, y: 0.00079575554, z: 0.0022845878} + m_Extent: {x: 0.007514255, y: 0.01456238, z: 0.0074783214} + m_DirtyAABB: 0 +--- !u!137 &137000011002884086 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013068196432} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300000, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000012842689428} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000012842689428} + m_AABB: + m_Center: {x: 0.0012377053, y: -0.019060574, z: -0.031179674} + m_Extent: {x: 0.030484837, y: 0.051344864, z: 0.03589142} + m_DirtyAABB: 0 +--- !u!137 &137000011798888872 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012561114658} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300018, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000013285752372} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000013285752372} + m_AABB: + m_Center: {x: 0.00000036275014, y: 0.0000008731149, z: 0.00057195796} + m_Extent: {x: 0.004508081, y: 0.0045095203, z: 0.0007474726} + m_DirtyAABB: 0 +--- !u!137 &137000011963534174 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011963518446} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300006, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000012842689428} + - {fileID: 4000010811930704} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000012842689428} + m_AABB: + m_Center: {x: 0.010604473, y: 0.0049807066, z: 0.0022465445} + m_Extent: {x: 0.01075476, y: 0.010751982, z: 0.007853846} + m_DirtyAABB: 0 +--- !u!137 &137000012017572084 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012739084852} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300002, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000011540650158} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000011540650158} + m_AABB: + m_Center: {x: -0.00066094473, y: 0.00133246, z: -0.01397207} + m_Extent: {x: 0.014561897, y: 0.009363488, z: 0.013364941} + m_DirtyAABB: 0 +--- !u!137 &137000012071317434 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000013237565076} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300008, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000010715895894} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000010715895894} + m_AABB: + m_Center: {x: -0.00016466528, y: 0.00024955347, z: -0.0010734652} + m_Extent: {x: 0.028195847, y: 0.028275441, z: 0.0059699165} + m_DirtyAABB: 0 +--- !u!137 &137000012107674410 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012150430946} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300016, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000013285752372} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000013285752372} + m_AABB: + m_Center: {x: 0.000017444137, y: -0.000100485515, z: 0.0012767066} + m_Extent: {x: 0.0021195891, y: 0.0016280017, z: 0.000015275204} + m_DirtyAABB: 0 +--- !u!137 &137000012327971406 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010404229384} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300010, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000012842689428} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000012842689428} + m_AABB: + m_Center: {x: 0.00016466528, y: 0.00024955347, z: -0.0010734657} + m_Extent: {x: 0.028195847, y: 0.028275441, z: 0.0059699193} + m_DirtyAABB: 0 +--- !u!137 &137000012369293346 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012703596256} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300010, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000010715895894} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000010715895894} + m_AABB: + m_Center: {x: -0.0012377053, y: -0.019060578, z: -0.031160343} + m_Extent: {x: 0.030484837, y: 0.051344868, z: 0.035910744} + m_DirtyAABB: 0 +--- !u!137 &137000012539278394 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010176019332} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300014, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000012384171158} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000012384171158} + m_AABB: + m_Center: {x: 0.0000007287599, y: 0.000013418961, z: 0.0005103166} + m_Extent: {x: 0.0050891, y: 0.005111113, z: 0.0025862462} + m_DirtyAABB: 0 +--- !u!137 &137000012561251176 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010353348604} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300008, guid: 111c043191ef2d44a8ff0233d087d59e, type: 3} + m_Bones: + - {fileID: 4000012842689428} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000012842689428} + m_AABB: + m_Center: {x: 0.016699273, y: 0.010818437, z: -0.03636413} + m_Extent: {x: 0.05463389, y: 0.021678235, z: 0.05022069} + m_DirtyAABB: 0 +--- !u!137 &137000012577831356 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010540851970} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300012, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000013876876732} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000013876876732} + m_AABB: + m_Center: {x: 0.00000034226105, y: -0.0000009154901, z: 0.000357131} + m_Extent: {x: 0.005052495, y: 0.00505287, z: 0.0025179668} + m_DirtyAABB: 0 +--- !u!137 &137000013198274284 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011251501750} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300006, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000010715895894} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000010715895894} + m_AABB: + m_Center: {x: -0.016699273, y: 0.010818433, z: -0.03636414} + m_Extent: {x: 0.05463389, y: 0.021678232, z: 0.050220694} + m_DirtyAABB: 0 +--- !u!137 &137000013701477334 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000012054331002} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300004, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000010715895894} + - {fileID: 4000013724697446} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000010715895894} + m_AABB: + m_Center: {x: -0.010547765, y: 0.0049847644, z: 0.002247721} + m_Extent: {x: 0.010899376, y: 0.010843772, z: 0.007860379} + m_DirtyAABB: 0 +--- !u!137 &137000014119152936 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000011772014684} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300018, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000010768823692} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000010768823692} + m_AABB: + m_Center: {x: -0.00000026077032, y: -0.0000001359731, z: 0.00054196385} + m_Extent: {x: 0.0044898377, y: 0.004489343, z: 0.000747473} + m_DirtyAABB: 0 +--- !u!137 &137000014239696370 +SkinnedMeshRenderer: + m_ObjectHideFlags: 1 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 100100000} + m_GameObject: {fileID: 1000010732039748} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 0 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 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: 4300016, guid: 20d82fb66fc22fa40ae34d9489bd6fcd, type: 3} + m_Bones: + - {fileID: 4000010768823692} + m_BlendShapeWeights: [] + m_RootBone: {fileID: 4000010768823692} + m_AABB: + m_Center: {x: 0.00004067365, y: 0.000027449336, z: 0.0012303336} + m_Extent: {x: 0.0015236207, y: 0.0021297478, z: 0.000019410509} + m_DirtyAABB: 0 diff --git a/Assets/Oculus/Avatar/Content/Prefabs/RemoteAvatar.prefab.meta b/Assets/Oculus/Avatar/Content/Prefabs/RemoteAvatar.prefab.meta new file mode 100644 index 0000000..3f7a713 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Prefabs/RemoteAvatar.prefab.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 90bf33f968e6bb44ea0208fc82c90a44 +timeCreated: 1468001728 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Textures.meta b/Assets/Oculus/Avatar/Content/Textures.meta new file mode 100644 index 0000000..de6bf6a --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: bdcbd118b7677cd4095ea9260191f2f6 +folderAsset: yes +timeCreated: 1536104808 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_1024.png b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_1024.png new file mode 100644 index 0000000..65ae94c Binary files /dev/null and b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_1024.png differ diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_1024.png.meta b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_1024.png.meta new file mode 100644 index 0000000..12aa695 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_1024.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 502d438d2584976448c3cdb146ed836d +timeCreated: 1518638636 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_2048.png b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_2048.png new file mode 100644 index 0000000..a81806a Binary files /dev/null and b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_2048.png differ diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_2048.png.meta b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_2048.png.meta new file mode 100644 index 0000000..61ae20c --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_2048.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: b3e87b1024f5fa8408d004b398e7b0c0 +timeCreated: 1518638636 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_256.png b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_256.png new file mode 100644 index 0000000..54e5283 Binary files /dev/null and b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_256.png differ diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_256.png.meta b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_256.png.meta new file mode 100644 index 0000000..69a14cd --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Textures/fallback_diffuse_roughness_256.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 7d8da3d06466cc04da8c020819170a59 +timeCreated: 1534371261 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_normal_1024.tif b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_1024.tif new file mode 100644 index 0000000..4730a9a Binary files /dev/null and b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_1024.tif differ diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_normal_1024.tif.meta b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_1024.tif.meta new file mode 100644 index 0000000..65aa22c --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_1024.tif.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 9fb4a3be60417d043865e457a9d51e63 +timeCreated: 1518638636 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_normal_2048.png b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_2048.png new file mode 100644 index 0000000..9d92996 Binary files /dev/null and b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_2048.png differ diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_normal_2048.png.meta b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_2048.png.meta new file mode 100644 index 0000000..6c93605 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_2048.png.meta @@ -0,0 +1,59 @@ +fileFormatVersion: 2 +guid: 22a046c12fc7f3c4d98a98add109fa96 +timeCreated: 1518638636 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + allowsAlphaSplitting: 0 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_normal_256.png b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_256.png new file mode 100644 index 0000000..28adeac Binary files /dev/null and b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_256.png differ diff --git a/Assets/Oculus/Avatar/Content/Textures/fallback_normal_256.png.meta b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_256.png.meta new file mode 100644 index 0000000..3321662 --- /dev/null +++ b/Assets/Oculus/Avatar/Content/Textures/fallback_normal_256.png.meta @@ -0,0 +1,68 @@ +fileFormatVersion: 2 +guid: 93a54b3b63bcc6d49b16f6bdb655b940 +timeCreated: 1534371337 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 4 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + sRGBTexture: 1 + linearTexture: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaUsage: 1 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + platformSettings: + - buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Editor.meta b/Assets/Oculus/Avatar/Editor.meta new file mode 100644 index 0000000..cc144f7 --- /dev/null +++ b/Assets/Oculus/Avatar/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6f6a577c077cce945b722f02f34c29f3 +folderAsset: yes +timeCreated: 1472072258 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Editor/AvatarMaterialEditor.cs b/Assets/Oculus/Avatar/Editor/AvatarMaterialEditor.cs new file mode 100644 index 0000000..6d2d09f --- /dev/null +++ b/Assets/Oculus/Avatar/Editor/AvatarMaterialEditor.cs @@ -0,0 +1,633 @@ +using UnityEngine; +using UnityEditor; +using NUnit.Framework; +using System.Linq; +using System.Collections.Generic; +using System; + +public class AvatarMaterialEditor : MaterialEditor { + + static Dictionary layerVisibilityMasks = new Dictionary(); + const int MaxLayerCount = 8; + + private const string NormalMapPrefix = "NORMAL_MAP"; + private const string ParallaxPrefix = "PARALLAX"; + private const string RoughnessPrefix = "ROUGHNESS"; + private const string LayerKeywordPrefix = "LAYERS_"; + private const string AlphaMaskUniform = "_AlphaMask"; + private const string DarkMultUniform = "_DarkMultiplier"; + private const string BaseColorUniform = "_BaseColor"; + private const string BaseMaskTypeUniform = "_BaseMaskType"; + private const string BaseMaskParametersUniform = "_BaseMaskParameters"; + private const string BaseMaskAxisUniform = "_BaseMaskAxis"; + private const string NormalMapUniform = "_NormalMap"; + private const string ParallaxMapUniform = "_ParallaxMap"; + private const string RoughnessMapUniform = "_RoughnessMap"; + private const string LayerSurfacePrefix = "_LayerSurface"; + private const string LayerColorPrefix = "_LayerColor"; + private const string LayerSampleParametersPrefix = "_LayerSampleParameters"; + private const string LayerMaskTypePrefix = "_LayerMaskType"; + private const string LayerMaskParametersPrefix = "_LayerMaskParameters"; + private const string LayerMaskAxisPrefix = "_LayerMaskAxis"; + private const string LayerBlendModePrefix = "_LayerBlendMode"; + private const string LayerSampleModePrefix = "_LayerSampleMode"; + + enum LayerSampleMode : int + { + Color, + Texture, + TextureSingleChannel, + Parallax, + RSRM, + Count + } + static readonly string[] layerSampleModeLabels = new string[(int)LayerSampleMode.Count] { "Color", "Texture", "Texture (single channel)", "Parallax", "RSRM" }; + + enum LayerMaskType : int + { + None, + Positional, + ViewReflection, + Fresnel, + Pulse, + Count + } + static readonly string[] layerMaskTypeLabels = new string[(int)LayerMaskType.Count] { "None", "Positional", "View reflection", "Fresnel", "Pulse" }; + + enum LayerBlendMode : int + { + Add, + Multiply, + Count + } + static readonly string[] layerBlendModeLabels = new string[(int)LayerBlendMode.Count] { "Add", "Multiply" }; + + Material[] previewMaterials = new Material[MaxLayerCount]; + Vector4[,] sampleParametersCache = new Vector4[MaxLayerCount, (int)LayerSampleMode.Count]; + Vector4[][] maskParametersCache = new Vector4[MaxLayerCount][]; + Vector4[][] maskAxisCache = new Vector4[MaxLayerCount][]; + Vector4[] baseMaskParametersCache = new Vector4[(int)LayerMaskType.Count]; + Vector4[] baseMaskAxisCache = new Vector4[(int)LayerMaskType.Count]; + PreviewRenderUtility previewUtility; + Mesh previewMesh; + + static readonly Vector4 PositionalMaskDefaults = new Vector4(0.0f, 1.0f, 1.0f, 0.0f); + static readonly Vector4 ViewReflectionMaskDefaults = new Vector4(1.0f, 0.0f, 1.0f, 0.0f); + static readonly Vector4 FresnelMaskDefaults = new Vector4(1.0f, 0.0f, 1.0f, 1.0f); + static readonly Vector4 PulseMaskDefaults = new Vector4(1.0f, 0.0f, 1.0f, 0.0f); + static readonly Vector4 MaskAxisDefault = new Vector4(0.0f, 1.0f, 0.0f, 0.0f); + + void Init() + { + if (previewUtility == null) + { + previewUtility = new PreviewRenderUtility(); + GameObject gameObject = (GameObject)EditorGUIUtility.LoadRequired("Previews/PreviewMaterials.fbx"); + previewMesh = gameObject.transform.Find("sphere").GetComponent().sharedMesh; + } + + baseMaskParametersCache[(int)LayerMaskType.Positional] = PositionalMaskDefaults; + baseMaskParametersCache[(int)LayerMaskType.ViewReflection] = ViewReflectionMaskDefaults; + baseMaskParametersCache[(int)LayerMaskType.Fresnel] = FresnelMaskDefaults; + baseMaskParametersCache[(int)LayerMaskType.Pulse] = PulseMaskDefaults; + + baseMaskAxisCache[(int)LayerMaskType.Positional] = MaskAxisDefault; + baseMaskAxisCache[(int)LayerMaskType.ViewReflection] = MaskAxisDefault; + + for (int i = 0; i < MaxLayerCount; ++i) + { + sampleParametersCache[i, (int)LayerSampleMode.Color] = new Vector4(1.0f, 1.0f, 1.0f, 1.0f); + sampleParametersCache[i, (int)LayerSampleMode.Texture] = new Vector4(0.0f, 0.0f, 1.0f, 1.0f); + sampleParametersCache[i, (int)LayerSampleMode.TextureSingleChannel] = new Vector4(1.0f, 0.0f, 0.0f, 0.0f); + sampleParametersCache[i, (int)LayerSampleMode.Parallax] = new Vector4(0.0f, 1.0f, 0.0f, 0.0f); + sampleParametersCache[i, (int)LayerSampleMode.RSRM] = new Vector4(0.0f, 1.0f, 1.0f, 0.0f); + + Vector4[] parametersCache = new Vector4[(int)LayerMaskType.Count]; + parametersCache[(int)LayerMaskType.Positional] = PositionalMaskDefaults; + parametersCache[(int)LayerMaskType.ViewReflection] = ViewReflectionMaskDefaults; + parametersCache[(int)LayerMaskType.Fresnel] = FresnelMaskDefaults; + parametersCache[(int)LayerMaskType.Pulse] = PulseMaskDefaults; + maskParametersCache[i] = parametersCache; + + Vector4[] axisCache = new Vector4[(int)LayerMaskType.Count]; + axisCache[(int)LayerMaskType.Positional] = MaskAxisDefault; + axisCache[(int)LayerMaskType.ViewReflection] = MaskAxisDefault; + axisCache[(int)LayerMaskType.Pulse] = MaskAxisDefault; + maskAxisCache[i] = axisCache; + } + } + + static class AvatarMaterialEditorGUILayout + { + public static bool KeywordToggle(string label, Material material, string keywordPrefix) + { + bool isEnabled = material.IsKeywordEnabled(keywordPrefix + "_ON"); + bool newIsEnabled = EditorGUILayout.Toggle(label, isEnabled); + if (newIsEnabled != isEnabled) + { + Undo.RecordObject(material, label + " change"); + if (newIsEnabled) + { + material.EnableKeyword(keywordPrefix + "_ON"); + material.DisableKeyword(keywordPrefix + "_OFF"); + } + else + { + material.EnableKeyword(keywordPrefix + "_OFF"); + material.DisableKeyword(keywordPrefix + "_ON"); + } + } + return newIsEnabled; + } + + public static Color ColorField(string label, Material material, string propertyName) + { + Color color = material.GetColor(propertyName); + Color newColor = EditorGUILayout.ColorField(label, color); + if (newColor != color) + { + Undo.RecordObject(material, label + " change"); + material.SetColor(propertyName, newColor); + } + return newColor; + } + + internal static int IntField(string label, Material material, string propertyName, string[] valueNames) + { + int currentValue = material.GetInt(propertyName); + int newValue = EditorGUILayout.Popup(label, currentValue, valueNames); + if (newValue != currentValue) + { + Undo.RecordObject(material, label + " change"); + material.SetInt(propertyName, newValue); + } + return newValue; + } + + internal static Vector2 Vector2Field(string label, Material material, string propertyName) + { + Vector4 currentValue = material.GetVector(propertyName); + Vector2 currentVec2 = new Vector2(currentValue.x, currentValue.y); + Vector2 newVec2 = EditorGUILayout.Vector2Field(label, currentVec2); + if (newVec2 != currentVec2) + { + Undo.RecordObject(material, label + " change"); + material.SetVector(propertyName, new Vector4(newVec2.x, newVec2.y, currentValue.z, currentValue.w)); + } + return newVec2; + } + + internal static Vector3 Vector3Field(string label, Material material, string propertyName) + { + Vector4 currentValue = material.GetVector(propertyName); + Vector3 currentVec3 = new Vector3(currentValue.x, currentValue.y, currentValue.z); + Vector3 newVec3 = EditorGUILayout.Vector3Field(label, currentVec3); + if (newVec3 != currentVec3) + { + Undo.RecordObject(material, label + " change"); + material.SetVector(propertyName, new Vector4(newVec3.x, newVec3.y, newVec3.z, currentValue.w)); + } + return newVec3; + } + + internal static float VectorComponentField(string label, Material material, string propertyName, int componentIndex) + { + Vector4 currentValue = material.GetVector(propertyName); + float currentComponent = currentValue[componentIndex]; + float newComponent = EditorGUILayout.FloatField(label, currentComponent); + if (newComponent != currentComponent) + { + Undo.RecordObject(material, label + " change"); + currentValue[componentIndex] = newComponent; + material.SetVector(propertyName, currentValue); + } + return newComponent; + } + + internal static Vector4 ChannelMaskField(string label, Material material, string propertyName) + { + Vector4 currentValue = material.GetVector(propertyName); + int currentChannel = 0; + for (int i = 0; i < 4; ++i) + { + if (currentValue[i] != 0) + { + currentChannel = i; + break; + } + } + int newChannel = EditorGUILayout.IntPopup(label, currentChannel, new string[] { "R", "G", "B", "A" }, new int[] { 0, 1, 2, 3 }); + if (newChannel != currentChannel) + { + Vector4 channelMask = Vector4.zero; + channelMask[newChannel] = 1.0f; + Undo.RecordObject(material, label + " change"); + currentValue = channelMask; + material.SetVector(propertyName, currentValue); + } + return currentValue; + } + } + + void MaskField( + string label, + Material material, + string maskTypePropertyName, + string maskParametersPropertyName, + string maskAxisPropertyName, + Vector4[] axisCache, + Vector4[] parameterCache, + bool normalMapEnabled) + { + EditorGUI.BeginChangeCheck(); + LayerMaskType maskType = (LayerMaskType)AvatarMaterialEditorGUILayout.IntField(label, material, maskTypePropertyName, layerMaskTypeLabels); + if (EditorGUI.EndChangeCheck()) + { + material.SetVector(maskAxisPropertyName, axisCache[(int)maskType]); + material.SetVector(maskParametersPropertyName, parameterCache[(int)maskType]); + } + + // Show mask-specific controls + EditorGUI.BeginChangeCheck(); + switch (maskType) + { + case LayerMaskType.Positional: + AvatarMaterialEditorGUILayout.Vector3Field("Axis", material, maskAxisPropertyName); + AvatarMaterialEditorGUILayout.VectorComponentField("Center distance", material, maskParametersPropertyName, 0); + AvatarMaterialEditorGUILayout.VectorComponentField("Fade above", material, maskParametersPropertyName, 1); + AvatarMaterialEditorGUILayout.VectorComponentField("Fade below", material, maskParametersPropertyName, 2); + break; + case LayerMaskType.ViewReflection: + AvatarMaterialEditorGUILayout.Vector3Field("Axis", material, maskAxisPropertyName); + AvatarMaterialEditorGUILayout.VectorComponentField("Fade begin", material, maskParametersPropertyName, 0); + AvatarMaterialEditorGUILayout.VectorComponentField("Fade end", material, maskParametersPropertyName, 1); + if (normalMapEnabled) + { + AvatarMaterialEditorGUILayout.VectorComponentField("Normal map strength", material, maskParametersPropertyName, 2); + } + break; + case LayerMaskType.Fresnel: + AvatarMaterialEditorGUILayout.VectorComponentField("Power", material, maskParametersPropertyName, 0); + AvatarMaterialEditorGUILayout.VectorComponentField("Fade begin", material, maskParametersPropertyName, 1); + AvatarMaterialEditorGUILayout.VectorComponentField("Fade end", material, maskParametersPropertyName, 2); + if (normalMapEnabled) + { + AvatarMaterialEditorGUILayout.VectorComponentField("Normal map strength", material, maskParametersPropertyName, 3); + } + break; + case LayerMaskType.Pulse: + AvatarMaterialEditorGUILayout.Vector3Field("Axis", material, maskAxisPropertyName); + AvatarMaterialEditorGUILayout.VectorComponentField("Pulse distance", material, maskParametersPropertyName, 0); + AvatarMaterialEditorGUILayout.VectorComponentField("Pulse speed", material, maskParametersPropertyName, 1); + AvatarMaterialEditorGUILayout.VectorComponentField("Power", material, maskParametersPropertyName, 2); + break; + } + if (EditorGUI.EndChangeCheck()) + { + parameterCache[(int)maskType] = material.GetVector(maskParametersPropertyName); + axisCache[(int)maskType] = material.GetVector(maskAxisPropertyName); + } + } + + public override void OnInspectorGUI() + { + Init(); + if (!isVisible) + { + return; + } + SetDefaultGUIWidths(); + + Material material = target as Material; + int layerCount = MaxLayerCount; + while (layerCount > 0 && !material.IsKeywordEnabled(GetPropertyName(LayerKeywordPrefix, layerCount))) + { + --layerCount; + } + if (layerCount == 0) + { + layerCount = 1; + material.EnableKeyword("LAYERS_" + layerCount); + } + + EditorGUILayout.LabelField("Global material properties"); + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + TextureField("AlphaMask", material, AlphaMaskUniform); + AvatarMaterialEditorGUILayout.ColorField("DarkMultiplier", material, DarkMultUniform); + AvatarMaterialEditorGUILayout.ColorField("BaseColor", material, BaseColorUniform); + bool normalMapEnabled = AvatarMaterialEditorGUILayout.KeywordToggle("Normal map enabled", material, NormalMapPrefix); + if (normalMapEnabled) + { + TextureField("Normal map", material, NormalMapUniform); + } + bool parallaxEnabled = AvatarMaterialEditorGUILayout.KeywordToggle("Parallax enabled", material, ParallaxPrefix); + if (parallaxEnabled) + { + TextureField("Parallax map", material, ParallaxMapUniform); + } + bool roughnessEnabled = AvatarMaterialEditorGUILayout.KeywordToggle("Roughness enabled", material, RoughnessPrefix); + if (roughnessEnabled) + { + TextureField("Roughness map", material, RoughnessMapUniform); + } + + MaskField("Base mask type", material, BaseMaskTypeUniform, BaseMaskParametersUniform, BaseMaskAxisUniform, baseMaskAxisCache, baseMaskParametersCache, normalMapEnabled); + + EditorGUILayout.EndVertical(); + + int layerVisibilityMask = 0; + layerVisibilityMasks.TryGetValue(material, out layerVisibilityMask); + + EditorGUILayout.LabelField("Layers"); + EditorGUI.indentLevel++; + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + int? removeLayerIndex = null; + int? swapSource = null; + int? swapTarget = null; + for (int i = 0; i < layerCount; ++i) + { + + // Draw the preview material + if (previewMaterials[i] == null) + previewMaterials[i] = CreatePreviewMaterial(material, i); + + const int previewSize = 64; + const int buttonSize = 20; + Rect layerHeaderRect = GUILayoutUtility.GetRect(previewSize, previewSize, GUILayout.ExpandWidth(true)); + + // Draw the preview texture +#if UNITY_2017_1_OR_NEWER + Camera cam = previewUtility.camera; +#else + Camera cam = previewUtility.m_Camera; +#endif + cam.transform.position = Vector3.forward * 5.0f; + cam.transform.rotation = Quaternion.identity; + cam.transform.LookAt(Vector3.zero); + previewUtility.BeginStaticPreview(new Rect(0, 0, previewSize, previewSize)); + previewUtility.DrawMesh(previewMesh, Vector3.zero, Quaternion.identity, previewMaterials[i], 0); + cam.Render(); + Texture preview = previewUtility.EndStaticPreview(); + GUI.Label(new Rect(layerHeaderRect.xMax - previewSize - buttonSize, layerHeaderRect.y, previewSize, previewSize), preview); + + float yButton = layerHeaderRect.y; + EditorGUI.BeginDisabledGroup(layerCount <= 1); + if (GUI.Button(new Rect(layerHeaderRect.xMax - buttonSize, yButton, buttonSize, buttonSize), new GUIContent("X", "Remove layer"))) + { + removeLayerIndex = i; + } + yButton += buttonSize + 4; + EditorGUI.EndDisabledGroup(); + + EditorGUI.BeginDisabledGroup(i == 0); + if (GUI.Button(new Rect(layerHeaderRect.xMax - buttonSize, yButton, buttonSize, buttonSize), new GUIContent("^", "Move layer up"))) + { + swapSource = i; + swapTarget = i - 1; + } + yButton += buttonSize; + EditorGUI.EndDisabledGroup(); + + EditorGUI.BeginDisabledGroup(i == layerCount - 1); + if (GUI.Button(new Rect(layerHeaderRect.xMax - buttonSize, yButton, buttonSize, buttonSize), new GUIContent("v", "Move layer down"))) + { + swapSource = i; + swapTarget = i + 1; + } + yButton += buttonSize; + EditorGUI.EndDisabledGroup(); + + // Create a toggleable group for the layer + int layerMaskBit = 1 << i; + bool layerVisible = (layerVisibilityMask & layerMaskBit) != 0; + layerVisible = EditorGUI.Foldout(layerHeaderRect, layerVisible, string.Format("Layer {0}", i + 1)); + + if (layerVisible) + layerVisibilityMask |= layerMaskBit; + else + layerVisibilityMask &= ~layerMaskBit; + if (layerVisible) + { + EditorGUILayout.BeginVertical(EditorStyles.helpBox); + EditorGUI.BeginChangeCheck(); + { + // Handle the blend mode + AvatarMaterialEditorGUILayout.IntField("Blend mode", material, GetPropertyName(LayerBlendModePrefix, i), layerBlendModeLabels); + + // Handle the sample mode selector + string layerSampleParametersProperty = GetPropertyName(LayerSampleParametersPrefix, i); + EditorGUI.BeginChangeCheck(); + LayerSampleMode sampleMode = (LayerSampleMode)AvatarMaterialEditorGUILayout.IntField("Sample mode", material, GetPropertyName(LayerSampleModePrefix, i), layerSampleModeLabels); + if (EditorGUI.EndChangeCheck()) + { + material.SetVector(layerSampleParametersProperty, sampleParametersCache[i, (int)sampleMode]); + } + + // Show the mode-specific sample controls + EditorGUI.BeginChangeCheck(); + AvatarMaterialEditorGUILayout.ColorField("Surface color", material, GetPropertyName(LayerColorPrefix, i)); + switch (sampleMode) { + case LayerSampleMode.Texture: + TextureField("Surface texture", material, GetPropertyName(LayerSurfacePrefix, i)); + AvatarMaterialEditorGUILayout.Vector2Field("Panning speed", material, layerSampleParametersProperty); + break; + case LayerSampleMode.TextureSingleChannel: + TextureField("Surface texture", material, GetPropertyName(LayerSurfacePrefix, i)); + AvatarMaterialEditorGUILayout.ChannelMaskField("Channel", material, layerSampleParametersProperty); + break; + case LayerSampleMode.Parallax: + TextureField("Surface texture", material, GetPropertyName(LayerSurfacePrefix, i)); + AvatarMaterialEditorGUILayout.VectorComponentField("Parallax min height", material, layerSampleParametersProperty, 0); + AvatarMaterialEditorGUILayout.VectorComponentField("Parallax max height", material, layerSampleParametersProperty, 1); + break; + case LayerSampleMode.RSRM: + TextureField("RSRM texture", material, GetPropertyName(LayerSurfacePrefix, i)); + if (roughnessEnabled) + { + AvatarMaterialEditorGUILayout.VectorComponentField("Roughness min", material, layerSampleParametersProperty, 0); + AvatarMaterialEditorGUILayout.VectorComponentField("Roughness max", material, layerSampleParametersProperty, 1); + } + else + { + AvatarMaterialEditorGUILayout.VectorComponentField("Roughness", material, layerSampleParametersProperty, 0); + } + if (normalMapEnabled) + { + AvatarMaterialEditorGUILayout.VectorComponentField("Normal map strength", material, layerSampleParametersProperty, 2); + } + break; + } + if (EditorGUI.EndChangeCheck()) + { + sampleParametersCache[i, (int)sampleMode] = material.GetVector(layerSampleParametersProperty); + } + + // Handle the mask mode selector + string maskParametersName = GetPropertyName(LayerMaskParametersPrefix, i); + string maskAxisName = GetPropertyName(LayerMaskAxisPrefix, i); + MaskField("Mask Type", material, GetPropertyName(LayerMaskTypePrefix, i), maskParametersName, maskAxisName, maskAxisCache[i], maskParametersCache[i], normalMapEnabled); + } + if (EditorGUI.EndChangeCheck()) + { + previewMaterials[i] = null; + } + EditorGUILayout.EndVertical(); + } + } + layerVisibilityMasks[material] = layerVisibilityMask; + + if (layerCount < MaxLayerCount) + { + if (GUILayout.Button("Add layer")) + { + Undo.RecordObject(material, "Add layer"); + SetLayerCount(material, layerCount + 1); + removeLayerIndex = null; + } + } + if (removeLayerIndex.HasValue) + { + Undo.RecordObject(material, "Remove layer"); + for (int i = removeLayerIndex.Value; i < layerCount - 1; ++i) + { + CopyAttributes(material, i + 1, i); + } + SetLayerCount(material, layerCount - 1); + } + if (swapSource.HasValue && swapTarget.HasValue) + { + Undo.RecordObject(material, string.Format("Swap layers {1} and {0}", swapSource.Value, swapTarget.Value)); + SwapAttributes(material, swapSource.Value, swapTarget.Value); + } + + EditorGUI.indentLevel--; + EditorGUILayout.EndVertical(); + EditorUtility.SetDirty(target); + } + + public Texture TextureField(string label, Material material, string propertyName) + { + Texture texture = material.GetTexture(propertyName); + MaterialProperty property = MaterialEditor.GetMaterialProperty(new[] { material }, propertyName); + Texture newTexture = base.TextureProperty(property, label); + if (newTexture != texture) + { + Undo.RecordObject(material, label + " change"); + material.SetTexture(propertyName, newTexture); + } + return newTexture; + } + + private Material CreatePreviewMaterial(Material material, int layerIndex) + { + Material previewMaterial = new Material(material); + CopyAttributes(previewMaterial, layerIndex, 0); + SetLayerCount(previewMaterial, 1); + previewMaterial.SetVector(DarkMultUniform, new Vector4(0.6f, 0.6f, 0.6f, 1.0f)); + previewMaterial.SetVector(BaseColorUniform, new Vector4(0.0f, 0.0f, 0.0f, 1.0f)); + previewMaterial.SetTexture(AlphaMaskUniform, EditorGUIUtility.whiteTexture); + return previewMaterial; + } + + private void SetLayerCount(Material material, int layerCount) + { + for (int i = 0; i < MaxLayerCount; ++i) + { + string layerCountProperty = GetPropertyName("LAYERS_", i + 1); + if (i + 1 == layerCount) + material.EnableKeyword(layerCountProperty); + else + material.DisableKeyword(layerCountProperty); + } + } + + private static string GetPropertyName(string baseName, int index) + { + return string.Format("{0}{1}", baseName, index); + } + + class LayerAttributes + { + public Texture surface { get; private set; } + public Color color { get; private set; } + public LayerMaskType maskType { get; private set; } + public Vector4 maskParameters { get; private set; } + public Vector4 maskAxis { get; private set; } + public LayerSampleMode sampleMode { get; private set; } + public Vector4 sampleParameters { get; private set; } + public LayerBlendMode blendMode { get; private set; } + public LayerAttributes() + { + this.surface = null; + this.color = Color.white; + this.maskType = (int)LayerMaskType.None; + this.maskParameters = Vector4.zero; + this.maskAxis = new Vector4(0.0f, 1.0f, 0.0f, 0.0f); + this.sampleMode = (int)LayerSampleMode.Color; + this.sampleParameters = new Vector4(1.0f, 1.0f, 1.0f, 1.0f); + this.blendMode = (int)LayerBlendMode.Add; + } + public LayerAttributes( + Texture surface, + Color color, + LayerMaskType maskType, + Vector3 maskParameters, + Vector4 maskAxis, + LayerSampleMode sampleMode, + Vector4 sampleParameters, + LayerBlendMode blendMode + ) { + this.surface = surface; + this.color = color; + this.maskType = maskType; + this.maskParameters = maskParameters; + this.maskAxis = maskAxis; + this.sampleMode = sampleMode; + this.sampleParameters = sampleParameters; + this.blendMode = blendMode; + } + } + + private void CopyAttributes(Material material, int sourceIndex, int targetIndex) + { + LayerAttributes attributes = GetLayerAttributes(material, sourceIndex); + SetLayerAttributes(material, targetIndex, attributes); + previewMaterials[targetIndex] = null; + } + + private void SwapAttributes(Material material, int sourceIndex, int targetIndex) + { + LayerAttributes sourceAttributes = GetLayerAttributes(material, sourceIndex); + LayerAttributes targetAttributes = GetLayerAttributes(material, targetIndex); + SetLayerAttributes(material, sourceIndex, targetAttributes); + SetLayerAttributes(material, targetIndex, sourceAttributes); + previewMaterials[sourceIndex] = null; + previewMaterials[targetIndex] = null; + } + + private static LayerAttributes GetLayerAttributes(Material material, int layerIndex) + { + return new LayerAttributes( + material.GetTexture(GetPropertyName(LayerSurfacePrefix, layerIndex)), + material.GetColor(GetPropertyName(LayerColorPrefix, layerIndex)), + (LayerMaskType)material.GetInt(GetPropertyName(LayerMaskTypePrefix, layerIndex)), + material.GetVector(GetPropertyName(LayerMaskParametersPrefix, layerIndex)), + material.GetVector(GetPropertyName(LayerMaskAxisPrefix, layerIndex)), + (LayerSampleMode)material.GetInt(GetPropertyName(LayerSampleModePrefix, layerIndex)), + material.GetVector(GetPropertyName(LayerSampleParametersPrefix, layerIndex)), + (LayerBlendMode)material.GetInt(GetPropertyName(LayerBlendModePrefix, layerIndex)) + ); + } + + private static void SetLayerAttributes(Material material, int layerIndex, LayerAttributes attributes) + { + material.SetTexture(GetPropertyName(LayerSurfacePrefix, layerIndex), attributes.surface); + material.SetColor(GetPropertyName(LayerColorPrefix, layerIndex), attributes.color); + material.SetInt(GetPropertyName(LayerMaskTypePrefix, layerIndex), (int)attributes.maskType); + material.SetVector(GetPropertyName(LayerMaskParametersPrefix, layerIndex), attributes.maskParameters); + material.SetVector(GetPropertyName(LayerMaskAxisPrefix, layerIndex), attributes.maskAxis); + material.SetInt(GetPropertyName(LayerSampleModePrefix, layerIndex), (int)attributes.sampleMode); + material.SetVector(GetPropertyName(LayerSampleParametersPrefix, layerIndex), attributes.sampleParameters); + material.SetInt(GetPropertyName(LayerBlendModePrefix, layerIndex), (int)attributes.blendMode); + } +} diff --git a/Assets/Oculus/Avatar/Editor/AvatarMaterialEditor.cs.meta b/Assets/Oculus/Avatar/Editor/AvatarMaterialEditor.cs.meta new file mode 100644 index 0000000..e64ea04 --- /dev/null +++ b/Assets/Oculus/Avatar/Editor/AvatarMaterialEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: fdddb32bde2072f4da6baf73fd9ebddc +timeCreated: 1470865818 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Plugins.meta b/Assets/Oculus/Avatar/Plugins.meta new file mode 100644 index 0000000..ca52fad --- /dev/null +++ b/Assets/Oculus/Avatar/Plugins.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 7e0c9e63876be544fb12244c66f5bced +folderAsset: yes +timeCreated: 1522867061 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Plugins/Android32.meta b/Assets/Oculus/Avatar/Plugins/Android32.meta new file mode 100644 index 0000000..b4ad94c --- /dev/null +++ b/Assets/Oculus/Avatar/Plugins/Android32.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c75924ae6be2e4d4a8c9021c599ac872 +folderAsset: yes +timeCreated: 1522867080 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Plugins/Android32/libovravatarloader.so b/Assets/Oculus/Avatar/Plugins/Android32/libovravatarloader.so new file mode 100644 index 0000000..094f389 Binary files /dev/null and b/Assets/Oculus/Avatar/Plugins/Android32/libovravatarloader.so differ diff --git a/Assets/Oculus/Avatar/Plugins/Android32/libovravatarloader.so.meta b/Assets/Oculus/Avatar/Plugins/Android32/libovravatarloader.so.meta new file mode 100644 index 0000000..146b37b --- /dev/null +++ b/Assets/Oculus/Avatar/Plugins/Android32/libovravatarloader.so.meta @@ -0,0 +1,25 @@ +fileFormatVersion: 2 +guid: 0dc1a28a4f6367642b859b703b901f30 +timeCreated: 1516392277 +licenseType: Store +PluginImporter: + serializedVersion: 1 + iconMap: {} + executionOrder: {} + isPreloaded: 0 + isOverridable: 0 + platformData: + Android: + enabled: 1 + settings: + CPU: ARMv7 + Any: + enabled: 0 + settings: {} + Editor: + enabled: 0 + settings: + DefaultValueInitialized: true + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources.meta b/Assets/Oculus/Avatar/Resources.meta new file mode 100644 index 0000000..4999339 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 3eeca1466db69a046849a21351c6ab64 +folderAsset: yes +timeCreated: 1536104808 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials.meta b/Assets/Oculus/Avatar/Resources/Materials.meta new file mode 100644 index 0000000..a546714 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: a082ff1bb115495438c0dbd2a47e2b0f +folderAsset: yes +timeCreated: 1525971172 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc b/Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc new file mode 100644 index 0000000..6b37b13 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc @@ -0,0 +1,318 @@ +#ifndef AVATAR_UTIL_CG_INCLUDED +#define AVATAR_UTIL_CG_INCLUDED + +#include "UnityCG.cginc" + +#define SAMPLE_MODE_COLOR 0 +#define SAMPLE_MODE_TEXTURE 1 +#define SAMPLE_MODE_TEXTURE_SINGLE_CHANNEL 2 +#define SAMPLE_MODE_PARALLAX 3 +#define SAMPLE_MODE_RSRM 4 + +#define MASK_TYPE_NONE 0 +#define MASK_TYPE_POSITIONAL 1 +#define MASK_TYPE_REFLECTION 2 +#define MASK_TYPE_FRESNEL 3 +#define MASK_TYPE_PULSE 4 + +#define BLEND_MODE_ADD 0 +#define BLEND_MODE_MULTIPLY 1 + +#ifdef LAYERS_1 +#define LAYER_COUNT 1 +#elif LAYERS_2 +#define LAYER_COUNT 2 +#elif LAYERS_3 +#define LAYER_COUNT 3 +#elif LAYERS_4 +#define LAYER_COUNT 4 +#elif LAYERS_5 +#define LAYER_COUNT 5 +#elif LAYERS_6 +#define LAYER_COUNT 6 +#elif LAYERS_7 +#define LAYER_COUNT 7 +#elif LAYERS_8 +#define LAYER_COUNT 8 +#endif + +#define DECLARE_LAYER_UNIFORMS(index) \ + int _LayerSampleMode##index; \ + int _LayerBlendMode##index; \ + int _LayerMaskType##index; \ + fixed4 _LayerColor##index; \ + sampler2D _LayerSurface##index; \ + float4 _LayerSurface##index##_ST; \ + float4 _LayerSampleParameters##index; \ + float4 _LayerMaskParameters##index; \ + float4 _LayerMaskAxis##index; + +DECLARE_LAYER_UNIFORMS(0) +DECLARE_LAYER_UNIFORMS(1) +DECLARE_LAYER_UNIFORMS(2) +DECLARE_LAYER_UNIFORMS(3) +DECLARE_LAYER_UNIFORMS(4) +DECLARE_LAYER_UNIFORMS(5) +DECLARE_LAYER_UNIFORMS(6) +DECLARE_LAYER_UNIFORMS(7) + +struct VertexOutput +{ + float4 pos : SV_POSITION; + float2 texcoord : TEXCOORD0; + float3 worldPos : TEXCOORD1; + float3 worldNormal : TEXCOORD2; + float3 viewDir : TEXCOORD3; + float4 vertColor : COLOR; + +#if NORMAL_MAP_ON || PARALLAX_ON + float3 worldTangent : TANGENT; + float3 worldBitangent : TEXCOORD5; +#endif +}; + +float _Alpha; +int _BaseMaskType; +float4 _BaseMaskParameters; +float4 _BaseMaskAxis; +fixed4 _DarkMultiplier; +fixed4 _BaseColor; +sampler2D _AlphaMask; +float4 _AlphaMask_ST; +sampler2D _AlphaMask2; +float4 _AlphaMask2_ST; +sampler2D _NormalMap; +float4 _NormalMap_ST; +sampler2D _ParallaxMap; +float4 _ParallaxMap_ST; +sampler2D _RoughnessMap; +float4 _RoughnessMap_ST; +float4x4 _ProjectorWorldToLocal; + +VertexOutput vert(appdata_full v) +{ + VertexOutput o; + UNITY_INITIALIZE_OUTPUT(VertexOutput, o); + + o.texcoord = v.texcoord.xy; + o.worldPos = mul(unity_ObjectToWorld, v.vertex); + o.vertColor = v.color; + o.viewDir = normalize(_WorldSpaceCameraPos.xyz - o.worldPos); + o.worldNormal = normalize(mul(unity_ObjectToWorld, float4(v.normal, 0.0)).xyz); + +#if NORMAL_MAP_ON || PARALLAX_ON + o.worldTangent = normalize(mul(unity_ObjectToWorld, float4(v.tangent.xyz, 0.0)).xyz); + o.worldBitangent = normalize(cross(o.worldNormal, o.worldTangent) * v.tangent.w); +#endif + + o.pos = UnityObjectToClipPos(v.vertex); + return o; +} + +#ifndef NORMAL_MAP_ON +#define COMPUTE_NORMAL IN.worldNormal +#else +#define COMPUTE_NORMAL normalize(mul(lerp(float3(0, 0, 1), surfaceNormal, normalMapStrength), tangentTransform)) +#endif + +float3 ComputeColor( + VertexOutput IN, + float2 uv, +#if PARALLAX_ON || NORMAL_MAP_ON + float3x3 tangentTransform, +#endif +#ifdef NORMAL_MAP_ON + float3 surfaceNormal, +#endif + sampler2D surface, + float4 surface_ST, + fixed4 color, + int sampleMode, + float4 sampleParameters +) { + if (sampleMode == SAMPLE_MODE_TEXTURE) { + float2 panning = _Time.g * sampleParameters.xy; + return tex2D(surface, (uv + panning) * surface_ST.xy + surface_ST.zw).rgb * color.rgb; + } + else if (sampleMode == SAMPLE_MODE_TEXTURE_SINGLE_CHANNEL) { + float4 channelMask = sampleParameters; + float4 channels = tex2D(surface, uv * surface_ST.xy + surface_ST.zw); + return dot(channels, channelMask) * color.rgb; + } +#ifdef PARALLAX_ON + else if (sampleMode == SAMPLE_MODE_PARALLAX) { + float parallaxMinHeight = sampleParameters.x; + float parallaxMaxHeight = sampleParameters.y; + float parallaxValue = tex2D(_ParallaxMap, TRANSFORM_TEX(uv, _ParallaxMap)).r; + float scaledHeight = lerp(parallaxMinHeight, parallaxMaxHeight, parallaxValue); + float2 parallaxUV = mul(tangentTransform, IN.viewDir).xy * scaledHeight; + return tex2D(surface, (uv * surface_ST.xy + surface_ST.zw) + parallaxUV).rgb * color.rgb; + } +#endif + else if (sampleMode == SAMPLE_MODE_RSRM) { + float roughnessMin = sampleParameters.x; + float roughnessMax = sampleParameters.y; +#ifdef ROUGHNESS_ON + float roughnessValue = tex2D(_RoughnessMap, TRANSFORM_TEX(uv, _RoughnessMap)).r; + float scaledRoughness = lerp(roughnessMin, roughnessMax, roughnessValue); +#else + float scaledRoughness = roughnessMin; +#endif + +#ifdef NORMAL_MAP_ON + float normalMapStrength = sampleParameters.z; +#endif + float3 viewReflect = reflect(-IN.viewDir, COMPUTE_NORMAL); + float viewAngle = viewReflect.y * 0.5 + 0.5; + return tex2D(surface, float2(scaledRoughness, viewAngle)).rgb * color.rgb; + } + return color.rgb; +} + +float ComputeMask( + VertexOutput IN, +#ifdef NORMAL_MAP_ON + float3x3 tangentTransform, + float3 surfaceNormal, +#endif + int maskType, + float4 layerParameters, + float3 maskAxis +) { + if (maskType == MASK_TYPE_POSITIONAL) { + float centerDistance = layerParameters.x; + float fadeAbove = layerParameters.y; + float fadeBelow = layerParameters.z; + float3 objPos = mul(unity_WorldToObject, float4(IN.worldPos, 1.0)).xyz; + float d = dot(objPos, maskAxis); + if (d > centerDistance) { + return saturate(1.0 - (d - centerDistance) / fadeAbove); + } + else { + return saturate(1.0 - (centerDistance - d) / fadeBelow); + } + } + else if (maskType == MASK_TYPE_REFLECTION) { + float fadeStart = layerParameters.x; + float fadeEnd = layerParameters.y; +#ifdef NORMAL_MAP_ON + float normalMapStrength = layerParameters.z; +#endif + float power = layerParameters.w; + float3 viewReflect = reflect(-IN.viewDir, COMPUTE_NORMAL); + float d = max(0.0, dot(viewReflect, maskAxis)); + return saturate(1.0 - (d - fadeStart) / (fadeEnd - fadeStart)); + } + else if (maskType == MASK_TYPE_FRESNEL) { + float power = layerParameters.x; + float fadeStart = layerParameters.y; + float fadeEnd = layerParameters.z; +#ifdef NORMAL_MAP_ON + float normalMapStrength = layerParameters.w; +#endif + float d = saturate(1.0 - max(0.0, dot(IN.viewDir, COMPUTE_NORMAL))); + float p = pow(d, power); + return saturate(lerp(fadeStart, fadeEnd, p)); + } + else if (maskType == MASK_TYPE_PULSE) { + float distance = layerParameters.x; + float speed = layerParameters.y; + float power = layerParameters.z; + float3 objPos = mul(unity_WorldToObject, float4(IN.worldPos, 1.0)).xyz; + float d = dot(objPos, maskAxis); + float theta = 6.2831 * frac((d - _Time.g * speed) / distance); + return saturate(pow((sin(theta) * 0.5 + 0.5), power)); + } + else { + return 1.0; + } +} + +float3 ComputeBlend(float3 source, float3 blend, float mask, int blendMode) { + if (blendMode == BLEND_MODE_MULTIPLY) { + return source * (blend * mask); + } + else { + return source + (blend * mask); + } +} + +float4 ComputeSurface(VertexOutput IN) +{ +#if PROJECTOR_ON + float3 projectorPos = mul(_ProjectorWorldToLocal, float4(IN.worldPos, 1.0)).xyz; + if (abs(projectorPos.x) > 1.0 || abs(projectorPos.y) > 1.0 || abs(projectorPos.z) > 1.0) + { + discard; + } + float2 uv = projectorPos.xy * 0.5 + 0.5; +#else + float2 uv = IN.texcoord.xy; +#endif + + fixed4 c = _BaseColor; + IN.worldNormal = normalize(IN.worldNormal); + +#if PARALLAX_ON || NORMAL_MAP_ON + float3x3 tangentTransform = float3x3(IN.worldTangent, IN.worldBitangent, IN.worldNormal); +#endif + +#ifdef NORMAL_MAP_ON + float3 surfaceNormal = UnpackNormal(tex2D(_NormalMap, TRANSFORM_TEX(uv, _NormalMap))); +#endif + +#if PARALLAX_ON || NORMAL_MAP_ON +#ifndef NORMAL_MAP_ON +#define COLOR_INPUTS IN, uv, tangentTransform +#define MASK_INPUTS IN +#else +#define COLOR_INPUTS IN, uv, tangentTransform, surfaceNormal +#define MASK_INPUTS IN, tangentTransform, surfaceNormal +#endif +#else +#define COLOR_INPUTS IN, uv +#define MASK_INPUTS IN +#endif + +#define LAYER_COLOR(index) ComputeColor(COLOR_INPUTS, _LayerSurface##index, _LayerSurface##index##_ST, _LayerColor##index, _LayerSampleMode##index, _LayerSampleParameters##index) +#define LAYER_MASK(index) ComputeMask(MASK_INPUTS, _LayerMaskType##index, _LayerMaskParameters##index, _LayerMaskAxis##index##.xyz) +#define LAYER_BLEND(index, c) ComputeBlend(c, LAYER_COLOR(index), LAYER_MASK(index), _LayerBlendMode##index) + + c.rgb = LAYER_BLEND(0, c.rgb); +#if LAYER_COUNT > 1 + c.rgb = LAYER_BLEND(1, c.rgb); +#endif +#if LAYER_COUNT > 2 + c.rgb = LAYER_BLEND(2, c.rgb); +#endif +#if LAYER_COUNT > 3 + c.rgb = LAYER_BLEND(3, c.rgb); +#endif +#if LAYER_COUNT > 4 + c.rgb = LAYER_BLEND(4, c.rgb); +#endif +#if LAYER_COUNT > 5 + c.rgb = LAYER_BLEND(5, c.rgb); +#endif +#if LAYER_COUNT > 6 + c.rgb = LAYER_BLEND(6, c.rgb); +#endif +#if LAYER_COUNT > 7 + c.rgb = LAYER_BLEND(7, c.rgb); +#endif + +#ifdef VERTALPHA_ON + float scaledValue = IN.vertColor.a * 2.0; + float alpha0weight = max(0.0, 1.0 - scaledValue); + float alpha2weight = max(0.0, scaledValue - 1.0); + float alpha1weight = 1.0 - alpha0weight - alpha2weight; + c.a = _Alpha * c.a * (tex2D(_AlphaMask, TRANSFORM_TEX(uv, _AlphaMask)).r * alpha1weight + tex2D(_AlphaMask2, TRANSFORM_TEX(uv, _AlphaMask2)).r * alpha2weight + alpha0weight) * ComputeMask(MASK_INPUTS, _BaseMaskType, _BaseMaskParameters, _BaseMaskAxis); +#else + c.a = _Alpha * c.a * tex2D(_AlphaMask, TRANSFORM_TEX(uv, _AlphaMask)).r * IN.vertColor.a * ComputeMask(MASK_INPUTS, _BaseMaskType, _BaseMaskParameters, _BaseMaskAxis); +#endif + c.rgb = lerp(c.rgb, c.rgb * _DarkMultiplier, IN.vertColor.r); + + return c; +} + +#endif diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc.meta b/Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc.meta new file mode 100644 index 0000000..523b6c7 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 80b6b34e742970d4bb0cdef9c74b04ae +timeCreated: 1525971186 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShader.shader b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShader.shader new file mode 100644 index 0000000..c3d6254 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShader.shader @@ -0,0 +1,141 @@ +Shader "OvrAvatar/AvatarSurfaceShader" { + Properties{ + // Global parameters + _Alpha("Alpha", Range(0.0, 1.0)) = 1.0 + _DarkMultiplier("Dark Multiplier", Color) = (0.6, 0.6, 0.6, 1.0) + _BaseColor("Base Color", Color) = (0.0, 0.0, 0.0, 0.0) + _BaseMaskType("Base Mask Type", Int) = 0 + _BaseMaskParameters("Base Mask Parameters", Vector) = (0, 0, 0, 0) + _BaseMaskAxis("Base Mask Axis", Vector) = (0, 1, 0, 0) + _AlphaMask("Alpha Mask", 2D) = "white" {} + _NormalMap("Normal Map", 2D) = "" {} + _ParallaxMap("Parallax Map", 2D) = "" {} + _RoughnessMap("Roughness Map", 2D) = "" {} + + // Layer 0 parameters + _LayerSampleMode0("Layer Sample Mode 0", Int) = 0 + _LayerBlendMode0("Layer Blend Mode 0", Int) = 0 + _LayerMaskType0("Layer Mask Type 0", Int) = 0 + _LayerColor0("Layer Color 0", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface0("Layer Surface 0", 2D) = "" {} + _LayerSampleParameters0("Layer Sample Parameters 0", Vector) = (0, 0, 0, 0) + _LayerMaskParameters0("Layer Mask Parameters 0", Vector) = (0, 0, 0, 0) + _LayerMaskAxis0("Layer Mask Axis 0", Vector) = (0, 1, 0, 0) + + // Layer 1 parameters + _LayerSampleMode1("Layer Sample Mode 1", Int) = 0 + _LayerBlendMode1("Layer Blend Mode 1", Int) = 0 + _LayerMaskType1("Layer Mask Type 1", Int) = 0 + _LayerColor1("Layer Color 1", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface1("Layer Surface 1", 2D) = "" {} + _LayerSampleParameters1("Layer Sample Parameters 1", Vector) = (0, 0, 0, 0) + _LayerMaskParameters1("Layer Mask Parameters 1", Vector) = (0, 0, 0, 0) + _LayerMaskAxis1("Layer Mask Axis 1", Vector) = (0, 1, 0, 0) + + // Layer 2 parameters + _LayerSampleMode2("Layer Sample Mode 2", Int) = 0 + _LayerBlendMode2("Layer Blend Mode 2", Int) = 0 + _LayerMaskType2("Layer Mask Type 2", Int) = 0 + _LayerColor2("Layer Color 2", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface2("Layer Surface 2", 2D) = "" {} + _LayerSampleParameters2("Layer Sample Parameters 2", Vector) = (0, 0, 0, 0) + _LayerMaskParameters2("Layer Mask Parameters 2", Vector) = (0, 0, 0, 0) + _LayerMaskAxis2("Layer Mask Axis 2", Vector) = (0, 1, 0, 0) + + // Layer 3 parameters + _LayerSampleMode3("Layer Sample Mode 3", Int) = 0 + _LayerBlendMode3("Layer Blend Mode 3", Int) = 0 + _LayerMaskType3("Layer Mask Type 3", Int) = 0 + _LayerColor3("Layer Color 3", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface3("Layer Surface 3", 2D) = "" {} + _LayerSampleParameters3("Layer Sample Parameters 3", Vector) = (0, 0, 0, 0) + _LayerMaskParameters3("Layer Mask Parameters 3", Vector) = (0, 0, 0, 0) + _LayerMaskAxis3("Layer Mask Axis 3", Vector) = (0, 1, 0, 0) + + // Layer 4 parameters + _LayerSampleMode4("Layer Sample Mode 4", Int) = 0 + _LayerBlendMode4("Layer Blend Mode 4", Int) = 0 + _LayerMaskType4("Layer Mask Type 4", Int) = 0 + _LayerColor4("Layer Color 4", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface4("Layer Surface 4", 2D) = "" {} + _LayerSampleParameters4("Layer Sample Parameters 4", Vector) = (0, 0, 0, 0) + _LayerMaskParameters4("Layer Mask Parameters 4", Vector) = (0, 0, 0, 0) + _LayerMaskAxis4("Layer Mask Axis 4", Vector) = (0, 1, 0, 0) + + // Layer 5 parameters + _LayerSampleMode5("Layer Sample Mode 5", Int) = 0 + _LayerBlendMode5("Layer Blend Mode 5", Int) = 0 + _LayerMaskType5("Layer Mask Type 5", Int) = 0 + _LayerColor5("Layer Color 5", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface5("Layer Surface 5", 2D) = "" {} + _LayerSampleParameters5("Layer Sample Parameters 5", Vector) = (0, 0, 0, 0) + _LayerMaskParameters5("Layer Mask Parameters 5", Vector) = (0, 0, 0, 0) + _LayerMaskAxis5("Layer Mask Axis 5", Vector) = (0, 1, 0, 0) + + // Layer 6 parameters + _LayerSampleMode6("Layer Sample Mode 6", Int) = 0 + _LayerBlendMode6("Layer Blend Mode 6", Int) = 0 + _LayerMaskType6("Layer Mask Type 6", Int) = 0 + _LayerColor6("Layer Color 6", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface6("Layer Surface 6", 2D) = "" {} + _LayerSampleParameters6("Layer Sample Parameters 6", Vector) = (0, 0, 0, 0) + _LayerMaskParameters6("Layer Mask Parameters 6", Vector) = (0, 0, 0, 0) + _LayerMaskAxis6("Layer Mask Axis 6", Vector) = (0, 1, 0, 0) + + // Layer 7 parameters + _LayerSampleMode7("Layer Sample Mode 7", Int) = 0 + _LayerBlendMode7("Layer Blend Mode 7", Int) = 0 + _LayerMaskType7("Layer Mask Type 7", Int) = 0 + _LayerColor7("Layer Color 7", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface7("Layer Surface 7", 2D) = "" {} + _LayerSampleParameters7("Layer Sample Parameters 7", Vector) = (0, 0, 0, 0) + _LayerMaskParameters7("Layer Mask Parameters 7", Vector) = (0, 0, 0, 0) + _LayerMaskAxis7("Layer Mask Axis 7", Vector) = (0, 1, 0, 0) + } + + SubShader + { + Tags + { + "Queue" = "Transparent" + "RenderType" = "Transparent" + } + + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + LOD 200 + + Pass + { + Name "FORWARD" + Tags + { + "LightMode" = "ForwardBase" + } + + CGPROGRAM + #pragma only_renderers d3d11 gles3 gles + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #pragma multi_compile PROJECTOR_OFF PROJECTOR_ON + #pragma multi_compile NORMAL_MAP_OFF NORMAL_MAP_ON + #pragma multi_compile PARALLAX_OFF PARALLAX_ON + #pragma multi_compile ROUGHNESS_OFF ROUGHNESS_ON + #pragma multi_compile VERTALPHA_OFF VERTALPHA_ON + #pragma multi_compile LAYERS_1 LAYERS_2 LAYERS_3 LAYERS_4 LAYERS_5 LAYERS_6 LAYERS_7 LAYERS_8 + + #include "Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc" + + float4 frag(VertexOutput IN) : COLOR + { + return ComputeSurface(IN); + } + + ENDCG + } + } + + FallBack "Diffuse" + CustomEditor "AvatarMaterialEditor" +} diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShader.shader.meta b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShader.shader.meta new file mode 100644 index 0000000..ba3836a --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 73f67c4e7bf718b4385aa6b1f8a06591 +timeCreated: 1525971190 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBS.shader b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBS.shader new file mode 100644 index 0000000..901f16f --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBS.shader @@ -0,0 +1,79 @@ +// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' + +Shader "OvrAvatar/AvatarSurfaceShaderPBS" { + Properties{ + // Global parameters + _Alpha("Alpha", Range(0.0, 1.0)) = 1.0 + _Albedo("Albedo (RGB)", 2D) = "" {} + _Surface("Metallic (R) Occlusion (G) and Smoothness (A)", 2D) = "" {} + } + SubShader{ + Tags { + "Queue" = "Transparent" + "RenderType" = "Transparent" + } + + Pass { + ZWrite On + Cull Off + ColorMask 0 + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #include "UnityCG.cginc" + + struct v2f { + float4 position : SV_POSITION; + }; + v2f vert(appdata_full v) { + // Output + v2f output; + output.position = UnityObjectToClipPos(v.vertex); + return output; + } + + float4 frag(v2f input) : COLOR { + return 0; + } + ENDCG + } + + LOD 200 + + CGPROGRAM + +// Physically based Standard lighting model, and enable shadows on all light types +#pragma surface surf Standard vertex:vert nolightmap alpha noforwardadd + +float _Alpha; +sampler2D _Albedo; +float4 _Albedo_ST; +sampler2D _Surface; +float4 _Surface_ST; + +struct Input { + float2 texcoord; +}; + +void vert(inout appdata_full v, out Input o) { + UNITY_INITIALIZE_OUTPUT(Input, o); + o.texcoord = v.texcoord.xy; +} + +void surf (Input IN, inout SurfaceOutputStandard o) { + o.Albedo = tex2D(_Albedo, TRANSFORM_TEX(IN.texcoord, _Albedo)).rgb; + float4 surfaceParams = tex2D(_Surface, TRANSFORM_TEX(IN.texcoord, _Surface)); + o.Metallic = surfaceParams.r; + o.Occlusion = surfaceParams.g; + o.Smoothness = surfaceParams.a; + o.Alpha = _Alpha; +} + +#pragma only_renderers d3d11 gles3 gles + +ENDCG + } + FallBack "Diffuse" +} diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBS.shader.meta b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBS.shader.meta new file mode 100644 index 0000000..d1cf3c0 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBS.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 5e52aa58207bbf24d8eb8ec969e9ae88 +timeCreated: 1525971190 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBSV2.shader b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBSV2.shader new file mode 100644 index 0000000..8a2845c --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBSV2.shader @@ -0,0 +1,39 @@ +Shader "OvrAvatar/AvatarSurfaceShaderPBSV2" { + Properties { + _AlbedoMultiplier ("Albedo Multiplier", Color) = (1,1,1,1) + _Albedo ("Albedo (RGB)", 2D) = "white" {} + _Metallicness("Metallicness", 2D) = "grey" {} + _GlossinessScale ("Glossiness Scale", Range(0,1)) = 0.5 + } + SubShader { + Tags { "RenderType"="Opaque" } + LOD 200 + + CGPROGRAM + // Physically based Standard lighting model, and enable shadows on all light types + #pragma surface surf Standard fullforwardshadows + + // Use shader model 3.0 target, to get nicer looking lighting + #pragma target 3.0 + + sampler2D _Albedo; + sampler2D _Metallicness; + + struct Input { + float2 uv_Albedo; + }; + + float _GlossinessScale; + float4 _AlbedoMultiplier; + + void surf (Input IN, inout SurfaceOutputStandard o) { + fixed4 c = tex2D (_Albedo, IN.uv_Albedo) * _AlbedoMultiplier; + o.Albedo = c.rgb; + o.Metallic = tex2D (_Metallicness, IN.uv_Albedo).r; + o.Smoothness = _GlossinessScale; + o.Alpha = 1.0; + } + ENDCG + } + FallBack "Diffuse" +} \ No newline at end of file diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBSV2.shader.meta b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBSV2.shader.meta new file mode 100644 index 0000000..dded93f --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderPBSV2.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 176faebcc612eb147900defeda2149cb +timeCreated: 1525971187 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderSelfOccluding.shader b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderSelfOccluding.shader new file mode 100644 index 0000000..54e8150 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderSelfOccluding.shader @@ -0,0 +1,175 @@ +Shader "OvrAvatar/AvatarSurfaceShaderSelfOccluding" { + Properties{ + // Global parameters + _Alpha("Alpha", Range(0.0, 1.0)) = 1.0 + _DarkMultiplier("Dark Multiplier", Color) = (0.6, 0.6, 0.6, 1.0) + _BaseColor("Base Color", Color) = (0.0, 0.0, 0.0, 0.0) + _BaseMaskType("Base Mask Type", Int) = 0 + _BaseMaskParameters("Base Mask Parameters", Vector) = (0, 0, 0, 0) + _BaseMaskAxis("Base Mask Axis", Vector) = (0, 1, 0, 0) + _AlphaMask("Alpha Mask", 2D) = "white" {} + _NormalMap("Normal Map", 2D) = "" {} + _ParallaxMap("Parallax Map", 2D) = "" {} + _RoughnessMap("Roughness Map", 2D) = "" {} + + // Layer 0 parameters + _LayerSampleMode0("Layer Sample Mode 0", Int) = 0 + _LayerBlendMode0("Layer Blend Mode 0", Int) = 0 + _LayerMaskType0("Layer Mask Type 0", Int) = 0 + _LayerColor0("Layer Color 0", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface0("Layer Surface 0", 2D) = "" {} + _LayerSampleParameters0("Layer Sample Parameters 0", Vector) = (0, 0, 0, 0) + _LayerMaskParameters0("Layer Mask Parameters 0", Vector) = (0, 0, 0, 0) + _LayerMaskAxis0("Layer Mask Axis 0", Vector) = (0, 1, 0, 0) + + // Layer 1 parameters + _LayerSampleMode1("Layer Sample Mode 1", Int) = 0 + _LayerBlendMode1("Layer Blend Mode 1", Int) = 0 + _LayerMaskType1("Layer Mask Type 1", Int) = 0 + _LayerColor1("Layer Color 1", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface1("Layer Surface 1", 2D) = "" {} + _LayerSampleParameters1("Layer Sample Parameters 1", Vector) = (0, 0, 0, 0) + _LayerMaskParameters1("Layer Mask Parameters 1", Vector) = (0, 0, 0, 0) + _LayerMaskAxis1("Layer Mask Axis 1", Vector) = (0, 1, 0, 0) + + // Layer 2 parameters + _LayerSampleMode2("Layer Sample Mode 2", Int) = 0 + _LayerBlendMode2("Layer Blend Mode 2", Int) = 0 + _LayerMaskType2("Layer Mask Type 2", Int) = 0 + _LayerColor2("Layer Color 2", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface2("Layer Surface 2", 2D) = "" {} + _LayerSampleParameters2("Layer Sample Parameters 2", Vector) = (0, 0, 0, 0) + _LayerMaskParameters2("Layer Mask Parameters 2", Vector) = (0, 0, 0, 0) + _LayerMaskAxis2("Layer Mask Axis 2", Vector) = (0, 1, 0, 0) + + // Layer 3 parameters + _LayerSampleMode3("Layer Sample Mode 3", Int) = 0 + _LayerBlendMode3("Layer Blend Mode 3", Int) = 0 + _LayerMaskType3("Layer Mask Type 3", Int) = 0 + _LayerColor3("Layer Color 3", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface3("Layer Surface 3", 2D) = "" {} + _LayerSampleParameters3("Layer Sample Parameters 3", Vector) = (0, 0, 0, 0) + _LayerMaskParameters3("Layer Mask Parameters 3", Vector) = (0, 0, 0, 0) + _LayerMaskAxis3("Layer Mask Axis 3", Vector) = (0, 1, 0, 0) + + // Layer 4 parameters + _LayerSampleMode4("Layer Sample Mode 4", Int) = 0 + _LayerBlendMode4("Layer Blend Mode 4", Int) = 0 + _LayerMaskType4("Layer Mask Type 4", Int) = 0 + _LayerColor4("Layer Color 4", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface4("Layer Surface 4", 2D) = "" {} + _LayerSampleParameters4("Layer Sample Parameters 4", Vector) = (0, 0, 0, 0) + _LayerMaskParameters4("Layer Mask Parameters 4", Vector) = (0, 0, 0, 0) + _LayerMaskAxis4("Layer Mask Axis 4", Vector) = (0, 1, 0, 0) + + // Layer 5 parameters + _LayerSampleMode5("Layer Sample Mode 5", Int) = 0 + _LayerBlendMode5("Layer Blend Mode 5", Int) = 0 + _LayerMaskType5("Layer Mask Type 5", Int) = 0 + _LayerColor5("Layer Color 5", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface5("Layer Surface 5", 2D) = "" {} + _LayerSampleParameters5("Layer Sample Parameters 5", Vector) = (0, 0, 0, 0) + _LayerMaskParameters5("Layer Mask Parameters 5", Vector) = (0, 0, 0, 0) + _LayerMaskAxis5("Layer Mask Axis 5", Vector) = (0, 1, 0, 0) + + // Layer 6 parameters + _LayerSampleMode6("Layer Sample Mode 6", Int) = 0 + _LayerBlendMode6("Layer Blend Mode 6", Int) = 0 + _LayerMaskType6("Layer Mask Type 6", Int) = 0 + _LayerColor6("Layer Color 6", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface6("Layer Surface 6", 2D) = "" {} + _LayerSampleParameters6("Layer Sample Parameters 6", Vector) = (0, 0, 0, 0) + _LayerMaskParameters6("Layer Mask Parameters 6", Vector) = (0, 0, 0, 0) + _LayerMaskAxis6("Layer Mask Axis 6", Vector) = (0, 1, 0, 0) + + // Layer 7 parameters + _LayerSampleMode7("Layer Sample Mode 7", Int) = 0 + _LayerBlendMode7("Layer Blend Mode 7", Int) = 0 + _LayerMaskType7("Layer Mask Type 7", Int) = 0 + _LayerColor7("Layer Color 7", Color) = (1.0, 1.0, 1.0, 1.0) + _LayerSurface7("Layer Surface 7", 2D) = "" {} + _LayerSampleParameters7("Layer Sample Parameters 7", Vector) = (0, 0, 0, 0) + _LayerMaskParameters7("Layer Mask Parameters 7", Vector) = (0, 0, 0, 0) + _LayerMaskAxis7("Layer Mask Axis 7", Vector) = (0, 1, 0, 0) + } + + SubShader + { + Tags + { + "Queue" = "Transparent" + "RenderType" = "Transparent" + } + + Pass + { + ZWrite On + Cull Off + ColorMask 0 + Offset 1, 1 + + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #include "UnityCG.cginc" + + struct v2f + { + float4 position : SV_POSITION; + }; + + v2f vert(appdata_full v) + { + // Output + v2f output; + output.position = UnityObjectToClipPos(v.vertex); + return output; + } + + float4 frag(v2f input) : COLOR + { + return 0; + } + + ENDCG + } + + Blend SrcAlpha OneMinusSrcAlpha + ZWrite Off + LOD 200 + + Pass + { + Name "FORWARD" + Tags + { + "LightMode" = "ForwardBase" + } + + CGPROGRAM + #pragma only_renderers d3d11 gles3 gles + #pragma vertex vert + #pragma fragment frag + #pragma target 3.0 + #pragma multi_compile PROJECTOR_OFF PROJECTOR_ON + #pragma multi_compile NORMAL_MAP_OFF NORMAL_MAP_ON + #pragma multi_compile PARALLAX_OFF PARALLAX_ON + #pragma multi_compile ROUGHNESS_OFF ROUGHNESS_ON + #pragma multi_compile VERTALPHA_OFF VERTALPHA_ON + #pragma multi_compile LAYERS_1 LAYERS_2 LAYERS_3 LAYERS_4 LAYERS_5 LAYERS_6 LAYERS_7 LAYERS_8 + + #include "Assets/Oculus/Avatar/Resources/Materials/AvatarMaterialStateShader.cginc" + + float4 frag(VertexOutput IN) : SV_Target + { + return ComputeSurface(IN); + } + + ENDCG + } + } + + FallBack "Diffuse" + CustomEditor "AvatarMaterialEditor" +} diff --git a/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderSelfOccluding.shader.meta b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderSelfOccluding.shader.meta new file mode 100644 index 0000000..3df41f3 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/AvatarSurfaceShaderSelfOccluding.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 69f342b79d37541489919a19cfd8a924 +timeCreated: 1525971190 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5.meta b/Assets/Oculus/Avatar/Resources/Materials/Version1.5.meta new file mode 100644 index 0000000..12db4fc --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: ced8ef067736a0b468cde573cc63e3ec +folderAsset: yes +timeCreated: 1525971173 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_CombinedMesh.shader b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_CombinedMesh.shader new file mode 100644 index 0000000..7417def --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_CombinedMesh.shader @@ -0,0 +1,217 @@ +// +// *** OvrAvatar Mobile Combined Mesh shader *** +// *** Texture array approach for rendering a combined mesh avatar *** +// +// This is a Unity vertex-fragnment shader implementation for our 1.5 skin shaded avatar look. +// The benefit of using this version is performance as it bypasses the PBR lighting model and +// so is generally recommended for use on mobile. +// +// This is the texture array version of the shader, which will draw all pre-combined +// components in one draw call. This is coupled with OvrAvatarMaterialManager to populate the +// shader properties. +// +// Shader keywords: +// - SECONDARY_LIGHT_ON SECONDARY_LIGHT_OFF +// Enable SECONDARY_LIGHT_ON for a second "light" as expressed by _SecondaryLightDirection +// and _SecondaryLightColor to influence the standard rim effect. This is designed for use in video watching +// experiences to sample the screen color and apply this to the rim term. +// - NO_BACKLIGHT_ON NO_BACKLIGHT_OFF +// This effect is active by default: NO_BACKLIGHT_OFF is the default and enables the effect. Enable NO_BACKLIGHT_ON +// to disable illumination from the rear of the main light direction. This mobile shader supports one directional +// light. This can cause the un-illuminated side of the avatar to lose definition. +// +// Notes: +// - The primary light in your scene will be used to calculate lighting. +// - We don't have a mouth bone, but the vertex shader will animate the vertices around the mouth +// area according to the _Voice value. This should be set according to local microphone value +// range between 0-1. + +Shader "OvrAvatar/Avatar_Mobile_CombinedMesh" +{ + Properties + { + _MainTex("Main Texture Array", 2DArray) = "white" {} + _NormalMap("Normal Map Array", 2DArray) = "bump" {} + _RoughnessMap("Roughness Map Array", 2DArray) = "black" {} + + _Dimmer("Dimmer", Range(0.0,1.0)) = 1.0 + _Alpha("Alpha", Range(0.0,1.0)) = 1.0 + + _Voice("Voice", Range(0.0,1.0)) = 1.0 + [HideInInspector] _MouthPosition("Mouth position", Vector) = (0,0,0,1) + [HideInInspector] _MouthDirection("Mouth direction", Vector) = (0,0,0,1) + [HideInInspector] _MouthEffectDistance("Mouth Effect Distance", Float) = 0.03 + [HideInInspector] _MouthEffectScale("Mouth Effect Scaler", Float) = 1 + + // Index into the texture array needs an offset for precision + _Slices("Texture Array Slices", int) = 4.97 + } + + SubShader + { + Pass + { + Tags + { + "LightMode" = "ForwardBase" "Queue" = "Transparent" "RenderType" = "Transparent" "IgnoreProjector" = "True" + } + LOD 100 + ZWrite On + ZTest LEqual + Cull Back + ColorMask RGB + Blend SrcAlpha OneMinusSrcAlpha + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile SECONDARY_LIGHT_OFF SECONDARY_LIGHT_ON + #pragma multi_compile BACKLIGHT_OFF BACKLIGHT_ON + #include "UnityCG.cginc" + #include "UnityLightingCommon.cginc" + + UNITY_DECLARE_TEX2DARRAY(_MainTex); + UNITY_DECLARE_TEX2DARRAY(_NormalMap); + uniform float4 _NormalMap_ST; + UNITY_DECLARE_TEX2DARRAY(_RoughnessMap); + + uniform int _Slices; + + uniform float4 _BaseColor[5]; + uniform float _DiffuseIntensity[5]; + uniform float _RimIntensity[5]; + uniform float _BacklightIntensity[5]; + uniform float _ReflectionIntensity[5]; + + uniform float3 _SecondaryLightDirection; + uniform float4 _SecondaryLightColor; + + uniform float _Dimmer; + uniform float _Alpha; + + uniform float _Voice; + uniform float4 _MouthPosition; + uniform float4 _MouthDirection; + uniform float _MouthEffectDistance; + uniform float _MouthEffectScale; + + static const fixed MOUTH_ZSCALE = 0.5f; + static const fixed MOUTH_DROPOFF = 0.01f; + + struct appdata + { + float4 vertex: POSITION; + float3 normal: NORMAL; + float4 tangent: TANGENT; + float2 texcoord: TEXCOORD0; + float4 vertexColor : COLOR0; + }; + + struct v2f + { + float4 pos : SV_POSITION; + float3 uv : TEXCOORD0; + float4 posWorld: TEXCOORD1; + float3 normalDir: TEXCOORD2; + float3 tangentDir: TEXCOORD3; + float3 bitangentDir: TEXCOORD4; + }; + + v2f vert(appdata v) + { + v2f o; + + // Mouth vertex animation with voip + float4 worldVert = mul(unity_ObjectToWorld, v.vertex);; + float3 delta = _MouthPosition - worldVert; + delta.z *= MOUTH_ZSCALE; + float dist = length(delta); + float scaledMouthDropoff = _MouthEffectScale * MOUTH_DROPOFF; + float scaledMouthEffect = _MouthEffectScale * _MouthEffectDistance; + float displacement = _Voice * smoothstep(scaledMouthEffect + scaledMouthDropoff, scaledMouthEffect, dist); + worldVert.xyz -= _MouthDirection * displacement; + v.vertex = mul(unity_WorldToObject, worldVert); + + // Calculate tangents for normal mapping + o.normalDir = normalize(UnityObjectToWorldNormal(v.normal)); + o.tangentDir = normalize(mul(unity_ObjectToWorld, half4(v.tangent.xyz, 0.0)).xyz); + o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); + + o.posWorld = worldVert; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv.xy = v.texcoord; + o.uv.z = v.vertexColor.x * _Slices; + return o; + } + + fixed4 frag(v2f i) : COLOR + { + // Light direction + float3 lightDirection = _WorldSpaceLightPos0.xyz; + + // Unpack normal map + float3 transformedNormalUV = i.uv; + transformedNormalUV.xy = float2(TRANSFORM_TEX(i.uv.xy, _NormalMap)); + float3 normalMap = UNITY_SAMPLE_TEX2DARRAY(_NormalMap, transformedNormalUV).rgb * 2 - 1; + + // Calculate normal + float3x3 tangentTransform = float3x3(i.tangentDir, i.bitangentDir, i.normalDir); + float3 normalDirection = normalize(mul(normalMap.rgb, tangentTransform)); + float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); + + // Apply view, normal, and lighting dependent terms + float VdotN = saturate(dot(viewDirection, normalDirection)); + float NdotL = saturate(dot(normalDirection, lightDirection)); + + float LightColorNdotL = NdotL * _LightColor0; + + // Sample the default reflection cubemap using the reflection vector + float3 worldReflection = reflect(-viewDirection, normalDirection); + half4 skyData = UNITY_SAMPLE_TEXCUBE(unity_SpecCube0, worldReflection); + // Decode cubemap data into actual color + half3 reflectionColor = DecodeHDR(skyData, unity_SpecCube0_HDR); + + // Calculate color for each component + float4 col; + // Get index into texture array + int componentIndex = floor(i.uv.z + 0.5); + // Diffuse texture sample + col = UNITY_SAMPLE_TEX2DARRAY(_MainTex, i.uv); + // Multiply in color tint (don't need to deal with gamma/linear here as conversion already done) + col.rgb *= _BaseColor[componentIndex]; + // Main light + col.rgb += _DiffuseIntensity[componentIndex] * LightColorNdotL; + #ifdef NO_BACKLIGHT_ON + //NO_BACKLIGHT_ON disables the rear illumination + #else + // Illuminate from behind + float3 reverseLightDirection = lightDirection * -1; + float NdotInvL = saturate(dot(normalDirection, normalize(reverseLightDirection))); + col.rgb += (_DiffuseIntensity[componentIndex] * _BacklightIntensity[componentIndex]) * NdotInvL * _LightColor0; + #endif + // Rim term + #ifdef SECONDARY_LIGHT_ON + // Secondary light proxy (direction and color) passed into the rim term + NdotL = saturate(dot(normalDirection, _SecondaryLightDirection)); + col.rgb += pow(1.0 - VdotN, _RimIntensity[componentIndex]) * NdotL * _SecondaryLightColor; + #else + col.rgb += pow(1.0 - VdotN, _RimIntensity[componentIndex]) * LightColorNdotL; + #endif + // Reflection + col.rgb += reflectionColor * UNITY_SAMPLE_TEX2DARRAY(_RoughnessMap, i.uv).a * _ReflectionIntensity[componentIndex]; + + // Global dimmer + col.rgb *= _Dimmer; + // Global alpha + col.a *= _Alpha; + #if !defined(UNITY_COLORSPACE_GAMMA) + col.rgb = GammaToLinearSpace(col.rgb); + #endif + // Return clamped final color + return saturate(col); + } + ENDCG + } + } +} diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_CombinedMesh.shader.meta b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_CombinedMesh.shader.meta new file mode 100644 index 0000000..179d4db --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_CombinedMesh.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 37d2b8298f61cd2469465fc36108675d +timeCreated: 1526311739 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_Loader.shader b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_Loader.shader new file mode 100644 index 0000000..e4a5dd9 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_Loader.shader @@ -0,0 +1,165 @@ +// +// *** OvrAvatar Mobile Single Component Loading shader *** +// +// Cut-down single component version of the avatar shader to be used during loading. +// See main mobile shader for implementation notes. + +Shader "OvrAvatar/Avatar_Mobile_Loader" +{ + Properties + { + _NormalMap("Normal Map", 2D) = "bump" {} + + _BaseColor("Color Tint", Color) = (1.0,1.0,1.0,1.0) + _Dimmer("Dimmer", Range(0.0,1.0)) = 1.0 + _LoadingDimmer("Loading Dimmer", Range(0.0,1.0)) = 1.0 + _Alpha("Alpha", Range(0.0,1.0)) = 1.0 + + _DiffuseIntensity("Diffuse Intensity", Range(0.0,1.0)) = 0.3 + _RimIntensity("Rim Intensity", Range(0.0,10.0)) = 5.0 + _BacklightIntensity("Backlight Intensity", Range(0.0,1.0)) = 1.0 + + _Voice("Voice", Range(0.0,1.0)) = 0.0 + [HideInInspector] _MouthPosition("Mouth position", Vector) = (0,0,0,1) + [HideInInspector] _MouthDirection("Mouth direction", Vector) = (0,0,0,1) + [HideInInspector] _MouthEffectDistance("Mouth Effect Distance", Float) = 0.03 + [HideInInspector] _MouthEffectScale("Mouth Effect Scaler", Float) = 1 + } + + SubShader + { + Pass + { + Tags + { + "LightMode" = "ForwardBase" "Queue" = "Transparent" "RenderType" = "Transparent" "IgnoreProjector" = "True" + } + LOD 100 + ZWrite On + ZTest LEqual + Cull Back + ColorMask RGB + Blend SrcAlpha OneMinusSrcAlpha + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile NO_BACKLIGHT_OFF NO_BACKLIGHT_ON + #include "UnityCG.cginc" + #include "UnityLightingCommon.cginc" + + uniform sampler2D _NormalMap; + uniform float4 _NormalMap_ST; + + uniform float4 _BaseColor; + uniform float _Dimmer; + uniform float _LoadingDimmer; + uniform float _Alpha; + + uniform float _RimIntensity; + uniform float _DiffuseIntensity; + uniform float _BacklightIntensity; + + uniform float _Voice; + uniform float4 _MouthPosition; + uniform float4 _MouthDirection; + uniform float _MouthEffectDistance; + uniform float _MouthEffectScale; + + static const fixed MOUTH_ZSCALE = 0.5f; + static const fixed MOUTH_DROPOFF = 0.01f; + + struct appdata + { + float4 vertex: POSITION; + float3 normal: NORMAL; + float4 tangent: TANGENT; + float4 uv: TEXCOORD0; + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float4 posWorld: TEXCOORD1; + float3 normalDir: TEXCOORD2; + float3 tangentDir: TEXCOORD3; + float3 bitangentDir: TEXCOORD4; + }; + + v2f vert(appdata v) + { + v2f o; + + // Mouth vertex animation with voip + float4 worldVert = mul(unity_ObjectToWorld, v.vertex);; + float3 delta = _MouthPosition - worldVert; + delta.z *= MOUTH_ZSCALE; + float dist = length(delta); + float scaledMouthDropoff = _MouthEffectScale * MOUTH_DROPOFF; + float scaledMouthEffect = _MouthEffectScale * _MouthEffectDistance; + float displacement = _Voice * smoothstep(scaledMouthEffect + scaledMouthDropoff, scaledMouthEffect, dist); + worldVert.xyz -= _MouthDirection * displacement; + v.vertex = mul(unity_WorldToObject, worldVert); + + // Calculate tangents for normal mapping + o.normalDir = normalize(UnityObjectToWorldNormal(v.normal)); + o.tangentDir = normalize(mul(unity_ObjectToWorld, half4(v.tangent.xyz, 0.0)).xyz); + o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); + + o.posWorld = worldVert; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + return o; + } + + fixed4 frag(v2f i) : COLOR + { + // Light direction + float3 lightDirection = _WorldSpaceLightPos0.xyz; + + // Calculate normal + float3 normalMap = UnpackNormal(tex2D(_NormalMap, TRANSFORM_TEX(i.uv, _NormalMap))); + float3x3 tangentTransform = float3x3(i.tangentDir, i.bitangentDir, i.normalDir); + float3 normalDirection = normalize(mul(normalMap.rgb, tangentTransform)); + float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); + + // Apply view, normal, and lighting dependent terms + float VdotN = saturate(dot(viewDirection, normalDirection)); + float NdotL = saturate(dot(normalDirection, lightDirection)); + float LightColorNdotL = NdotL * _LightColor0; + + // Calculate color + float4 col; +#if !defined(UNITY_COLORSPACE_GAMMA) + _BaseColor.rgb = LinearToGammaSpace(_BaseColor.rgb); +#endif + // Multiply in color tint + col.rgb = _BaseColor; + // Main light + col.rgb += _DiffuseIntensity * NdotL; +#ifdef NO_BACKLIGHT_ON + //NO_BACKLIGHT_ON disables the rear illumination +#else + // Illuminate main light from behind of NO_BACKLIGHT_ON is disabled + float3 reverseLightDirection = lightDirection * -1; + float NdotInvL = saturate(dot(normalDirection, normalize(reverseLightDirection))); + col.rgb += (_DiffuseIntensity * _BacklightIntensity) * NdotInvL *_LightColor0; +#endif + // Rim term + col.rgb += pow(1.0 - VdotN, _RimIntensity) * LightColorNdotL; + // Global dimmer + col.rgb *= lerp(_Dimmer, _LoadingDimmer, step(_LoadingDimmer, _Dimmer)); + // Global alpha + col.a = _Alpha; +#if !defined(UNITY_COLORSPACE_GAMMA) + col.rgb = GammaToLinearSpace(col.rgb); +#endif + // Return clamped final color + return saturate(col); + } + ENDCG + } + } +} diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_Loader.shader.meta b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_Loader.shader.meta new file mode 100644 index 0000000..0304e1d --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_Loader.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 822f5e641dc5dd54ca9555b727b3277f +timeCreated: 1526311739 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_SingleComponent.shader b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_SingleComponent.shader new file mode 100644 index 0000000..9956cd7 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_SingleComponent.shader @@ -0,0 +1,204 @@ +// *** OvrAvatar Mobile Single Component shader *** +// +// This is a Unity vertex-fragnment shader implementation for our 1.5 skin shaded avatar look. +// The benefit of using this version is performance as it bypasses the PBR lighting model and +// so is generally recommended for use on mobile. +// +// Shader keywords: +// - SECONDARY_LIGHT_ON SECONDARY_LIGHT_OFF +// Enable SECONDARY_LIGHT_ON for a second "light" as expressed by _SecondaryLightDirection +// and _SecondaryLightColor to influence the standard rim effect. This is designed for use in video watching +// experiences to sample the screen color and apply this to the rim term. +// - NO_BACKLIGHT_ON NO_BACKLIGHT_OFF +// This effect is active by default: NO_BACKLIGHT_OFF is the default and enables the effect. Enable NO_BACKLIGHT_ON +// to disable illumination from the rear of the main light direction. This mobile shader supports one directional +// light. This can cause the un-illuminated side of the avatar to lose definition. +// Notes: +// - The primary light in your scene will be used to calculate lighting. +// - We don't have a mouth bone, but the vertex shader will animate the vertices around the mouth +// area according to the _Voice value. This should be set according to local microphone value +// range between 0-1. + +Shader "OvrAvatar/Avatar_Mobile_SingleComponent" +{ + Properties + { + _MainTex("Main Texture", 2D) = "white" {} + _NormalMap("Normal Map", 2D) = "bump" {} + _RoughnessMap("Roughness Map", 2D) = "black" {} + + _BaseColor("Color Tint", Color) = (1.0,1.0,1.0,1.0) + _Dimmer("Dimmer", Range(0.0,1.0)) = 1.0 + _Alpha("Alpha", Range(0.0,1.0)) = 1.0 + + _DiffuseIntensity("Diffuse Intensity", Range(0.0,1.0)) = 0.3 + _RimIntensity("Rim Intensity", Range(0.0,10.0)) = 5.0 + _BacklightIntensity("Backlight Intensity", Range(0.0,1.0)) = 1.0 + _ReflectionIntensity("Reflection Intensity", Range(0.0,1.0)) = 0.0 + + _Voice("Voice", Range(0.0,1.0)) = 0.0 + [HideInInspector] _MouthPosition("Mouth position", Vector) = (0,0,0,1) + [HideInInspector] _MouthDirection("Mouth direction", Vector) = (0,0,0,1) + [HideInInspector] _MouthEffectDistance("Mouth Effect Distance", Float) = 0.03 + [HideInInspector] _MouthEffectScale("Mouth Effect Scaler", Float) = 1 + } + + SubShader + { + Pass + { + Tags + { + "LightMode" = "ForwardBase" "Queue" = "Transparent" "RenderType" = "Transparent" "IgnoreProjector" = "True" + } + LOD 100 + ZWrite On + ZTest LEqual + Cull Back + ColorMask RGB + Blend SrcAlpha OneMinusSrcAlpha + CGPROGRAM + #pragma vertex vert + #pragma fragment frag + #pragma target 3.5 + #pragma fragmentoption ARB_precision_hint_fastest + #pragma multi_compile SECONDARY_LIGHT_OFF SECONDARY_LIGHT_ON + #pragma multi_compile NO_BACKLIGHT_OFF NO_BACKLIGHT_ON + #include "UnityCG.cginc" + #include "UnityLightingCommon.cginc" + + uniform sampler2D _MainTex; + uniform sampler2D _NormalMap; + uniform float4 _NormalMap_ST; + uniform sampler2D _RoughnessMap; + uniform float4 _BaseColor; + uniform float _DiffuseIntensity; + uniform float _RimIntensity; + uniform float _BacklightIntensity; + uniform float _ReflectionIntensity; + + uniform float3 _SecondaryLightDirection; + uniform float4 _SecondaryLightColor; + + uniform float _Dimmer; + uniform float _Alpha; + + uniform float _Voice; + uniform float4 _MouthPosition; + uniform float4 _MouthDirection; + uniform float _MouthEffectDistance; + uniform float _MouthEffectScale; + + static const fixed MOUTH_ZSCALE = 0.5f; + static const fixed MOUTH_DROPOFF = 0.01f; + + struct appdata + { + float4 vertex: POSITION; + float3 normal: NORMAL; + float4 tangent: TANGENT; + float4 uv: TEXCOORD0; + }; + + struct v2f + { + float4 pos : SV_POSITION; + float2 uv : TEXCOORD0; + float4 posWorld: TEXCOORD1; + float3 normalDir: TEXCOORD2; + float3 tangentDir: TEXCOORD3; + float3 bitangentDir: TEXCOORD4; + }; + + v2f vert(appdata v) + { + v2f o; + + // Mouth vertex animation with voip + float4 worldVert = mul(unity_ObjectToWorld, v.vertex);; + float3 delta = _MouthPosition - worldVert; + delta.z *= MOUTH_ZSCALE; + float dist = length(delta); + float scaledMouthDropoff = _MouthEffectScale * MOUTH_DROPOFF; + float scaledMouthEffect = _MouthEffectScale * _MouthEffectDistance; + float displacement = _Voice * smoothstep(scaledMouthEffect + scaledMouthDropoff, scaledMouthEffect, dist); + worldVert.xyz -= _MouthDirection * displacement; + v.vertex = mul(unity_WorldToObject, worldVert); + + // Calculate tangents for normal mapping + o.normalDir = normalize(UnityObjectToWorldNormal(v.normal)); + o.tangentDir = normalize(mul(unity_ObjectToWorld, half4(v.tangent.xyz, 0.0)).xyz); + o.bitangentDir = normalize(cross(o.normalDir, o.tangentDir) * v.tangent.w); + + o.posWorld = worldVert; + o.pos = UnityObjectToClipPos(v.vertex); + o.uv = v.uv; + return o; + } + + fixed4 frag(v2f i) : COLOR + { + // Light directions + float3 lightDirection = _WorldSpaceLightPos0.xyz; + + // Calculate normal + float3 normalMap = tex2D(_NormalMap, TRANSFORM_TEX(i.uv, _NormalMap)) * 2 - 1; + float3x3 tangentTransform = float3x3(i.tangentDir, i.bitangentDir, i.normalDir); + float3 normalDirection = normalize(mul(normalMap.rgb, tangentTransform)); + float3 viewDirection = normalize(_WorldSpaceCameraPos.xyz - i.posWorld.xyz); + + // Apply view, normal, and lighting dependent terms + float VdotN = saturate(dot(viewDirection, normalDirection)); + float NdotL = saturate(dot(normalDirection, lightDirection)); + float LightColorNdotL = NdotL * _LightColor0; + + // Sample the default reflection cubemap using the reflection vector + float3 worldReflection = reflect(-viewDirection, normalDirection); + half4 skyData = UNITY_SAMPLE_TEXCUBE(unity_SpecCube0, worldReflection); + // Decode cubemap data into actual color + half3 reflectionColor = DecodeHDR(skyData, unity_SpecCube0_HDR); + + // Calculate color + float4 col; + // Diffuse texture sample + col = tex2D(_MainTex, i.uv); + #if !defined(UNITY_COLORSPACE_GAMMA) + _BaseColor.rgb = LinearToGammaSpace(_BaseColor.rgb); + #endif + // Multiply in color tint + col.rgb *= _BaseColor; + // Main light + col.rgb += _DiffuseIntensity * LightColorNdotL; + #ifdef NO_BACKLIGHT_ON + //NO_BACKLIGHT_ON disables the rear illumination + #else + // Illuminate main light from behind of NO_BACKLIGHT_ON is disabled + float3 reverseLightDirection = lightDirection * -1; + float NdotInvL = saturate(dot(normalDirection, normalize(reverseLightDirection))); + col.rgb += (_DiffuseIntensity * _BacklightIntensity) * NdotInvL *_LightColor0; + #endif + // Rim term + #ifdef SECONDARY_LIGHT_ON + // Secondary light proxy (direction and color) passed into the rim term + NdotL = saturate(dot(normalDirection, _SecondaryLightDirection)); + col.rgb += pow(1.0 - VdotN, _RimIntensity) * NdotL * _SecondaryLightColor; + #else + col.rgb += pow(1.0 - VdotN, _RimIntensity) * LightColorNdotL; + #endif + // Reflection + col.rgb += reflectionColor * tex2D(_RoughnessMap, i.uv).a * _ReflectionIntensity; + + // Global dimmer + col.rgb *= _Dimmer; + // Global alpha + col.a *= _Alpha; + #if !defined(UNITY_COLORSPACE_GAMMA) + col.rgb = GammaToLinearSpace(col.rgb); + #endif + // Return clamped final color + return saturate(col); + } + ENDCG + } + } +} diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_SingleComponent.shader.meta b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_SingleComponent.shader.meta new file mode 100644 index 0000000..b39d8e8 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_Mobile_SingleComponent.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: c26fc51e445dcfd4db09305d861dc11c +timeCreated: 1526311739 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_PC_SingleComponent.shader b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_PC_SingleComponent.shader new file mode 100644 index 0000000..6d9bb6f --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_PC_SingleComponent.shader @@ -0,0 +1,108 @@ +// +// OvrAvatar PC single component shader +// +// This is a Unity Surface shader implementation for our 1.5 skin shaded avatar look. +// The benefit of using this version is that it uses the full Unity PBR lighting under the hood. +// The Mobile shader is strongly recommended for use on mobile platforms for performance. +// +// Notes: +// - Use Mobile shader if you need mouth vertex movement. + +Shader "OvrAvatar/Avatar_PC_SingleComponent" +{ + Properties + { + [NoScaleOffset] _MainTex("Color (RGB)", 2D) = "white" {} + [NoScaleOffset] _NormalMap("Normal Map", 2D) = "bump" {} + [NoScaleOffset] _RoughnessMap("Roughness Map", 2D) = "black" {} + + _BaseColor("Color Tint", Color) = (0.95,0.77,0.63) + _Dimmer("Dimmer", Range(0.0,1.0)) = 1.0 + _Alpha("Alpha", Range(0.0,1.0)) = 1.0 + + _DiffuseIntensity("Diffuse Intensity", Range(0.0,1.0)) = 0.3 + _RimIntensity("Rim Intensity", Range(0.0,10.0)) = 5.0 + } + SubShader + { + Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" } + LOD 100 + Blend SrcAlpha OneMinusSrcAlpha + + // Render the back facing parts of the object then set on backface culling. + // This fixes broken faces with convex meshes when using the alpha path. + Pass + { + Color(0,0,0,0) + } + + CGPROGRAM +#pragma surface surf Standard alpha:fade +#pragma target 3.0 +#pragma fragmentoption ARB_precision_hint_fastest + // Set this shader keyword if you are using Linear color space +#pragma multi_compile COLORSPACE_LINEAR_OFF COLORSPACE_LINEAR_ON + // (Optional) Set this shader keyword if your scene only has one light +#pragma multi_compile SINGLE_LIGHT_OFF SINGLE_LIGHT_ON +#include "UnityCG.cginc" + sampler2D _MainTex; + sampler2D _NormalMap; + sampler2D _RoughnessMap; + + float4 _BaseColor; + float _Dimmer; + float _Alpha; + + float _DiffuseIntensity; + float _RimIntensity; + + struct Input + { + float2 uv_MainTex; + float2 uv_NormalMap; + float2 uv_RoughnessMap; + float3 viewDir; + float3 worldNormal; INTERNAL_DATA + }; + + void surf(Input IN, inout SurfaceOutputStandard o) + { + // Unpack normal map + o.Normal = tex2D(_NormalMap, IN.uv_NormalMap) * 2 - 1; + + // Diffuse texture sample + float4 col = tex2D(_MainTex, IN.uv_MainTex); + + // Convert _BaseColor to gamma color space if we are in linear + // Albedo texture is already in correct color space + #if !defined(UNITY_COLORSPACE_GAMMA) + _BaseColor.rgb = LinearToGammaSpace(_BaseColor.rgb); + #endif + // Adjust color tint with NdotL + float NdotL = saturate(dot(WorldNormalVector(IN, o.Normal), _WorldSpaceLightPos0.xyz)); + _BaseColor.rgb += _DiffuseIntensity * NdotL; + // Multiply in color tint + o.Albedo = col.rgb * _BaseColor; + // Rim term + float VdotN = saturate(dot(normalize(IN.viewDir), o.Normal)); + o.Albedo += pow(1.0 - VdotN, _RimIntensity) * NdotL * _LightColor0; + + // Sample roughness map and set smoothness and metallic + float4 roughnessSample = tex2D(_RoughnessMap, IN.uv_RoughnessMap); + o.Smoothness = roughnessSample.a; + o.Metallic = roughnessSample.r; + + // Global dimmer + o.Albedo *= _Dimmer; + // Global alpha + o.Alpha = col.a * _Alpha; + + + // Convert back to linear color space if we are in linear + #if !defined(UNITY_COLORSPACE_GAMMA) + o.Albedo = GammaToLinearSpace(o.Albedo); + #endif + } + ENDCG + } +} \ No newline at end of file diff --git a/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_PC_SingleComponent.shader.meta b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_PC_SingleComponent.shader.meta new file mode 100644 index 0000000..030e684 --- /dev/null +++ b/Assets/Oculus/Avatar/Resources/Materials/Version1.5/Avatar_PC_SingleComponent.shader.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 36b8b481cf607814a8cec318f0148d63 +timeCreated: 1525971189 +licenseType: Store +ShaderImporter: + defaultTextures: [] + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples.meta b/Assets/Oculus/Avatar/Samples.meta new file mode 100644 index 0000000..408139d --- /dev/null +++ b/Assets/Oculus/Avatar/Samples.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b18c7ae976868a4499e2dbd7f60e92a4 +folderAsset: yes +timeCreated: 1467313717 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/Controllers.meta b/Assets/Oculus/Avatar/Samples/Controllers.meta new file mode 100644 index 0000000..3ba3824 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/Controllers.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2856d681f3672e641a2e57df9676108c +folderAsset: yes +timeCreated: 1468456735 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/Controllers/Controllers.unity b/Assets/Oculus/Avatar/Samples/Controllers/Controllers.unity new file mode 100644 index 0000000..c0f157b --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/Controllers/Controllers.unity @@ -0,0 +1,1194 @@ +%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: 7 + 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_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.44657898, g: 0.4964133, b: 0.5748178, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 7 + m_GIWorkflowMode: 0 + 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: 4 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_DirectLightInLightProbes: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !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 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &30936213 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1512034972} + serializedVersion: 5 + m_Component: + - component: {fileID: 30936217} + - component: {fileID: 30936216} + - component: {fileID: 30936215} + - component: {fileID: 30936214} + m_Layer: 0 + m_Name: LocalAvatar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &30936214 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11441414, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 30936213} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac27124318cf8e84aa7350c2ac1cdb80, type: 3} + m_Name: + m_EditorClassIdentifier: + Mode: 0 +--- !u!82 &30936215 +AudioSource: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8254050, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 30936213} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 +--- !u!114 &30936216 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 30936213} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 00f3402a2ea5bff4880c0313515240cd, type: 3} + m_Name: + m_EditorClassIdentifier: + DefaultBodyMaterialManager: {fileID: 114000014217873308, guid: 1e465f24e493b834b85afff39ca37bac, + type: 2} + DefaultHandMaterialManager: {fileID: 114000014217873308, guid: b74f8a6e52a6d8b448dd7344b607c5ee, + type: 2} + Driver: {fileID: 30936214} + Base: {fileID: 554071967} + Body: {fileID: 1654041718} + ControllerLeft: {fileID: 350570438} + ControllerRight: {fileID: 1436046664} + HandLeft: {fileID: 1421016110} + HandRight: {fileID: 1843625169} + RecordPackets: 0 + UseSDKPackets: 1 + StartWithControllers: 1 + FirstPersonLayer: + layerIndex: 0 + ThirdPersonLayer: + layerIndex: 0 + ShowFirstPerson: 1 + ShowThirdPerson: 0 + Capabilities: -1 + SurfaceShader: {fileID: 4800000, guid: d0f6e1942d3d1f946a96fd8a00175474, type: 3} + SurfaceShaderSelfOccluding: {fileID: 4800000, guid: 10513ef587704324487f3061a7e6699d, + type: 3} + SurfaceShaderPBS: {fileID: 4800000, guid: d7662dbac0646464a9b4a48e93989adb, type: 3} + SurfaceShaderPBSV2Single: {fileID: 4800000, guid: 7a05888309e329e4cb98dfdd56ac3e64, + type: 3} + SurfaceShaderPBSV2Combined: {fileID: 4800000, guid: 3315a1b9c2da8fd4d8aa7e314ca27061, + type: 3} + SurfaceShaderPBSV2Simple: {fileID: 4800000, guid: 3934b2d879c6eb94eb26fa19814c7fcd, + type: 3} + oculusUserID: 0 + CombineMeshes: 0 + AssetsDoneLoading: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral, + PublicKeyToken=null + LeftHandCustomPose: {fileID: 0} + RightHandCustomPose: {fileID: 0} + PacketSettings: + UpdateRate: 0.033333335 + LevelOfDetail: 3 +--- !u!4 &30936217 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 30936213} + 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: 554071968} + - {fileID: 1654041719} + - {fileID: 1421016111} + - {fileID: 350570439} + - {fileID: 1843625170} + - {fileID: 1436046665} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &53342041 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100002, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + serializedVersion: 5 + m_Component: + - component: {fileID: 53342042} + - component: {fileID: 53342044} + - component: {fileID: 53342043} + m_Layer: 0 + m_Name: CenterEyeAnchor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &53342042 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400002, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 53342041} + 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: 1080567925} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &53342043 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2037080, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 53342041} + 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_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &53342044 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8100000, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 53342041} + m_Enabled: 1 +--- !u!1 &56120625 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + serializedVersion: 5 + m_Component: + - component: {fileID: 56120626} + - component: {fileID: 56120627} + m_Layer: 0 + m_Name: RightEyeAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &56120626 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 56120625} + 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: 1080567925} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &56120627 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 20000010189485334, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 56120625} + 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: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &350570437 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 184120, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1512034972} + serializedVersion: 5 + m_Component: + - component: {fileID: 350570439} + - component: {fileID: 350570438} + m_Layer: 0 + m_Name: controller_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &350570438 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11405130, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 350570437} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &350570439 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400938, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 350570437} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 30936217} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &390448548 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100006, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + serializedVersion: 5 + m_Component: + - component: {fileID: 390448549} + - component: {fileID: 390448550} + m_Layer: 0 + m_Name: LeftEyeAnchor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &390448549 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400006, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 390448548} + 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: 1080567925} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &390448550 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 20000012175207052, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 390448548} + 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: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &554071966 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010910743596, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + serializedVersion: 5 + m_Component: + - component: {fileID: 554071968} + - component: {fileID: 554071967} + m_Layer: 0 + m_Name: base + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &554071967 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000010884708534, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 554071966} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0e33623ec5372748b5703f61a4df82d, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &554071968 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010416372058, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 554071966} + 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: 30936217} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &753461663 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + serializedVersion: 5 + m_Component: + - component: {fileID: 753461666} + - component: {fileID: 753461665} + - component: {fileID: 753461664} + m_Layer: 0 + m_Name: OVRCameraRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &753461664 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 753461663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7e933e81d3c20c74ea6fdc708a67e3a5, type: 3} + m_Name: + m_EditorClassIdentifier: + queueAhead: 1 + useRecommendedMSAALevel: 0 + enableAdaptiveResolution: 0 + minRenderScale: 0.7 + maxRenderScale: 1 + expandMixedRealityCapturePropertySheet: 0 + enableMixedReality: 0 + compositionMethod: 0 + extraHiddenLayers: + serializedVersion: 2 + m_Bits: 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 + _trackingOriginType: 1 + usePositionTracking: 1 + useRotationTracking: 1 + useIPDInPositionTracking: 1 + resetTrackerOnLoad: 0 +--- !u!114 &753461665 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400010, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 753461663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: df9f338034892c44ebb62d97894772f1, type: 3} + m_Name: + m_EditorClassIdentifier: + usePerEyeCameras: 0 + useFixedUpdateForTracking: 0 +--- !u!4 &753461666 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 753461663} + 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: 1080567925} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &957641525 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 957641529} + - component: {fileID: 957641528} + - component: {fileID: 957641527} + - component: {fileID: 957641526} + m_Layer: 0 + m_Name: Floor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!23 &957641526 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!65 &957641527 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &957641528 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &957641529 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.5, z: 0} + m_LocalScale: {x: 10, y: 1, z: 10} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1080567924 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 159718, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + serializedVersion: 5 + m_Component: + - component: {fileID: 1080567925} + m_Layer: 0 + m_Name: TrackingSpace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1080567925 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 459718, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 1080567924} + 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: 390448549} + - {fileID: 53342042} + - {fileID: 56120626} + - {fileID: 1754791342} + - {fileID: 1162487503} + - {fileID: 2098184029} + m_Father: {fileID: 753461666} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1162487502 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109308, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + serializedVersion: 5 + m_Component: + - component: {fileID: 1162487503} + m_Layer: 0 + m_Name: LeftHandAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1162487503 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 482130, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 1162487502} + 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: 1080567925} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1269396464 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: _trackingOriginType + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_RootGameObject: {fileID: 753461663} + m_IsPrefabParent: 0 +--- !u!1 &1421016109 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011125779090, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + serializedVersion: 5 + m_Component: + - component: {fileID: 1421016111} + - component: {fileID: 1421016110} + m_Layer: 0 + m_Name: hand_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1421016110 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000011404857786, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 1421016109} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1421016111 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013364346644, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 1421016109} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 30936217} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1436046663 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157742, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1512034972} + serializedVersion: 5 + m_Component: + - component: {fileID: 1436046665} + - component: {fileID: 1436046664} + m_Layer: 0 + m_Name: controller_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1436046664 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477770, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 1436046663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1436046665 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 448722, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 1436046663} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 30936217} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1512034972 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: StartWithControllers + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_RootGameObject: {fileID: 30936213} + m_IsPrefabParent: 0 +--- !u!1 &1654041717 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012026592076, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + serializedVersion: 5 + m_Component: + - component: {fileID: 1654041719} + - component: {fileID: 1654041718} + m_Layer: 0 + m_Name: body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1654041718 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000012186362028, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 1654041717} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb7a6650b6cb46545967d3b380b7396c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1654041719 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014100970646, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 1654041717} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.6, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 30936217} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1658970730 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1658970732} + - component: {fileID: 1658970731} + 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 &1658970731 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1658970730} + m_Enabled: 1 + serializedVersion: 7 + m_Type: 1 + m_Color: {r: 0.5955882, g: 0.5955882, b: 0.5955882, 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_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1658970732 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1658970730} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1754791341 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168682, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + serializedVersion: 5 + m_Component: + - component: {fileID: 1754791342} + m_Layer: 0 + m_Name: TrackerAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1754791342 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 468682, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 1754791341} + 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: 1080567925} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1843625168 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010482306814, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + serializedVersion: 5 + m_Component: + - component: {fileID: 1843625170} + - component: {fileID: 1843625169} + m_Layer: 0 + m_Name: hand_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1843625169 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000010372160784, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 1843625168} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1843625170 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011212216358, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1512034972} + m_GameObject: {fileID: 1843625168} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 30936217} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2098184028 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 113768, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + serializedVersion: 5 + m_Component: + - component: {fileID: 2098184029} + m_Layer: 0 + m_Name: RightHandAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2098184029 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 487254, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1269396464} + m_GameObject: {fileID: 2098184028} + 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: 1080567925} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Oculus/Avatar/Samples/Controllers/Controllers.unity.meta b/Assets/Oculus/Avatar/Samples/Controllers/Controllers.unity.meta new file mode 100644 index 0000000..c1de067 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/Controllers/Controllers.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 2a83dd010542d2744bf59af99b4bc47c +timeCreated: 1468457372 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/CrossPlatform.meta b/Assets/Oculus/Avatar/Samples/CrossPlatform.meta new file mode 100644 index 0000000..effbacd --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/CrossPlatform.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 6b1bc2f99b5a3a042aed559717762f28 +folderAsset: yes +timeCreated: 1536104808 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/CrossPlatform/CrossPlatform.unity b/Assets/Oculus/Avatar/Samples/CrossPlatform/CrossPlatform.unity new file mode 100644 index 0000000..6bcfa60 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/CrossPlatform/CrossPlatform.unity @@ -0,0 +1,1138 @@ +%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.44657898, g: 0.4964133, b: 0.5748178, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + 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: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + 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: 0 +--- !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!1001 &42825988 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 12 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458827644 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (11) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &334702974 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 13 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458843421 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (12) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &470155066 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458738922 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (2) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &581305526 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458747067 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (3) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &591454203 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458769900 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (6) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &684816837 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 7 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458785587 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (8) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &1012700868 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458727564 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (1) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &1239677853 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.x + value: 5.5 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: _trackingOriginType + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &1548752833 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458762178 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (5) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &1639391999 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 6 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458775732 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (7) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1658970730 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1658970732} + - component: {fileID: 1658970731} + 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 &1658970731 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1658970730} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 0.5955882, g: 0.5955882, b: 0.5955882, 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 &1658970732 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1658970730} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1001 &1805004154 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 8 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 10 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458806683 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (9) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &1905681510 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 9 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 11 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458820129 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (10) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1001 &2000186629 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: -1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 10150030458756715 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (4) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 diff --git a/Assets/Oculus/Avatar/Samples/CrossPlatform/CrossPlatform.unity.meta b/Assets/Oculus/Avatar/Samples/CrossPlatform/CrossPlatform.unity.meta new file mode 100644 index 0000000..e8a6670 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/CrossPlatform/CrossPlatform.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: cfdeeba4226b23c4691e78d2432e7d88 +timeCreated: 1532560992 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/CrossPlatform/Readme.txt b/Assets/Oculus/Avatar/Samples/CrossPlatform/Readme.txt new file mode 100644 index 0000000..9ac8c42 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/CrossPlatform/Readme.txt @@ -0,0 +1,41 @@ +This Cross Platform Unity scene demonstrates how to use Oculus Avatar SDK without the Oculus Platform SDK. + +Setup instructions: +1 - Create a new Unity Project +2 - Import the Oculus Avatar SDK Unity package: https://developer.oculus.com/downloads/package/oculus-avatar-sdk/ +3 - Open this CrossPlatform scene (in Assets/Oculus/Avatar/Samples/CrossPlatform) +4 - Import Oculus Utilities for Unity: https://developer.oculus.com/downloads/package/oculus-utilities-for-unity-5/ +5 - Do *not* import the Oculus Platform SDK for Unity! +6 - Delete the imported SocialStarter folder from Assets/Oculus/Avatar/Samples (it demos Platform features, we don't need it for this) +7 - Use the Oculus Dashboard (https://dashboard.oculus.com/) to create a placeholder Rift app and copy the App ID +8 - Paste the App ID in Unity under Oculus Avatars > Edit Configuration > Oculus Rift App Id +9 - Enable OpenVR: + Open PlayerSettings in the Inspector tab (menu Edit > Project Settings > Player) + In PlayerSettings expand XR Settings + Under Virtual Reality SDKs, add OpenVR +10 - Click Play + + +Changing Avatar customization: +1 - Note the "LocalAvatar" GameObjects in the scene. Each Avatar has distinct customization. +2 - Inspect each LocalAvatar GameObject and observe the attached Ovr Avatar Script component and the "Oculus User ID" property set on each. +3 - Create your own test accounts to customize your Avatars. +4 - Use your own User IDs in this sample scene. (You will have to leave and reenter Play mode to apply Avatar User ID changes.) + + + +Redistribution: +When packaging a Cross Platform application using Oculus Avatars, you will need to include: + * libovravatar.dll + * OvrAvatarAssets.zip +On a computer with the Oculus launcher, these files can be found in "C:\Program Files\Oculus\Support\oculus-runtime" by default. + +You also need to include the Oculus Avatar SDK License, found here: https://developer.oculus.com/licenses/avatar-sdk-1.0/ + +In your Unity project's Assets folder, add these files to a Plugins directory. + +NOTE: Unity's Build will only copy DLL files in a Plugins directory over to the output Plugins directory. +You must manually copy OvrAvatarAssets.zip to the output Plugins directory. +You can automate this process with a script adding a custom build command, +see the Unity docs here: https://docs.unity3d.com/Manual/BuildPlayerPipeline.html + diff --git a/Assets/Oculus/Avatar/Samples/CrossPlatform/Readme.txt.meta b/Assets/Oculus/Avatar/Samples/CrossPlatform/Readme.txt.meta new file mode 100644 index 0000000..936c686 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/CrossPlatform/Readme.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 5569c00e32b73d845831ece15c9f1e36 +timeCreated: 1532561014 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/GripPoses.meta b/Assets/Oculus/Avatar/Samples/GripPoses.meta new file mode 100644 index 0000000..42860b4 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/GripPoses.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b8c4b9475079cf040953bf344ff4e44f +folderAsset: yes +timeCreated: 1477955918 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/GripPoses/GripPoses.unity b/Assets/Oculus/Avatar/Samples/GripPoses/GripPoses.unity new file mode 100644 index 0000000..1e71a0f --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/GripPoses/GripPoses.unity @@ -0,0 +1,2756 @@ +%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: 7 + 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_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.44657898, g: 0.4964133, b: 0.5748178, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 7 + m_GIWorkflowMode: 0 + 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: 4 + 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_DirectLightInLightProbes: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !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 + accuratePlacement: 0 + m_NavMeshData: {fileID: 0} +--- !u!1 &26803798 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010454308426, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 26803799} + m_Layer: 0 + m_Name: hands:b_l_middle1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &26803799 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010529492032, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 26803798} + m_LocalRotation: {x: -0.03365187, y: 0.6480089, z: 0.75659454, w: 0.080726825} + m_LocalPosition: {x: 0.09142233, y: -0.009532144, z: -0.010838794} + m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1} + m_Children: + - {fileID: 239467253} + m_Father: {fileID: 313519822} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &30936213 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1658856030} + serializedVersion: 5 + m_Component: + - component: {fileID: 30936217} + - component: {fileID: 30936216} + - component: {fileID: 30936215} + - component: {fileID: 30936214} + m_Layer: 0 + m_Name: LocalAvatar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &30936214 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11441414, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 30936213} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac27124318cf8e84aa7350c2ac1cdb80, type: 3} + m_Name: + m_EditorClassIdentifier: + Mode: 0 +--- !u!82 &30936215 +AudioSource: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8254050, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 30936213} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 +--- !u!114 &30936216 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 30936213} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 00f3402a2ea5bff4880c0313515240cd, type: 3} + m_Name: + m_EditorClassIdentifier: + DefaultBodyMaterialManager: {fileID: 114000014217873308, guid: 1e465f24e493b834b85afff39ca37bac, + type: 2} + DefaultHandMaterialManager: {fileID: 114000014217873308, guid: b74f8a6e52a6d8b448dd7344b607c5ee, + type: 2} + Driver: {fileID: 30936214} + Base: {fileID: 554071967} + Body: {fileID: 1654041718} + ControllerLeft: {fileID: 350570438} + ControllerRight: {fileID: 1436046664} + HandLeft: {fileID: 1421016110} + HandRight: {fileID: 1843625169} + RecordPackets: 0 + UseSDKPackets: 1 + StartWithControllers: 0 + FirstPersonLayer: + layerIndex: 0 + ThirdPersonLayer: + layerIndex: 0 + ShowFirstPerson: 1 + ShowThirdPerson: 0 + Capabilities: -1 + SurfaceShader: {fileID: 4800000, guid: d0f6e1942d3d1f946a96fd8a00175474, type: 3} + SurfaceShaderSelfOccluding: {fileID: 4800000, guid: 10513ef587704324487f3061a7e6699d, + type: 3} + SurfaceShaderPBS: {fileID: 4800000, guid: d7662dbac0646464a9b4a48e93989adb, type: 3} + SurfaceShaderPBSV2Single: {fileID: 4800000, guid: 7a05888309e329e4cb98dfdd56ac3e64, + type: 3} + SurfaceShaderPBSV2Combined: {fileID: 4800000, guid: 3315a1b9c2da8fd4d8aa7e314ca27061, + type: 3} + SurfaceShaderPBSV2Simple: {fileID: 4800000, guid: 3934b2d879c6eb94eb26fa19814c7fcd, + type: 3} + oculusUserID: 0 + CombineMeshes: 0 + AssetsDoneLoading: + m_PersistentCalls: + m_Calls: [] + m_TypeName: UnityEngine.Events.UnityEvent, UnityEngine, Version=0.0.0.0, Culture=neutral, + PublicKeyToken=null + LeftHandCustomPose: {fileID: 585168899} + RightHandCustomPose: {fileID: 1365922220} + PacketSettings: + UpdateRate: 0.033333335 + LevelOfDetail: 3 +--- !u!4 &30936217 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 30936213} + 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: 554071968} + - {fileID: 1654041719} + - {fileID: 470598175} + - {fileID: 350570439} + - {fileID: 1906766866} + - {fileID: 1436046665} + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &34790505 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 34790507} + - component: {fileID: 34790506} + m_Layer: 0 + m_Name: RightHandPoseEditHelper + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &34790506 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 34790505} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bc5b4ba964e02b4ea773b2aaca7dc67, type: 3} + m_Name: + m_EditorClassIdentifier: + poseRoot: {fileID: 1365922220} +--- !u!4 &34790507 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 34790505} + 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: 1365922220} + m_Father: {fileID: 1906766866} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &53342041 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100002, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + serializedVersion: 5 + m_Component: + - component: {fileID: 53342042} + - component: {fileID: 53342044} + - component: {fileID: 53342043} + m_Layer: 0 + m_Name: CenterEyeAnchor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &53342042 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400002, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 53342041} + 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: 1080567925} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &53342043 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2037080, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 53342041} + 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_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &53342044 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8100000, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 53342041} + m_Enabled: 1 +--- !u!1 &56120625 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + serializedVersion: 5 + m_Component: + - component: {fileID: 56120626} + - component: {fileID: 56120627} + m_Layer: 0 + m_Name: RightEyeAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &56120626 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 56120625} + 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: 1080567925} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &56120627 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 20000010189485334, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 56120625} + 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: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &56595420 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011683760016, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 56595421} + m_Layer: 0 + m_Name: hands:b_l_pinky1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &56595421 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014246121946, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 56595420} + m_LocalRotation: {x: -0.018903391, y: 0.006742826, z: 0.9928664, w: 0.11753104} + m_LocalPosition: {x: 0.053570647, y: 0.002438396, z: -0.0014630293} + m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1} + m_Children: + - {fileID: 136091887} + m_Father: {fileID: 1924116398} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &96379235 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011819343988, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 96379236} + m_Layer: 0 + m_Name: hands:b_l_grip + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &96379236 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010032463254, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 96379235} + m_LocalRotation: {x: 0.31257486, y: -0.7696517, z: -0.018750966, w: 0.55640054} + m_LocalPosition: {x: 0.07215909, y: -0.013962122, z: 0.018992186} + m_LocalScale: {x: 0.9999999, y: 1.0000001, z: 1.0000001} + m_Children: [] + m_Father: {fileID: 313519822} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &99467182 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000014156853104, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 99467183} + m_Layer: 0 + m_Name: hands:b_r_grip + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &99467183 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013762714132, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 99467182} + m_LocalRotation: {x: 0.55640054, y: -0.018751018, z: 0.76965183, w: -0.31257483} + m_LocalPosition: {x: -0.072158195, y: 0.013962137, z: -0.01899168} + m_LocalScale: {x: 0.99999994, y: 1.0000004, z: 1.0000002} + m_Children: [] + m_Father: {fileID: 256016476} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &136091886 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011987305466, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 136091887} + m_Layer: 0 + m_Name: hands:b_l_pinky2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &136091887 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011527629484, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 136091886} + m_LocalRotation: {x: -0.00000005668701, y: -0.00000014201431, z: -0.16458213, w: 0.9863634} + m_LocalPosition: {x: -0.03335595, y: -0.000000005462158, z: 0.0000000032950203} + m_LocalScale: {x: 0.9999999, y: 1, z: 1} + m_Children: + - {fileID: 1934855145} + m_Father: {fileID: 56595421} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &188612933 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013523545764, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 188612934} + m_Layer: 0 + m_Name: hands:b_l_ring2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &188612934 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011216156508, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 188612933} + m_LocalRotation: {x: 0.000000022927209, y: -0.00000005418313, z: -0.20290457, w: 0.9791986} + m_LocalPosition: {x: -0.03857202, y: -8.330935e-10, z: 0.000000006690977} + m_LocalScale: {x: 0.9999998, y: 1, z: 1} + m_Children: + - {fileID: 1911745904} + m_Father: {fileID: 1436277364} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &239467252 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010705688472, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 239467253} + m_Layer: 0 + m_Name: hands:b_l_middle2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &239467253 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013179478382, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 239467252} + m_LocalRotation: {x: 0.000000037141525, y: -0.00000010928968, z: -0.23558179, w: 0.97185457} + m_LocalPosition: {x: -0.04596742, y: -0.000000018352134, z: 0.0000000024601723} + m_LocalScale: {x: 0.9999999, y: 1, z: 0.9999999} + m_Children: + - {fileID: 1903904373} + m_Father: {fileID: 26803799} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &256016475 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012855789030, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 256016476} + m_Layer: 0 + m_Name: hands:b_r_hand + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &256016476 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013646848534, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 256016475} + m_LocalRotation: {x: -0.0544794, y: 0.76687974, z: 0.14423032, w: 0.6229969} + m_LocalPosition: {x: 0.022390217, y: -0.034886185, z: -0.111438304} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 99467183} + - {fileID: 1448414926} + - {fileID: 1690781231} + - {fileID: 1208440875} + - {fileID: 914695922} + - {fileID: 445516544} + - {fileID: 1677342976} + m_Father: {fileID: 1365922220} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &313519821 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011482107920, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 313519822} + m_Layer: 0 + m_Name: hands:b_l_hand + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &313519822 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013452988566, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 313519821} + m_LocalRotation: {x: 0.6229968, y: -0.14423034, z: 0.7668798, w: 0.054479446} + m_LocalPosition: {x: -0.022390187, y: -0.034886137, z: -0.11143835} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 96379236} + - {fileID: 758256568} + - {fileID: 870347746} + - {fileID: 26803799} + - {fileID: 1924116398} + - {fileID: 1436277364} + - {fileID: 1601188193} + m_Father: {fileID: 585168899} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &316040181 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012586892280, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 316040182} + m_Layer: 0 + m_Name: hands:b_r_middle3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &316040182 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012760637678, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 316040181} + m_LocalRotation: {x: 0.000000011001792, y: 0.000000001377423, z: -0.06577554, w: 0.99783444} + m_LocalPosition: {x: 0.02959023, y: -0.00000016815946, z: -0.00000006537217} + m_LocalScale: {x: 1, y: 1.0000001, z: 1.0000001} + m_Children: + - {fileID: 620480710} + m_Father: {fileID: 1470779009} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &329783417 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013940353552, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 329783418} + m_Layer: 0 + m_Name: hands:b_r_index3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &329783418 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010357036850, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 329783417} + m_LocalRotation: {x: -0.000000043650598, y: 0.00000003915311, z: -0.05959587, w: 0.99822265} + m_LocalPosition: {x: 0.022152934, y: -0.00000021660776, z: -0.00000003802672} + m_LocalScale: {x: 0.9999999, y: 0.9999999, z: 0.99999994} + m_Children: + - {fileID: 843058192} + m_Father: {fileID: 376675011} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &350570437 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 184120, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1658856030} + serializedVersion: 5 + m_Component: + - component: {fileID: 350570439} + - component: {fileID: 350570438} + m_Layer: 0 + m_Name: controller_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &350570438 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11405130, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 350570437} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &350570439 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400938, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 350570437} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 30936217} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &363627943 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010747787136, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 363627944} + m_Layer: 0 + m_Name: hands:b_l_pinky_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &363627944 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010274150756, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 363627943} + m_LocalRotation: {x: -0.000000009772398, y: -6.703349e-10, z: -0.0000000016464395, + w: 1} + m_LocalPosition: {x: -0.01944124, y: -0.0000000024336448, z: 0.0000000012287399} + m_LocalScale: {x: 1, y: 0.99999994, z: 1} + m_Children: [] + m_Father: {fileID: 1934855145} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &376675010 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011286598088, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 376675011} + m_Layer: 0 + m_Name: hands:b_r_index2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &376675011 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014263687414, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 376675010} + m_LocalRotation: {x: 0.000000015652539, y: -0.00000017256959, z: -0.18624677, w: 0.98250306} + m_LocalPosition: {x: 0.0415749, y: -0.00000025658417, z: -0.00000039068158} + m_LocalScale: {x: 1.0000002, y: 1.0000001, z: 1.0000001} + m_Children: + - {fileID: 329783418} + m_Father: {fileID: 1690781231} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &390448548 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100006, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + serializedVersion: 5 + m_Component: + - component: {fileID: 390448549} + - component: {fileID: 390448550} + m_Layer: 0 + m_Name: LeftEyeAnchor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &390448549 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400006, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 390448548} + 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: 1080567925} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &390448550 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 20000012175207052, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 390448548} + 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: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &445516543 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013154274196, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 445516544} + m_Layer: 0 + m_Name: hands:b_r_ring1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &445516544 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010696968466, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 445516543} + m_LocalRotation: {x: -0.10180093, y: 0.56929916, z: 0.8152098, w: 0.031114696} + m_LocalPosition: {x: -0.0895311, y: -0.012713969, z: 0.0018533244} + m_LocalScale: {x: 1.0000001, y: 1, z: 1.0000001} + m_Children: + - {fileID: 671216321} + m_Father: {fileID: 256016476} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &470598175 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013364346644, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 1421016109} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 560474079} + m_Father: {fileID: 30936217} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &491546331 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000014126987918, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 491546332} + m_Layer: 0 + m_Name: hands:b_l_middle_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &491546332 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012322389972, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 491546331} + m_LocalRotation: {x: 1.6939072e-10, y: 1.9323143e-10, z: 6.3522637e-10, w: 1} + m_LocalPosition: {x: -0.026469607, y: 0.0000000036855743, z: 0.000000003584191} + m_LocalScale: {x: 1, y: 0.99999994, z: 1} + m_Children: [] + m_Father: {fileID: 1903904373} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &554071966 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010910743596, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + serializedVersion: 5 + m_Component: + - component: {fileID: 554071968} + - component: {fileID: 554071967} + m_Layer: 0 + m_Name: base + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &554071967 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000010884708534, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 554071966} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0e33623ec5372748b5703f61a4df82d, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &554071968 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010416372058, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 554071966} + 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: 30936217} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &560474077 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 560474079} + - component: {fileID: 560474078} + m_Layer: 0 + m_Name: LeftHandPoseEditHelper + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &560474078 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 560474077} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6bc5b4ba964e02b4ea773b2aaca7dc67, type: 3} + m_Name: + m_EditorClassIdentifier: + poseRoot: {fileID: 585168899} +--- !u!4 &560474079 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 560474077} + 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: 585168899} + m_Father: {fileID: 470598175} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &563908831 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 563908833} + - component: {fileID: 563908832} + 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 &563908832 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 563908831} + m_Enabled: 1 + serializedVersion: 7 + 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_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &563908833 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 563908831} + 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: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &585168898 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 585168899} + m_Layer: 0 + m_Name: hands_l_hand_world + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &585168899 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 585168898} + 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: 313519822} + m_Father: {fileID: 560474079} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &600624809 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012510561956, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 600624810} + m_Layer: 0 + m_Name: hands:b_r_pinky1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &600624810 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013193183530, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 600624809} + m_LocalRotation: {x: -0.01890341, y: 0.0067427615, z: 0.9928664, w: 0.11753096} + m_LocalPosition: {x: -0.05356621, y: -0.002439512, z: 0.0014644872} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1241509020} + m_Father: {fileID: 914695922} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &620480709 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012971578408, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 620480710} + m_Layer: 0 + m_Name: hands:b_r_middle_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &620480710 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011751791164, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 620480709} + m_LocalRotation: {x: -0.0000000014362507, y: -0.000000002820773, z: -0.000000022191672, + w: 1} + m_LocalPosition: {x: 0.026469525, y: 0.00000040609203, z: 0.00000019350924} + m_LocalScale: {x: 1, y: 0.9999999, z: 1} + m_Children: [] + m_Father: {fileID: 316040182} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &665325992 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000014232464268, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 665325993} + m_Layer: 0 + m_Name: hands:b_r_thumb3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &665325993 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012208129616, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 665325992} + m_LocalRotation: {x: -0.000000007942694, y: 0.000000010101241, z: 0.008720721, w: 0.99996203} + m_LocalPosition: {x: 0.02637508, y: -0.000003140552, z: 0.00000024192715} + m_LocalScale: {x: 1, y: 1, z: 1.0000001} + m_Children: + - {fileID: 924884950} + m_Father: {fileID: 1827566768} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &671216320 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010439537112, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 671216321} + m_Layer: 0 + m_Name: hands:b_r_ring2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &671216321 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014138112998, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 671216320} + m_LocalRotation: {x: 0.00000003873586, y: 0.00000004148523, z: -0.20290461, w: 0.9791986} + m_LocalPosition: {x: 0.038571976, y: 0.000000016822588, z: -0.00000011697061} + m_LocalScale: {x: 0.9999999, y: 1, z: 1} + m_Children: + - {fileID: 936747930} + m_Father: {fileID: 445516544} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &753461663 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + serializedVersion: 5 + m_Component: + - component: {fileID: 753461666} + - component: {fileID: 753461665} + - component: {fileID: 753461664} + m_Layer: 0 + m_Name: OVRCameraRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &753461664 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 753461663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7e933e81d3c20c74ea6fdc708a67e3a5, type: 3} + m_Name: + m_EditorClassIdentifier: + queueAhead: 1 + useRecommendedMSAALevel: 0 + enableAdaptiveResolution: 0 + minRenderScale: 0.7 + maxRenderScale: 1 + expandMixedRealityCapturePropertySheet: 0 + enableMixedReality: 0 + compositionMethod: 0 + extraHiddenLayers: + serializedVersion: 2 + m_Bits: 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 + _trackingOriginType: 1 + usePositionTracking: 1 + useRotationTracking: 1 + useIPDInPositionTracking: 1 + resetTrackerOnLoad: 0 +--- !u!114 &753461665 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400010, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 753461663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: df9f338034892c44ebb62d97894772f1, type: 3} + m_Name: + m_EditorClassIdentifier: + usePerEyeCameras: 0 + useFixedUpdateForTracking: 0 +--- !u!4 &753461666 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 753461663} + 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: 1080567925} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &758256567 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010924450336, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 758256568} + m_Layer: 0 + m_Name: hands:b_l_hand_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &758256568 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010716107878, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 758256567} + m_LocalRotation: {x: 0.22704251, y: 0.00000008674858, z: -0.000000018270624, w: 0.9738849} + m_LocalPosition: {x: 0.13611393, y: 0.000000015238625, z: -0.00000001802008} + m_LocalScale: {x: 1, y: 1.0000001, z: 0.9999999} + m_Children: [] + m_Father: {fileID: 313519822} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &800529965 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010381448528, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 800529966} + m_Layer: 0 + m_Name: hands:b_l_thumb_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &800529966 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012002987360, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 800529965} + m_LocalRotation: {x: -0.0000000013989427, y: -0.000000008504275, z: 0.000000004478251, + w: 1} + m_LocalPosition: {x: -0.03407956, y: 0.000000008410045, z: 0.000000006773969} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1196414139} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &843058191 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011070112746, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 843058192} + m_Layer: 0 + m_Name: hands:b_r_index_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &843058192 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010575000096, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 843058191} + m_LocalRotation: {x: 0.0000000020884363, y: 0.000000003619726, z: 0.000000009402631, + w: 1} + m_LocalPosition: {x: 0.029121779, y: 0.0000002786395, z: 0.0000010442106} + m_LocalScale: {x: 1, y: 1, z: 0.99999994} + m_Children: [] + m_Father: {fileID: 329783418} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &870347745 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013661276380, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 870347746} + m_Layer: 0 + m_Name: hands:b_l_index1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &870347746 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014155328254, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 870347745} + m_LocalRotation: {x: -0.010945108, y: -0.7329413, z: -0.66095215, w: -0.16068432} + m_LocalPosition: {x: 0.087078705, y: -0.0350999, z: -0.006813981} + m_LocalScale: {x: 1.0000002, y: 1.0000001, z: 1.0000002} + m_Children: + - {fileID: 1976326465} + m_Father: {fileID: 313519822} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &914695921 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012093083856, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 914695922} + m_Layer: 0 + m_Name: hands:b_r_pinky0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &914695922 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012203521522, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 914695921} + m_LocalRotation: {x: -0.4693215, y: -0.08311145, z: 0.0867284, w: 0.87481886} + m_LocalPosition: {x: -0.03127473, y: -0.019069267, z: -0.011509162} + m_LocalScale: {x: 1.0000001, y: 0.9999999, z: 1.0000001} + m_Children: + - {fileID: 600624810} + m_Father: {fileID: 256016476} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &924884949 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010806359444, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 924884950} + m_Layer: 0 + m_Name: hands:b_r_thumb_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &924884950 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010251195448, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 924884949} + m_LocalRotation: {x: -0.000000007437272, y: -0.000000005285605, z: 0.000000003233399, + w: 1} + m_LocalPosition: {x: 0.034079228, y: 0.00000027135118, z: 0.00000011445174} + m_LocalScale: {x: 0.99999994, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 665325993} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &936747929 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012016441122, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 936747930} + m_Layer: 0 + m_Name: hands:b_r_ring3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &936747930 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013519291214, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 936747929} + m_LocalRotation: {x: 0.00000002538091, y: -0.000000057510338, z: -0.08394359, w: 0.9964705} + m_LocalPosition: {x: 0.025775367, y: 0.00000023426949, z: 0.00000026900074} + m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_Children: + - {fileID: 1343741283} + m_Father: {fileID: 671216321} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1080567924 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 159718, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + serializedVersion: 5 + m_Component: + - component: {fileID: 1080567925} + m_Layer: 0 + m_Name: TrackingSpace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1080567925 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 459718, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 1080567924} + 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: 390448549} + - {fileID: 53342042} + - {fileID: 56120626} + - {fileID: 1754791342} + - {fileID: 1162487503} + - {fileID: 2098184029} + m_Father: {fileID: 753461666} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1162487502 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109308, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + serializedVersion: 5 + m_Component: + - component: {fileID: 1162487503} + m_Layer: 0 + m_Name: LeftHandAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1162487503 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 482130, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 1162487502} + 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: 1080567925} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1196414138 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013418442184, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1196414139} + m_Layer: 0 + m_Name: hands:b_l_thumb3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1196414139 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013478150618, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1196414138} + m_LocalRotation: {x: 0.000000010835937, y: 0.000000105541446, z: 0.008720753, w: 0.99996203} + m_LocalPosition: {x: -0.026371535, y: 0.0000000039149337, z: 0.000000001525968} + m_LocalScale: {x: 1.0000002, y: 1.0000002, z: 1.0000001} + m_Children: + - {fileID: 800529966} + m_Father: {fileID: 1553253457} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1208440874 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011109095410, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1208440875} + m_Layer: 0 + m_Name: hands:b_r_middle1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1208440875 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011985668308, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1208440874} + m_LocalRotation: {x: -0.03365176, y: 0.6480088, z: 0.7565946, w: 0.08072688} + m_LocalPosition: {x: -0.09142203, y: 0.009532631, z: 0.010838809} + m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1.0000001} + m_Children: + - {fileID: 1470779009} + m_Father: {fileID: 256016476} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1210129109 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010529747302, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1210129110} + m_Layer: 0 + m_Name: hands:b_l_ring_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1210129110 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011977766816, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1210129109} + m_LocalRotation: {x: -0.000000003974666, y: -0.000000007533675, z: 0.000000010893303, + w: 1} + m_LocalPosition: {x: -0.024214901, y: -0.0000000055627396, z: 0.0000000014620534} + m_LocalScale: {x: 0.99999994, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1911745904} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1241509019 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013402618928, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1241509020} + m_Layer: 0 + m_Name: hands:b_r_pinky2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1241509020 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011548096454, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1241509019} + m_LocalRotation: {x: 0.0000000121722445, y: 0.000000037490725, z: -0.16458228, w: 0.98636335} + m_LocalPosition: {x: 0.03335585, y: 0.000000428581, z: 0.00000030260418} + m_LocalScale: {x: 1, y: 0.99999994, z: 1} + m_Children: + - {fileID: 1850704993} + m_Father: {fileID: 600624810} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1343741282 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013261444462, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1343741283} + m_Layer: 0 + m_Name: hands:b_r_ring_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1343741283 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011071277814, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1343741282} + m_LocalRotation: {x: 0.0000000014840815, y: -0.0000000017981829, z: 1.2272992e-10, + w: 1} + m_LocalPosition: {x: 0.024214191, y: -0.000000029371913, z: 0.0000000143947485} + m_LocalScale: {x: 1.0000001, y: 1, z: 1.0000001} + m_Children: [] + m_Father: {fileID: 936747930} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1365922219 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1365922220} + m_Layer: 0 + m_Name: hands_r_hand_world + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1365922220 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1365922219} + 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: 256016476} + m_Father: {fileID: 34790507} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1420335878 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: _trackingOriginType + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_RootGameObject: {fileID: 753461663} + m_IsPrefabParent: 0 +--- !u!1 &1421016109 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011125779090, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + serializedVersion: 5 + m_Component: + - component: {fileID: 470598175} + - component: {fileID: 1421016110} + m_Layer: 0 + m_Name: hand_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1421016110 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000011404857786, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 1421016109} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1426033521 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013069185110, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1426033522} + m_Layer: 0 + m_Name: hands:b_l_index3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1426033522 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011517012044, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1426033521} + m_LocalRotation: {x: -0.00000006855413, y: -0.00000003895668, z: -0.059595995, w: 0.99822265} + m_LocalPosition: {x: -0.022153001, y: -0.0000000014452477, z: 7.970192e-10} + m_LocalScale: {x: 0.99999976, y: 0.9999999, z: 0.99999994} + m_Children: + - {fileID: 2132552193} + m_Father: {fileID: 1976326465} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1436046663 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157742, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1658856030} + serializedVersion: 5 + m_Component: + - component: {fileID: 1436046665} + - component: {fileID: 1436046664} + m_Layer: 0 + m_Name: controller_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1436046664 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477770, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 1436046663} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1436046665 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 448722, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 1436046663} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 30936217} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1436277363 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012325767376, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1436277364} + m_Layer: 0 + m_Name: hands:b_l_ring1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1436277364 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013865548944, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1436277363} + m_LocalRotation: {x: -0.101800956, y: 0.5692993, z: 0.8152097, w: 0.031114716} + m_LocalPosition: {x: 0.089531735, y: 0.01271399, z: -0.0018533365} + m_LocalScale: {x: 1.0000001, y: 0.9999999, z: 1} + m_Children: + - {fileID: 188612934} + m_Father: {fileID: 313519822} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1448414925 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012515651468, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1448414926} + m_Layer: 0 + m_Name: hands:b_r_hand_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1448414926 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010358949252, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1448414925} + m_LocalRotation: {x: 0.2270425, y: 0.00000013696271, z: 0.000000027668817, w: 0.9738849} + m_LocalPosition: {x: -0.1361133, y: 0.00000039348112, z: 0.0000007092745} + m_LocalScale: {x: 1.0000002, y: 1, z: 1.0000001} + m_Children: [] + m_Father: {fileID: 256016476} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1470779008 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012334489350, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1470779009} + m_Layer: 0 + m_Name: hands:b_r_middle2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1470779009 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010279714204, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1470779008} + m_LocalRotation: {x: 0.00000006068312, y: 0.00000001414483, z: -0.23558186, w: 0.9718545} + m_LocalPosition: {x: 0.045967016, y: 0.000000011164765, z: -0.00000003823086} + m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 0.9999999} + m_Children: + - {fileID: 316040182} + m_Father: {fileID: 1208440875} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1553253456 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011349760634, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1553253457} + m_Layer: 0 + m_Name: hands:b_l_thumb2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1553253457 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011106244114, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1553253456} + m_LocalRotation: {x: -0.000000022563794, y: -0.000000076783515, z: -0.14235, w: 0.9898164} + m_LocalPosition: {x: -0.03258823, y: 0.000000008250139, z: 0.0000000063271166} + m_LocalScale: {x: 1, y: 1, z: 0.9999999} + m_Children: + - {fileID: 1196414139} + m_Father: {fileID: 1601188193} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1601188192 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000014187544400, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1601188193} + m_Layer: 0 + m_Name: hands:b_l_thumb1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1601188193 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011390348006, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1601188192} + m_LocalRotation: {x: -0.24596234, y: -0.945037, z: 0.031994298, w: -0.2130351} + m_LocalPosition: {x: 0.026298413, y: -0.041470293, z: 0.020564139} + m_LocalScale: {x: 1.0000001, y: 1, z: 1.0000001} + m_Children: + - {fileID: 1553253457} + m_Father: {fileID: 313519822} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1654041717 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012026592076, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + serializedVersion: 5 + m_Component: + - component: {fileID: 1654041719} + - component: {fileID: 1654041718} + m_Layer: 0 + m_Name: body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1654041718 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000012186362028, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 1654041717} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb7a6650b6cb46545967d3b380b7396c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1654041719 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014100970646, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 1654041717} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.6, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 30936217} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1658856030 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 114000011404857786, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + propertyPath: customPose + value: + objectReference: {fileID: 0} + - target: {fileID: 114000010372160784, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + propertyPath: customPose + value: + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: LeftHandCustomPose + value: + objectReference: {fileID: 585168899} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: RightHandCustomPose + value: + objectReference: {fileID: 1365922220} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_RootGameObject: {fileID: 30936213} + m_IsPrefabParent: 0 +--- !u!1 &1677342975 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010844843470, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1677342976} + m_Layer: 0 + m_Name: hands:b_r_thumb1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1677342976 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012946508074, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1677342975} + m_LocalRotation: {x: -0.24596235, y: -0.945037, z: 0.031994287, w: -0.2130352} + m_LocalPosition: {x: -0.026297217, y: 0.041471086, z: -0.020563856} + m_LocalScale: {x: 1.0000002, y: 1, z: 1.0000002} + m_Children: + - {fileID: 1827566768} + m_Father: {fileID: 256016476} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1690781230 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012931321476, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1690781231} + m_Layer: 0 + m_Name: hands:b_r_index1 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1690781231 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011479365644, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1690781230} + m_LocalRotation: {x: -0.010945086, y: -0.73294145, z: -0.6609521, w: -0.16068438} + m_LocalPosition: {x: -0.087077975, y: 0.03509997, z: 0.0068147373} + m_LocalScale: {x: 1.0000002, y: 1.0000002, z: 1.0000001} + m_Children: + - {fileID: 376675011} + m_Father: {fileID: 256016476} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1754791341 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168682, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + serializedVersion: 5 + m_Component: + - component: {fileID: 1754791342} + m_Layer: 0 + m_Name: TrackerAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1754791342 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 468682, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 1754791341} + 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: 1080567925} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1827566767 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010590504850, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1827566768} + m_Layer: 0 + m_Name: hands:b_r_thumb2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1827566768 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012527699014, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1827566767} + m_LocalRotation: {x: 0.0000000097368815, y: 0.00000006591119, z: -0.14235, w: 0.9898164} + m_LocalPosition: {x: 0.03258561, y: 0.0000027121296, z: -0.00000029114267} + m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 0.99999994} + m_Children: + - {fileID: 665325993} + m_Father: {fileID: 1677342976} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1843625168 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010482306814, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + serializedVersion: 5 + m_Component: + - component: {fileID: 1906766866} + - component: {fileID: 1843625169} + m_Layer: 0 + m_Name: hand_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1843625169 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000010372160784, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 1843625168} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!1 &1850704992 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011760721852, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1850704993} + m_Layer: 0 + m_Name: hands:b_r_pinky3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1850704993 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013780580014, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1850704992} + m_LocalRotation: {x: 5.749046e-10, y: -0.000000062709326, z: -0.046993963, w: 0.9988952} + m_LocalPosition: {x: 0.017418418, y: -0.0000004882774, z: -0.00000079565086} + m_LocalScale: {x: 0.99999994, y: 1.0000001, z: 1} + m_Children: + - {fileID: 1956390914} + m_Father: {fileID: 1241509020} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1903904372 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013538305188, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1903904373} + m_Layer: 0 + m_Name: hands:b_l_middle3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1903904373 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014050872134, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1903904372} + m_LocalRotation: {x: -0.000000028111124, y: -0.000000020147448, z: -0.06577558, + w: 0.99783444} + m_LocalPosition: {x: -0.029590594, y: -0.000000002521893, z: 0.000000006982977} + m_LocalScale: {x: 0.99999994, y: 0.9999999, z: 1} + m_Children: + - {fileID: 491546332} + m_Father: {fileID: 239467253} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!4 &1906766866 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011212216358, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1658856030} + m_GameObject: {fileID: 1843625168} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 34790507} + m_Father: {fileID: 30936217} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1911745903 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013162173792, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1911745904} + m_Layer: 0 + m_Name: hands:b_l_ring3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1911745904 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012482291932, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1911745903} + m_LocalRotation: {x: -0.00000002929157, y: -0.000000028796071, z: -0.08394354, w: 0.9964705} + m_LocalPosition: {x: -0.02577529, y: -0.000000009610838, z: 6.700984e-11} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1210129110} + m_Father: {fileID: 188612934} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1924116397 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012660963546, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1924116398} + m_Layer: 0 + m_Name: hands:b_l_pinky0 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1924116398 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011221533814, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1924116397} + m_LocalRotation: {x: -0.46932158, y: -0.083111465, z: 0.086728446, w: 0.8748188} + m_LocalPosition: {x: 0.03127151, y: 0.019068034, z: 0.01150759} + m_LocalScale: {x: 1, y: 0.9999998, z: 1} + m_Children: + - {fileID: 56595421} + m_Father: {fileID: 313519822} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1934855144 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011317487948, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1934855145} + m_Layer: 0 + m_Name: hands:b_l_pinky3 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1934855145 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010957509028, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1934855144} + m_LocalRotation: {x: -0.00000003786612, y: -0.000000019554271, z: -0.046994086, + w: 0.99889517} + m_LocalPosition: {x: -0.017418226, y: 1.6851232e-10, z: 0.0000000028433322} + m_LocalScale: {x: 0.99999994, y: 0.99999994, z: 1} + m_Children: + - {fileID: 363627944} + m_Father: {fileID: 136091887} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1956390913 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013571305894, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1956390914} + m_Layer: 0 + m_Name: hands:b_r_pinky_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1956390914 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011129579048, guid: 1c855b4191df5b34881d54b2ecbd9599, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1956390913} + m_LocalRotation: {x: 0.000000002543885, y: -0.000000019746642, z: -0.0000000045765707, + w: 1} + m_LocalPosition: {x: 0.019441077, y: 0.00000018885824, z: 0.00000068496325} + m_LocalScale: {x: 1, y: 0.99999994, z: 1} + m_Children: [] + m_Father: {fileID: 1850704993} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1976326464 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000013780635352, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1976326465} + m_Layer: 0 + m_Name: hands:b_l_index2 + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1976326465 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000012632991036, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1976326464} + m_LocalRotation: {x: 0.00000009011916, y: -0.000000039812484, z: -0.1862468, w: 0.98250306} + m_LocalPosition: {x: -0.04157472, y: 2.9479105e-10, z: 0.0000000031051308} + m_LocalScale: {x: 1.0000001, y: 1.0000001, z: 1} + m_Children: + - {fileID: 1426033522} + m_Father: {fileID: 870347746} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2098184028 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 113768, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + serializedVersion: 5 + m_Component: + - component: {fileID: 2098184029} + m_Layer: 0 + m_Name: RightHandAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2098184029 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 487254, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1420335878} + m_GameObject: {fileID: 2098184028} + 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: 1080567925} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2132552192 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011846866994, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2132552193} + m_Layer: 0 + m_Name: hands:b_l_index_ignore + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2132552193 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011988422824, guid: c72434349284925498bb2d7214b00161, + type: 2} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2132552192} + m_LocalRotation: {x: 0.000000007592371, y: 0.0000000031128744, z: -0.0000000021318365, + w: 1} + m_LocalPosition: {x: -0.029121812, y: -0.000000009164141, z: 0.0000000021545208} + m_LocalScale: {x: 1.0000001, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1426033522} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Oculus/Avatar/Samples/GripPoses/GripPoses.unity.meta b/Assets/Oculus/Avatar/Samples/GripPoses/GripPoses.unity.meta new file mode 100644 index 0000000..0993774 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/GripPoses/GripPoses.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 697c6df5e1eddad40b634d311b0bb2e5 +timeCreated: 1477966491 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/GripPoses/Scripts.meta b/Assets/Oculus/Avatar/Samples/GripPoses/Scripts.meta new file mode 100644 index 0000000..1d671f8 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/GripPoses/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 85678699140c6c3429a87f4d679b1a17 +folderAsset: yes +timeCreated: 1477957292 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/GripPoses/Scripts/PoseEditHelper.cs b/Assets/Oculus/Avatar/Samples/GripPoses/Scripts/PoseEditHelper.cs new file mode 100644 index 0000000..f00ee91 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/GripPoses/Scripts/PoseEditHelper.cs @@ -0,0 +1,31 @@ +using UnityEngine; +using System.Collections; +using System; + +public class PoseEditHelper : MonoBehaviour { + + public Transform poseRoot; + + void OnDrawGizmos() + { + if (poseRoot != null) + { + DrawJoints(poseRoot); + } + } + + private void DrawJoints(Transform joint) + { + Gizmos.DrawWireSphere(joint.position, 0.005f); + for (int i = 0; i < joint.childCount; ++i) + { + Transform child = joint.GetChild(i); + if (child.name.EndsWith("_grip") || child.name.EndsWith("hand_ignore")) + { + continue; + } + Gizmos.DrawLine(joint.position, child.position); + DrawJoints(child); + } + } +} diff --git a/Assets/Oculus/Avatar/Samples/GripPoses/Scripts/PoseEditHelper.cs.meta b/Assets/Oculus/Avatar/Samples/GripPoses/Scripts/PoseEditHelper.cs.meta new file mode 100644 index 0000000..15ec7ac --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/GripPoses/Scripts/PoseEditHelper.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6bc5b4ba964e02b4ea773b2aaca7dc67 +timeCreated: 1477957304 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/LocalAvatar.meta b/Assets/Oculus/Avatar/Samples/LocalAvatar.meta new file mode 100644 index 0000000..20dd2bc --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/LocalAvatar.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2883b756c033a864ca988b3f522f3339 +folderAsset: yes +timeCreated: 1467313725 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/LocalAvatar/LocalAvatar.unity b/Assets/Oculus/Avatar/Samples/LocalAvatar/LocalAvatar.unity new file mode 100644 index 0000000..2ad6290 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/LocalAvatar/LocalAvatar.unity @@ -0,0 +1,501 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +SceneSettings: + m_ObjectHideFlags: 0 + m_PVSData: + m_PVSObjectsArray: [] + m_PVSPortalsArray: [] + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 7 + 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_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.18053587, g: 0.22601774, b: 0.30718702, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 7 + m_GIWorkflowMode: 0 + 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: 4 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_DirectLightInLightProbes: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_LightingDataAsset: {fileID: 0} + m_RuntimeCPUUsage: 25 +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + accuratePlacement: 0 + minRegionArea: 2 + cellSize: 0.16666667 + manualCellSize: 0 + m_NavMeshData: {fileID: 0} +--- !u!4 &369561663 stripped +Transform: + m_PrefabParentObject: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 395836775} +--- !u!1001 &395836775 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1310461517} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: -0.00000016292068 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LittleAvatar + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: -180 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 0.25 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + m_RemovedComponents: + - {fileID: 8254050, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &957641525 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 957641529} + - 33: {fileID: 957641528} + - 65: {fileID: 957641527} + - 23: {fileID: 957641526} + m_Layer: 0 + m_Name: MediumPedestal + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!23 &957641526 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!65 &957641527 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &957641528 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &957641529 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -2, z: 0} + m_LocalScale: {x: 2, y: 4, z: 2} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 2 +--- !u!1001 &1239677853 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: _trackingOriginType + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1310461516 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1310461517} + - 33: {fileID: 1310461520} + - 65: {fileID: 1310461519} + - 23: {fileID: 1310461518} + m_Layer: 0 + m_Name: LittlePedestal + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1310461517 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310461516} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0.5, z: 0.5} + m_LocalScale: {x: 0.5, y: 1, z: 0.5} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_Children: + - {fileID: 369561663} + m_Father: {fileID: 0} + m_RootOrder: 1 +--- !u!23 &1310461518 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310461516} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_SubsetIndices: + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedWireframeHidden: 0 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingOrder: 0 +--- !u!65 &1310461519 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310461516} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1310461520 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1310461516} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!1 &1658970730 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 4 + m_Component: + - 4: {fileID: 1658970732} + - 108: {fileID: 1658970731} + 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 &1658970731 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1658970730} + m_Enabled: 1 + serializedVersion: 7 + m_Type: 1 + m_Color: {r: 0.5955882, g: 0.5955882, b: 0.5955882, 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_ShadowRadius: 0 + m_ShadowAngle: 0 +--- !u!4 &1658970732 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1658970730} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 +--- !u!1001 &2053404217 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_IsPrefabParent: 0 diff --git a/Assets/Oculus/Avatar/Samples/LocalAvatar/LocalAvatar.unity.meta b/Assets/Oculus/Avatar/Samples/LocalAvatar/LocalAvatar.unity.meta new file mode 100644 index 0000000..8733076 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/LocalAvatar/LocalAvatar.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c65ef87480e70eb43931036c9c66d08d +timeCreated: 1466730185 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/RemoteLoopback.meta b/Assets/Oculus/Avatar/Samples/RemoteLoopback.meta new file mode 100644 index 0000000..a724a74 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/RemoteLoopback.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f26892c9951b6f54c82a5f1bf34e8d8a +folderAsset: yes +timeCreated: 1468000039 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/RemoteLoopback/RemoteLoopback.unity b/Assets/Oculus/Avatar/Samples/RemoteLoopback/RemoteLoopback.unity new file mode 100644 index 0000000..e90f4e1 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/RemoteLoopback/RemoteLoopback.unity @@ -0,0 +1,2920 @@ +%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.44657898, g: 0.4964133, b: 0.5748178, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_GIWorkflowMode: 0 + 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: 8 + m_Resolution: 2 + m_BakeResolution: 40 + m_TextureWidth: 1024 + m_TextureHeight: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 0 + m_CompAOExponentDirect: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 1024 + m_ReflectionCompression: 2 + m_MixedBakeMode: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_LightingDataAsset: {fileID: 0} + m_ShadowMaskMode: 2 +--- !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 + m_NavMeshData: {fileID: 0} +--- !u!1 &17753369 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1098047352992398, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 17753371} + - component: {fileID: 17753370} + m_Layer: 0 + m_Name: DefaultBodyMaterialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &17753370 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114949324920430652, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 17753369} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a139d83bf6796734db220df8a5bfacbd, type: 3} + m_Name: + m_EditorClassIdentifier: + DiffuseFallbacks: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: b3e87b1024f5fa8408d004b398e7b0c0, type: 3} + NormalFallbacks: + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 22a046c12fc7f3c4d98a98add109fa96, type: 3} + BodyColorTints: + - {r: 0.9764706, g: 0.8509804, b: 0.6862745, a: 1} + - {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + - {r: 0.9764706, g: 0.9019608, b: 0.6745098, a: 1} + - {r: 0.7647059, g: 0.6039216, b: 0.2509804, a: 1} + - {r: 0.45490196, g: 0.1882353, b: 0, a: 1} + - {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + LocalAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.86, b: 0.77, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.3 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.6235, g: 0.4627, b: 0.3412, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: -5.3487954e+9, g: 771.1758, b: -5.6686517e+23, a: 4.9667446e-34} + Textures: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 1, y: 0.86, z: 0.77, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 0.6235, y: 0.4627, z: 0.3412, w: 1} + - {x: -0.025753247, y: -2.0311036e-13, z: -6.2685677e-31, w: -2.0021067e+22} + DiffuseIntensities: + - 0.3 + - 0.1 + - 0 + - 0.15 + - 0.15 + RimIntensities: + - 5 + - 2 + - 2.84 + - 4 + - 4 + BacklightIntensities: + - 1 + - 0.7 + - 0.7 + - 0.7 + - 0.7 + ReflectionIntensities: + - 0 + - 0.3 + - 0.4 + - 0 + - 0 + DefaultAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.86, b: 0.77, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.3 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.6235, g: 0.4627, b: 0.3412, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: -5.3487954e+9, g: 771.1758, b: -5.6686517e+23, a: 4.9667446e-34} + Textures: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 1, y: 0.86, z: 0.77, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 0.6235, y: 0.4627, z: 0.3412, w: 1} + - {x: -0.025753247, y: -2.0311036e-13, z: -6.2685677e-31, w: -2.0021067e+22} + DiffuseIntensities: + - 0.3 + - 0.1 + - 0 + - 0.15 + - 0.15 + RimIntensities: + - 5 + - 2 + - 2.84 + - 4 + - 4 + BacklightIntensities: + - 1 + - 0.7 + - 0.7 + - 0.7 + - 0.7 + ReflectionIntensities: + - 0 + - 0.3 + - 0.4 + - 0 + - 0 +--- !u!4 &17753371 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4581494204247758, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 17753369} + 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: 294178692} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &131845959 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157742, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 131845961} + - component: {fileID: 131845960} + m_Layer: 0 + m_Name: controller_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &131845960 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477770, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 131845959} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &131845961 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 448722, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 131845959} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 294178692} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &138730797 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168682, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + serializedVersion: 5 + m_Component: + - component: {fileID: 138730798} + m_Layer: 0 + m_Name: TrackerAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &138730798 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 468682, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 138730797} + 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: 1013109275} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &150279911 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1231602751420816, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 150279913} + - component: {fileID: 150279912} + m_Layer: 0 + m_Name: DefaultHandMaterialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &150279912 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114029231360713414, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 150279911} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a139d83bf6796734db220df8a5bfacbd, type: 3} + m_Name: + m_EditorClassIdentifier: + DiffuseFallbacks: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: b3e87b1024f5fa8408d004b398e7b0c0, type: 3} + NormalFallbacks: + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 22a046c12fc7f3c4d98a98add109fa96, type: 3} + BodyColorTints: + - {r: 0.9764706, g: 0.8509804, b: 0.6862745, a: 1} + - {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + - {r: 0.9764706, g: 0.9019608, b: 0.6745098, a: 1} + - {r: 0.7647059, g: 0.6039216, b: 0.2509804, a: 1} + - {r: 0.45490196, g: 0.1882353, b: 0, a: 1} + - {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + LocalAvatarConfig: + ComponentMaterialProperties: [] + MaterialPropertyBlock: + Colors: [] + DiffuseIntensities: [] + RimIntensities: [] + BacklightIntensities: [] + ReflectionIntensities: [] + DefaultAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + Textures: [] + DiffuseIntensity: 0.301 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: [] + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 0.80784315, g: 0.80784315, b: 0.80784315, a: 1} + Textures: [] + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.22352941, g: 0.11372549, b: 0, a: 1} + Textures: [] + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + Textures: [] + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + DiffuseIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + RimIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + BacklightIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + ReflectionIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 +--- !u!4 &150279913 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4468369968689664, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 150279911} + 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: 1202279117} + m_RootOrder: 8 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &171521067 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 113768, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + serializedVersion: 5 + m_Component: + - component: {fileID: 171521068} + m_Layer: 0 + m_Name: RightHandAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &171521068 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 487254, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 171521067} + 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: 397287355} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &175213101 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + serializedVersion: 5 + m_Component: + - component: {fileID: 175213102} + - component: {fileID: 175213103} + m_Layer: 0 + m_Name: RightEyeAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &175213102 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 175213101} + 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: 397287355} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &175213103 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 20000010189485334, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 175213101} + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &197247450 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010482306814, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 197247452} + - component: {fileID: 197247451} + m_Layer: 0 + m_Name: hand_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &197247451 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000010372160784, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 197247450} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &197247452 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011212216358, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 197247450} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 294178692} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &268270709 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100002, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + serializedVersion: 5 + m_Component: + - component: {fileID: 268270710} + - component: {fileID: 268270712} + - component: {fileID: 268270711} + m_Layer: 0 + m_Name: CenterEyeAnchor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &268270710 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400002, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 268270709} + 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: 1013109275} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &268270711 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2037080, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 268270709} + 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_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &268270712 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8100000, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 268270709} + m_Enabled: 1 +--- !u!1 &294178688 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 294178692} + - component: {fileID: 294178691} + - component: {fileID: 294178690} + - component: {fileID: 294178689} + m_Layer: 0 + m_Name: LocalAvatar (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &294178689 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11441414, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 294178688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac27124318cf8e84aa7350c2ac1cdb80, type: 3} + m_Name: + m_EditorClassIdentifier: + Mode: 0 +--- !u!82 &294178690 +AudioSource: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8254050, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 294178688} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 +--- !u!114 &294178691 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 294178688} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 00f3402a2ea5bff4880c0313515240cd, type: 3} + m_Name: + m_EditorClassIdentifier: + DefaultBodyMaterialManager: {fileID: 17753370} + DefaultHandMaterialManager: {fileID: 373740623} + Driver: {fileID: 294178689} + Base: {fileID: 1329503002} + Body: {fileID: 1437741096} + ControllerLeft: {fileID: 1358492916} + ControllerRight: {fileID: 131845960} + HandLeft: {fileID: 1617907520} + HandRight: {fileID: 197247451} + RecordPackets: 0 + UseSDKPackets: 1 + StartWithControllers: 0 + FirstPersonLayer: + layerIndex: 0 + ThirdPersonLayer: + layerIndex: 0 + ShowFirstPerson: 0 + ShowThirdPerson: 1 + Capabilities: -1 + SurfaceShader: {fileID: 4800000, guid: 73f67c4e7bf718b4385aa6b1f8a06591, type: 3} + SurfaceShaderSelfOccluding: {fileID: 4800000, guid: 69f342b79d37541489919a19cfd8a924, + type: 3} + SurfaceShaderPBS: {fileID: 4800000, guid: 5e52aa58207bbf24d8eb8ec969e9ae88, type: 3} + SurfaceShaderPBSV2Single: {fileID: 4800000, guid: c26fc51e445dcfd4db09305d861dc11c, + type: 3} + SurfaceShaderPBSV2Combined: {fileID: 4800000, guid: 37d2b8298f61cd2469465fc36108675d, + type: 3} + SurfaceShaderPBSV2Simple: {fileID: 4800000, guid: 36b8b481cf607814a8cec318f0148d63, + type: 3} + SurfaceShaderPBSV2Loading: {fileID: 4800000, guid: 822f5e641dc5dd54ca9555b727b3277f, + type: 3} + oculusUserID: 1727176100935614 + LeftHandCustomPose: {fileID: 0} + RightHandCustomPose: {fileID: 0} + PacketSettings: + UpdateRate: 0.033333335 + VoiceAmplitude: 0 + EnableMouthVertexAnimation: 0 +--- !u!4 &294178692 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 294178688} + m_LocalRotation: {x: 0, y: 1, z: 0, w: 0} + m_LocalPosition: {x: 0, y: 0, z: 0.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 1329503003} + - {fileID: 1437741097} + - {fileID: 1617907521} + - {fileID: 1358492917} + - {fileID: 197247452} + - {fileID: 131845961} + - {fileID: 17753371} + - {fileID: 373740624} + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 180, z: 0} +--- !u!1 &308398286 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100006, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + serializedVersion: 5 + m_Component: + - component: {fileID: 308398287} + - component: {fileID: 308398288} + m_Layer: 0 + m_Name: LeftEyeAnchor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &308398287 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400006, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 308398286} + 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: 1013109275} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &308398288 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 20000012175207052, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 308398286} + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1001 &344808318 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1202279117} + m_Modifications: + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: usePositionTracking + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: _trackingOriginType + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_RootGameObject: {fileID: 777067216} + m_IsPrefabParent: 0 +--- !u!1 &373740622 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1231602751420816, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 373740624} + - component: {fileID: 373740623} + m_Layer: 0 + m_Name: DefaultHandMaterialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &373740623 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114029231360713414, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 373740622} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a139d83bf6796734db220df8a5bfacbd, type: 3} + m_Name: + m_EditorClassIdentifier: + DiffuseFallbacks: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: b3e87b1024f5fa8408d004b398e7b0c0, type: 3} + NormalFallbacks: + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 22a046c12fc7f3c4d98a98add109fa96, type: 3} + BodyColorTints: + - {r: 0.9764706, g: 0.8509804, b: 0.6862745, a: 1} + - {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + - {r: 0.9764706, g: 0.9019608, b: 0.6745098, a: 1} + - {r: 0.7647059, g: 0.6039216, b: 0.2509804, a: 1} + - {r: 0.45490196, g: 0.1882353, b: 0, a: 1} + - {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + LocalAvatarConfig: + ComponentMaterialProperties: [] + MaterialPropertyBlock: + Colors: [] + DiffuseIntensities: [] + RimIntensities: [] + BacklightIntensities: [] + ReflectionIntensities: [] + DefaultAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + Textures: [] + DiffuseIntensity: 0.301 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: [] + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 0.80784315, g: 0.80784315, b: 0.80784315, a: 1} + Textures: [] + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.22352941, g: 0.11372549, b: 0, a: 1} + Textures: [] + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + Textures: [] + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + - {x: 0, y: 0, z: 0, w: 0} + DiffuseIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + RimIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + BacklightIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 + ReflectionIntensities: + - 0 + - 0 + - 0 + - 0 + - 0 +--- !u!4 &373740624 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4468369968689664, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 373740622} + 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: 294178692} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &391167544 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + serializedVersion: 5 + m_Component: + - component: {fileID: 391167545} + - component: {fileID: 391167546} + m_Layer: 0 + m_Name: RightEyeAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &391167545 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 391167544} + 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: 1013109275} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &391167546 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 20000010189485334, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 391167544} + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &397287354 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 159718, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + serializedVersion: 5 + m_Component: + - component: {fileID: 397287355} + m_Layer: 0 + m_Name: TrackingSpace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &397287355 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 459718, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 397287354} + 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: 1892901576} + - {fileID: 1227517733} + - {fileID: 175213102} + - {fileID: 1934788895} + - {fileID: 467948675} + - {fileID: 171521068} + m_Father: {fileID: 1826797345} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &467948674 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109308, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + serializedVersion: 5 + m_Component: + - component: {fileID: 467948675} + m_Layer: 0 + m_Name: LeftHandAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &467948675 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 482130, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 467948674} + 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: 397287355} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &562909166 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010910743596, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 562909168} + - component: {fileID: 562909167} + m_Layer: 0 + m_Name: base + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &562909167 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000010884708534, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 562909166} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0e33623ec5372748b5703f61a4df82d, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &562909168 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010416372058, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 562909166} + 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: 1202279117} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &598885955 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 184120, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 598885957} + - component: {fileID: 598885956} + m_Layer: 0 + m_Name: controller_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &598885956 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11405130, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 598885955} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &598885957 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400938, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 598885955} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1202279117} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &673621216 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 109308, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + serializedVersion: 5 + m_Component: + - component: {fileID: 673621217} + m_Layer: 0 + m_Name: LeftHandAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &673621217 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 482130, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 673621216} + 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: 1013109275} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &682638372 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 157742, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 682638374} + - component: {fileID: 682638373} + m_Layer: 0 + m_Name: controller_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &682638373 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11477770, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 682638372} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &682638374 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 448722, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 682638372} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1202279117} + m_RootOrder: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &777067216 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + serializedVersion: 5 + m_Component: + - component: {fileID: 777067217} + - component: {fileID: 777067219} + - component: {fileID: 777067218} + m_Layer: 0 + m_Name: OVRCameraRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &777067217 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 777067216} + 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: 1013109275} + m_Father: {fileID: 1202279117} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &777067218 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 777067216} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7e933e81d3c20c74ea6fdc708a67e3a5, type: 3} + m_Name: + m_EditorClassIdentifier: + queueAhead: 1 + useRecommendedMSAALevel: 0 + enableAdaptiveResolution: 0 + minRenderScale: 0.7 + maxRenderScale: 1 + expandMixedRealityCapturePropertySheet: 0 + enableMixedReality: 0 + compositionMethod: 0 + extraHiddenLayers: + serializedVersion: 2 + m_Bits: 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 + _trackingOriginType: 1 + usePositionTracking: 1 + useRotationTracking: 1 + useIPDInPositionTracking: 1 + resetTrackerOnLoad: 0 +--- !u!114 &777067219 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400010, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 777067216} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: df9f338034892c44ebb62d97894772f1, type: 3} + m_Name: + m_EditorClassIdentifier: + usePerEyeCameras: 0 + useFixedUpdateForTracking: 0 +--- !u!1 &957641525 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 957641529} + - component: {fileID: 957641528} + - component: {fileID: 957641527} + - component: {fileID: 957641526} + m_Layer: 0 + m_Name: Floor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 4294967295 + m_IsActive: 1 +--- !u!23 &957641526 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!65 &957641527 +BoxCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Size: {x: 1, y: 1, z: 1} + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &957641528 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &957641529 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 957641525} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: -0.5, z: 0} + m_LocalScale: {x: 10, y: 1, z: 10} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &959241969 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_Name + value: LocalAvatar (1) + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 1727176100935614 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalEulerAnglesHint.y + value: 180 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowFirstPerson + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: ShowThirdPerson + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_RootGameObject: {fileID: 294178688} + m_IsPrefabParent: 0 +--- !u!1 &960813540 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1098047352992398, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 960813542} + - component: {fileID: 960813541} + m_Layer: 0 + m_Name: DefaultBodyMaterialManager + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &960813541 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114949324920430652, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 960813540} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a139d83bf6796734db220df8a5bfacbd, type: 3} + m_Name: + m_EditorClassIdentifier: + DiffuseFallbacks: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: b3e87b1024f5fa8408d004b398e7b0c0, type: 3} + NormalFallbacks: + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 22a046c12fc7f3c4d98a98add109fa96, type: 3} + BodyColorTints: + - {r: 0.9764706, g: 0.8509804, b: 0.6862745, a: 1} + - {r: 1, g: 0.9529412, b: 0.92156863, a: 1} + - {r: 0.9764706, g: 0.9019608, b: 0.6745098, a: 1} + - {r: 0.7647059, g: 0.6039216, b: 0.2509804, a: 1} + - {r: 0.45490196, g: 0.1882353, b: 0, a: 1} + - {r: 0.22352941, g: 0.023529412, b: 0.011764706, a: 1} + LocalAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.86, b: 0.77, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.3 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.6235, g: 0.4627, b: 0.3412, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: -5.3487954e+9, g: 771.1758, b: -5.6686517e+23, a: 4.9667446e-34} + Textures: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 1, y: 0.86, z: 0.77, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 0.6235, y: 0.4627, z: 0.3412, w: 1} + - {x: -0.025753247, y: -2.0311036e-13, z: -6.2685677e-31, w: -2.0021067e+22} + DiffuseIntensities: + - 0.3 + - 0.1 + - 0 + - 0.15 + - 0.15 + RimIntensities: + - 5 + - 2 + - 2.84 + - 4 + - 4 + BacklightIntensities: + - 1 + - 0.7 + - 0.7 + - 0.7 + - 0.7 + ReflectionIntensities: + - 0 + - 0.3 + - 0.4 + - 0 + - 0 + DefaultAvatarConfig: + ComponentMaterialProperties: + - TypeIndex: 0 + Color: {r: 1, g: 0.86, b: 0.77, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.3 + RimIntensity: 5 + BacklightIntensity: 1 + ReflectionIntensity: 0 + - TypeIndex: 1 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.1 + RimIntensity: 2 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.3 + - TypeIndex: 2 + Color: {r: 1, g: 1, b: 1, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0 + RimIntensity: 2.84 + BacklightIntensity: 0.7 + ReflectionIntensity: 0.4 + - TypeIndex: 3 + Color: {r: 0.6235, g: 0.4627, b: 0.3412, a: 1} + Textures: + - {fileID: 0} + - {fileID: 0} + - {fileID: 0} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + - TypeIndex: 4 + Color: {r: -5.3487954e+9, g: 771.1758, b: -5.6686517e+23, a: 4.9667446e-34} + Textures: + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + - {fileID: 2800000, guid: 9fb4a3be60417d043865e457a9d51e63, type: 3} + - {fileID: 2800000, guid: 502d438d2584976448c3cdb146ed836d, type: 3} + DiffuseIntensity: 0.15 + RimIntensity: 4 + BacklightIntensity: 0.7 + ReflectionIntensity: 0 + MaterialPropertyBlock: + Colors: + - {x: 1, y: 0.86, z: 0.77, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 1, y: 1, z: 1, w: 1} + - {x: 0.6235, y: 0.4627, z: 0.3412, w: 1} + - {x: -0.025753247, y: -2.0311036e-13, z: -6.2685677e-31, w: -2.0021067e+22} + DiffuseIntensities: + - 0.3 + - 0.1 + - 0 + - 0.15 + - 0.15 + RimIntensities: + - 5 + - 2 + - 2.84 + - 4 + - 4 + BacklightIntensities: + - 1 + - 0.7 + - 0.7 + - 0.7 + - 0.7 + ReflectionIntensities: + - 0 + - 0.3 + - 0.4 + - 0 + - 0 +--- !u!4 &960813542 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4581494204247758, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 960813540} + 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: 1202279117} + m_RootOrder: 7 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1013109274 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 159718, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + serializedVersion: 5 + m_Component: + - component: {fileID: 1013109275} + m_Layer: 0 + m_Name: TrackingSpace + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1013109275 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 459718, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 1013109274} + 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: 308398287} + - {fileID: 268270710} + - {fileID: 391167545} + - {fileID: 138730798} + - {fileID: 673621217} + - {fileID: 1663001939} + m_Father: {fileID: 777067217} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1174003223 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 158226, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 1202279117} + - component: {fileID: 1174003226} + - component: {fileID: 1174003225} + - component: {fileID: 1174003224} + m_Layer: 0 + m_Name: LocalAvatar + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1174003224 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11441414, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 1174003223} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: ac27124318cf8e84aa7350c2ac1cdb80, type: 3} + m_Name: + m_EditorClassIdentifier: + Mode: 0 +--- !u!82 &1174003225 +AudioSource: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8254050, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 1174003223} + m_Enabled: 1 + serializedVersion: 4 + OutputAudioMixerGroup: {fileID: 0} + m_audioClip: {fileID: 0} + m_PlayOnAwake: 1 + m_Volume: 1 + m_Pitch: 1 + Loop: 0 + Mute: 0 + Spatialize: 0 + SpatializePostEffects: 0 + Priority: 128 + DopplerLevel: 1 + MinDistance: 1 + MaxDistance: 500 + Pan2D: 0 + rolloffMode: 0 + BypassEffects: 0 + BypassListenerEffects: 0 + BypassReverbZones: 0 + rolloffCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + - serializedVersion: 2 + time: 1 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 4 + panLevelCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + spreadCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 0 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 + reverbZoneMixCustomCurve: + serializedVersion: 2 + m_Curve: + - serializedVersion: 2 + time: 0 + value: 1 + inSlope: 0 + outSlope: 0 + tangentMode: 0 + m_PreInfinity: 2 + m_PostInfinity: 2 + m_RotationOrder: 0 +--- !u!114 &1174003226 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 1174003223} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 00f3402a2ea5bff4880c0313515240cd, type: 3} + m_Name: + m_EditorClassIdentifier: + DefaultBodyMaterialManager: {fileID: 960813541} + DefaultHandMaterialManager: {fileID: 150279912} + Driver: {fileID: 1174003224} + Base: {fileID: 562909167} + Body: {fileID: 2127858357} + ControllerLeft: {fileID: 598885956} + ControllerRight: {fileID: 682638373} + HandLeft: {fileID: 1591749837} + HandRight: {fileID: 2116318179} + RecordPackets: 0 + UseSDKPackets: 1 + StartWithControllers: 0 + FirstPersonLayer: + layerIndex: 0 + ThirdPersonLayer: + layerIndex: 0 + ShowFirstPerson: 1 + ShowThirdPerson: 0 + Capabilities: -1 + SurfaceShader: {fileID: 4800000, guid: 73f67c4e7bf718b4385aa6b1f8a06591, type: 3} + SurfaceShaderSelfOccluding: {fileID: 4800000, guid: 69f342b79d37541489919a19cfd8a924, + type: 3} + SurfaceShaderPBS: {fileID: 4800000, guid: 5e52aa58207bbf24d8eb8ec969e9ae88, type: 3} + SurfaceShaderPBSV2Single: {fileID: 4800000, guid: c26fc51e445dcfd4db09305d861dc11c, + type: 3} + SurfaceShaderPBSV2Combined: {fileID: 4800000, guid: 37d2b8298f61cd2469465fc36108675d, + type: 3} + SurfaceShaderPBSV2Simple: {fileID: 4800000, guid: 36b8b481cf607814a8cec318f0148d63, + type: 3} + SurfaceShaderPBSV2Loading: {fileID: 4800000, guid: 822f5e641dc5dd54ca9555b727b3277f, + type: 3} + oculusUserID: 1727176100935614 + LeftHandCustomPose: {fileID: 0} + RightHandCustomPose: {fileID: 0} + PacketSettings: + UpdateRate: 0.033333335 + VoiceAmplitude: 0 + EnableMouthVertexAnimation: 0 +--- !u!4 &1202279117 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 1174003223} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 562909168} + - {fileID: 2127858358} + - {fileID: 1591749838} + - {fileID: 777067217} + - {fileID: 598885957} + - {fileID: 2116318180} + - {fileID: 682638374} + - {fileID: 960813542} + - {fileID: 150279913} + m_Father: {fileID: 0} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1221294548 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: m_RootOrder + value: 4 + objectReference: {fileID: 0} + - target: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + propertyPath: _trackingOriginType + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_RootGameObject: {fileID: 1826797342} + m_IsPrefabParent: 0 +--- !u!1 &1227517732 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100002, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + serializedVersion: 5 + m_Component: + - component: {fileID: 1227517733} + - component: {fileID: 1227517735} + - component: {fileID: 1227517734} + m_Layer: 0 + m_Name: CenterEyeAnchor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1227517733 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400002, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1227517732} + 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: 397287355} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &1227517734 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 2037080, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1227517732} + 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_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!81 &1227517735 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 8100000, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1227517732} + m_Enabled: 1 +--- !u!1 &1329503001 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010910743596, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 1329503003} + - component: {fileID: 1329503002} + m_Layer: 0 + m_Name: base + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1329503002 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000010884708534, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 1329503001} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: a0e33623ec5372748b5703f61a4df82d, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1329503003 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000010416372058, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 1329503001} + 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: 294178692} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1358492915 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 184120, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 1358492917} + - component: {fileID: 1358492916} + m_Layer: 0 + m_Name: controller_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1358492916 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11405130, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 1358492915} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 77e19ec58d4a9e844970103e5bd8946a, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1358492917 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400938, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 1358492915} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 294178692} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1437741095 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012026592076, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 1437741097} + - component: {fileID: 1437741096} + m_Layer: 0 + m_Name: body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1437741096 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000012186362028, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 1437741095} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb7a6650b6cb46545967d3b380b7396c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1437741097 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014100970646, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 1437741095} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.6, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 294178692} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1591749836 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011125779090, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 1591749838} + - component: {fileID: 1591749837} + m_Layer: 0 + m_Name: hand_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1591749837 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000011404857786, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 1591749836} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1591749838 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013364346644, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 1591749836} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1202279117} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1617907519 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000011125779090, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + serializedVersion: 5 + m_Component: + - component: {fileID: 1617907521} + - component: {fileID: 1617907520} + m_Layer: 0 + m_Name: hand_left + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1617907520 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000011404857786, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 1617907519} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &1617907521 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000013364346644, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 959241969} + m_GameObject: {fileID: 1617907519} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: -0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 294178692} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1658970730 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1658970732} + - component: {fileID: 1658970731} + 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 &1658970731 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1658970730} + m_Enabled: 1 + serializedVersion: 8 + m_Type: 1 + m_Color: {r: 0.5955882, g: 0.5955882, b: 0.5955882, 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 &1658970732 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1658970730} + m_LocalRotation: {x: 0.40821794, y: -0.23456973, z: 0.109381676, w: 0.87542605} + m_LocalPosition: {x: 0, y: 3, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} +--- !u!1 &1663001938 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 113768, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + serializedVersion: 5 + m_Component: + - component: {fileID: 1663001939} + m_Layer: 0 + m_Name: RightHandAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1663001939 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 487254, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 344808318} + m_GameObject: {fileID: 1663001938} + 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: 1013109275} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1742914067 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalPosition.z + value: -0.5 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 463470, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + propertyPath: oculusUserID + value: 1727176100935614 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + m_RootGameObject: {fileID: 1174003223} + m_IsPrefabParent: 0 +--- !u!1 &1826797342 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + serializedVersion: 5 + m_Component: + - component: {fileID: 1826797345} + - component: {fileID: 1826797344} + - component: {fileID: 1826797343} + m_Layer: 0 + m_Name: OVRCameraRig + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &1826797343 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400000, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1826797342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 7e933e81d3c20c74ea6fdc708a67e3a5, type: 3} + m_Name: + m_EditorClassIdentifier: + queueAhead: 1 + useRecommendedMSAALevel: 0 + enableAdaptiveResolution: 0 + minRenderScale: 0.7 + maxRenderScale: 1 + expandMixedRealityCapturePropertySheet: 0 + enableMixedReality: 0 + compositionMethod: 0 + extraHiddenLayers: + serializedVersion: 2 + m_Bits: 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 + _trackingOriginType: 1 + usePositionTracking: 1 + useRotationTracking: 1 + useIPDInPositionTracking: 1 + resetTrackerOnLoad: 0 +--- !u!114 &1826797344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 11400010, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1826797342} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: df9f338034892c44ebb62d97894772f1, type: 3} + m_Name: + m_EditorClassIdentifier: + usePerEyeCameras: 0 + useFixedUpdateForTracking: 0 +--- !u!4 &1826797345 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400004, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1826797342} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: -0.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: + - {fileID: 397287355} + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &1892901575 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 100006, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + serializedVersion: 5 + m_Component: + - component: {fileID: 1892901576} + - component: {fileID: 1892901577} + m_Layer: 0 + m_Name: LeftEyeAnchor + m_TagString: MainCamera + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1892901576 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 400006, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1892901575} + 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: 397287355} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!20 &1892901577 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 20000012175207052, guid: 126d619cf4daa52469682f85c1378b4a, + type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1892901575} + 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: 0 + m_AllowMSAA: 1 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 + m_StereoMirrorMode: 0 +--- !u!1 &1934788894 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 168682, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + serializedVersion: 5 + m_Component: + - component: {fileID: 1934788895} + m_Layer: 0 + m_Name: TrackerAnchor + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &1934788895 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 468682, guid: 126d619cf4daa52469682f85c1378b4a, type: 2} + m_PrefabInternal: {fileID: 1221294548} + m_GameObject: {fileID: 1934788894} + 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: 397287355} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2116318178 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000010482306814, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 2116318180} + - component: {fileID: 2116318179} + m_Layer: 0 + m_Name: hand_right + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2116318179 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000010372160784, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 2116318178} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e53b07ad62d980a4da9fffff0b05fd2e, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &2116318180 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000011212216358, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 2116318178} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0.15, y: 1.221, z: 0.282} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1202279117} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2127858356 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 1000012026592076, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + serializedVersion: 5 + m_Component: + - component: {fileID: 2127858358} + - component: {fileID: 2127858357} + m_Layer: 0 + m_Name: body + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &2127858357 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 114000012186362028, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 2127858356} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: eb7a6650b6cb46545967d3b380b7396c, type: 3} + m_Name: + m_EditorClassIdentifier: +--- !u!4 &2127858358 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 4000014100970646, guid: 84c8b8609f9bb434eaf5248f17ff1293, + type: 2} + m_PrefabInternal: {fileID: 1742914067} + m_GameObject: {fileID: 2127858356} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 1.6, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 1202279117} + m_RootOrder: 1 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Oculus/Avatar/Samples/RemoteLoopback/RemoteLoopback.unity.meta b/Assets/Oculus/Avatar/Samples/RemoteLoopback/RemoteLoopback.unity.meta new file mode 100644 index 0000000..5566f8c --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/RemoteLoopback/RemoteLoopback.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: aa35ff5ba76fb384d839383c84209da9 +timeCreated: 1468000130 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts.meta b/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts.meta new file mode 100644 index 0000000..609a646 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: edf34aa3892fd9f4eb0795663f7e3ffc +folderAsset: yes +timeCreated: 1468000607 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts/RemoteLoopbackManager.cs b/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts/RemoteLoopbackManager.cs new file mode 100644 index 0000000..ae501eb --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts/RemoteLoopbackManager.cs @@ -0,0 +1,155 @@ +using UnityEngine; +using System.Collections; +using System; +using System.IO; +using Oculus.Avatar; +using System.Runtime.InteropServices; +using System.Collections.Generic; + +public class RemoteLoopbackManager : MonoBehaviour +{ + class PacketLatencyPair + { + public byte[] PacketData; + public float FakeLatency; + }; + + public OvrAvatar LocalAvatar; + public OvrAvatar LoopbackAvatar; + + [System.Serializable] + public class SimulatedLatencySettings + { + [Range(0.0f, 0.5f)] + public float FakeLatencyMax = 0.25f; //250 ms max latency + + [Range(0.0f, 0.5f)] + public float FakeLatencyMin = 0.002f; //2ms min latency + + [Range(0.0f, 1.0f)] + public float LatencyWeight = 0.25f; // How much the latest sample impacts the current latency + + [Range(0,10)] + public int MaxSamples = 4; //How many samples in our window + + internal float AverageWindow = 0f; + internal float LatencySum = 0f; + internal LinkedList LatencyValues = new LinkedList(); + + public float NextValue() + { + AverageWindow = LatencySum / (float)LatencyValues.Count; + float RandomLatency = UnityEngine.Random.Range(FakeLatencyMin, FakeLatencyMax); + float FakeLatency = AverageWindow * (1f - LatencyWeight) + LatencyWeight * RandomLatency; + + if (LatencyValues.Count >= MaxSamples) + { + LatencySum -= LatencyValues.First.Value; + LatencyValues.RemoveFirst(); + } + + LatencySum += FakeLatency; + LatencyValues.AddLast(FakeLatency); + + return FakeLatency; + } + }; + + public SimulatedLatencySettings LatencySettings = new SimulatedLatencySettings(); + + private int PacketSequence = 0; + + LinkedList packetQueue = new LinkedList(); + + void Start() + { + LocalAvatar.RecordPackets = true; + LocalAvatar.PacketRecorded += OnLocalAvatarPacketRecorded; + float FirstValue = UnityEngine.Random.Range(LatencySettings.FakeLatencyMin, LatencySettings.FakeLatencyMax); + LatencySettings.LatencyValues.AddFirst(FirstValue); + LatencySettings.LatencySum += FirstValue; + } + + void OnLocalAvatarPacketRecorded(object sender, OvrAvatar.PacketEventArgs args) + { + using (MemoryStream outputStream = new MemoryStream()) + { + BinaryWriter writer = new BinaryWriter(outputStream); + + if (LocalAvatar.UseSDKPackets) + { + var size = CAPI.ovrAvatarPacket_GetSize(args.Packet.ovrNativePacket); + byte[] data = new byte[size]; + CAPI.ovrAvatarPacket_Write(args.Packet.ovrNativePacket, size, data); + + writer.Write(PacketSequence++); + writer.Write(size); + writer.Write(data); + } + else + { + writer.Write(PacketSequence++); + args.Packet.Write(outputStream); + } + + SendPacketData(outputStream.ToArray()); + } + } + + void Update() + { + if (packetQueue.Count > 0) + { + List deadList = new List(); + foreach (var packet in packetQueue) + { + packet.FakeLatency -= Time.deltaTime; + + if (packet.FakeLatency < 0f) + { + ReceivePacketData(packet.PacketData); + deadList.Add(packet); + } + } + + foreach (var packet in deadList) + { + packetQueue.Remove(packet); + } + } + } + + void SendPacketData(byte[] data) + { + PacketLatencyPair PacketPair = new PacketLatencyPair(); + PacketPair.PacketData = data; + PacketPair.FakeLatency = LatencySettings.NextValue(); + + packetQueue.AddLast(PacketPair); + } + + void ReceivePacketData(byte[] data) + { + using (MemoryStream inputStream = new MemoryStream(data)) + { + BinaryReader reader = new BinaryReader(inputStream); + int sequence = reader.ReadInt32(); + + OvrAvatarPacket avatarPacket; + if (LoopbackAvatar.UseSDKPackets) + { + int size = reader.ReadInt32(); + byte[] sdkData = reader.ReadBytes(size); + + IntPtr packet = CAPI.ovrAvatarPacket_Read((UInt32)data.Length, sdkData); + avatarPacket = new OvrAvatarPacket { ovrNativePacket = packet }; + } + else + { + avatarPacket = OvrAvatarPacket.Read(inputStream); + } + + LoopbackAvatar.GetComponent().QueuePacket(sequence, avatarPacket); + } + } +} diff --git a/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts/RemoteLoopbackManager.cs.meta b/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts/RemoteLoopbackManager.cs.meta new file mode 100644 index 0000000..d828c99 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/RemoteLoopback/Scripts/RemoteLoopbackManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1675d6690178fd0459887aed66409f70 +timeCreated: 1468000639 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter.meta b/Assets/Oculus/Avatar/Samples/SocialStarter.meta new file mode 100644 index 0000000..88a73e6 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 0a4d3ea1f23c09f4594a99508091bd1a +folderAsset: yes +timeCreated: 1520618017 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets.meta new file mode 100644 index 0000000..bc96f81 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 2946f922e51b0d347bf529b7a7e2667e +folderAsset: yes +timeCreated: 1520618026 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/MainScene.unity b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/MainScene.unity new file mode 100644 index 0000000..de06582 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/MainScene.unity @@ -0,0 +1,771 @@ +%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.44657898, g: 0.4964133, b: 0.5748178, a: 1} +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 11 + m_GIWorkflowMode: 0 + 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: 1 + m_BakeBackend: 0 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 500 + m_PVRBounces: 2 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVRFilteringMode: 0 + 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: 0 +--- !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 &8653650 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 8653655} + - component: {fileID: 8653654} + - component: {fileID: 8653653} + - component: {fileID: 8653652} + - component: {fileID: 8653651} + 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 &8653651 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 8653650} + m_Enabled: 0 +--- !u!124 &8653652 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 8653650} + m_Enabled: 1 +--- !u!92 &8653653 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 8653650} + m_Enabled: 1 +--- !u!20 &8653654 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 8653650} + m_Enabled: 1 + 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: -1 + 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!4 &8653655 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 8653650} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 1, z: -10} + 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!1 &206856059 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 206856064} + - component: {fileID: 206856063} + - component: {fileID: 206856062} + - component: {fileID: 206856061} + - component: {fileID: 206856060} + m_Layer: 0 + m_Name: RoomCamera + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!81 &206856060 +AudioListener: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 206856059} + m_Enabled: 1 +--- !u!92 &206856061 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 206856059} + m_Enabled: 1 +--- !u!124 &206856062 +Behaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 206856059} + m_Enabled: 1 +--- !u!20 &206856063 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 206856059} + m_Enabled: 1 + 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: 3 + m_HDR: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!4 &206856064 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 206856059} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 3, z: -9.5} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 5 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &780482174 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 780482176} + - component: {fileID: 780482175} + 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 &780482175 +Light: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 780482174} + 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 &780482176 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 780482174} + 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 &840719025 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 840719029} + - component: {fileID: 840719028} + - component: {fileID: 840719027} + - component: {fileID: 840719026} + m_Layer: 0 + m_Name: HelpPanel + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &840719026 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 840719025} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 4c18da23435024b43a2b78449cbb6ed0, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &840719027 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 840719025} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 14 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &840719028 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 840719025} + m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &840719029 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 840719025} + 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: 6 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1001 &1390249324 +Prefab: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 0} + m_Modifications: + - target: {fileID: 400006, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400006, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400006, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400006, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400006, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400006, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 400006, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 400006, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_RootOrder + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 100014, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_TagString + value: MainCamera + objectReference: {fileID: 0} + - target: {fileID: 100010, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: m_TagString + value: MainCamera + objectReference: {fileID: 0} + - target: {fileID: 11400002, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + propertyPath: _trackingOriginType + value: 1 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_ParentPrefab: {fileID: 100100000, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + m_IsPrefabParent: 0 +--- !u!1 &1390249325 stripped +GameObject: + m_PrefabParentObject: {fileID: 100014, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + m_PrefabInternal: {fileID: 1390249324} +--- !u!1 &1390249326 stripped +GameObject: + m_PrefabParentObject: {fileID: 100010, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + m_PrefabInternal: {fileID: 1390249324} +--- !u!20 &1390249327 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1390249325} + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!20 &1390249328 +Camera: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1390249326} + 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: 0 + m_AllowMSAA: 1 + m_AllowDynamicResolution: 0 + m_ForceIntoRT: 0 + m_OcclusionCulling: 1 + m_StereoConvergence: 10 + m_StereoSeparation: 0.022 +--- !u!1 &1390249329 stripped +GameObject: + m_PrefabParentObject: {fileID: 100008, guid: ce816f2e6abb0504092c23ed9b970dfd, type: 2} + m_PrefabInternal: {fileID: 1390249324} +--- !u!114 &1390249330 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1390249329} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 043fbfd0ae7027742bace7a3691feb13, type: 3} + m_Name: + m_EditorClassIdentifier: + localAvatarPrefab: {fileID: 11437430, guid: 84c8b8609f9bb434eaf5248f17ff1293, type: 2} + remoteAvatarPrefab: {fileID: 11464902, guid: 90bf33f968e6bb44ea0208fc82c90a44, type: 2} + helpPanel: {fileID: 840719025} + riftMaterial: {fileID: 2100000, guid: 3480b18dc3be4c2498fb60a71184a4d1, type: 2} + gearMaterial: {fileID: 2100000, guid: ce189bc65dde82740a5f34ef75bf87aa, type: 2} + roomSphere: {fileID: 1902705651} + roomFloor: {fileID: 2115777246} + spyCamera: {fileID: 206856063} +--- !u!1 &1902705651 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 1902705655} + - component: {fileID: 1902705654} + - component: {fileID: 1902705653} + - component: {fileID: 1902705652} + m_Layer: 0 + m_Name: Sphere + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &1902705652 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902705651} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: 296de5be1228bf34380061dd6e6b0f49, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!135 &1902705653 +SphereCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902705651} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 2 + m_Radius: 0.5 + m_Center: {x: 0, y: 0, z: 0} +--- !u!33 &1902705654 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902705651} + m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &1902705655 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 1902705651} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 3, y: 6, z: 3} + m_LocalScale: {x: 2, y: 2, z: 2} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 4 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!1 &2115777246 +GameObject: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + serializedVersion: 5 + m_Component: + - component: {fileID: 2115777250} + - component: {fileID: 2115777249} + - component: {fileID: 2115777248} + - component: {fileID: 2115777247} + m_Layer: 0 + m_Name: Plane + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!23 &2115777247 +MeshRenderer: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2115777246} + m_Enabled: 1 + m_CastShadows: 1 + m_ReceiveShadows: 1 + m_DynamicOccludee: 1 + m_MotionVectors: 1 + m_LightProbeUsage: 1 + m_ReflectionProbeUsage: 1 + m_Materials: + - {fileID: 2100000, guid: c466b89bb972b8a42bd266c102f8f2cb, type: 2} + m_StaticBatchInfo: + firstSubMesh: 0 + subMeshCount: 0 + m_StaticBatchRoot: {fileID: 0} + m_ProbeAnchor: {fileID: 0} + m_LightProbeVolumeOverride: {fileID: 0} + m_ScaleInLightmap: 1 + m_PreserveUVs: 1 + m_IgnoreNormalsForChartDetection: 0 + m_ImportantGI: 0 + m_StitchLightmapSeams: 0 + m_SelectedEditorRenderState: 3 + m_MinimumChartSize: 4 + m_AutoUVMaxDistance: 0.5 + m_AutoUVMaxAngle: 89 + m_LightmapParameters: {fileID: 0} + m_SortingLayerID: 0 + m_SortingLayer: 0 + m_SortingOrder: 0 +--- !u!64 &2115777248 +MeshCollider: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2115777246} + m_Material: {fileID: 0} + m_IsTrigger: 0 + m_Enabled: 1 + serializedVersion: 3 + m_Convex: 0 + m_CookingOptions: 14 + m_SkinWidth: 0.01 + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!33 &2115777249 +MeshFilter: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2115777246} + m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0} +--- !u!4 &2115777250 +Transform: + m_ObjectHideFlags: 0 + m_PrefabParentObject: {fileID: 0} + m_PrefabInternal: {fileID: 0} + m_GameObject: {fileID: 2115777246} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 7, y: 1, z: 7} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 3 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/MainScene.unity.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/MainScene.unity.meta new file mode 100644 index 0000000..bd5cdd7 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/MainScene.unity.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 236a5f96528802e47a70d6e47ebd3c16 +timeCreated: 1496779803 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials.meta new file mode 100644 index 0000000..aa29445 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 777b874d432a52044991fe1a0210200c +folderAsset: yes +timeCreated: 1496779985 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/GearHelp.mat b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/GearHelp.mat new file mode 100644 index 0000000..85aa24d --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/GearHelp.mat @@ -0,0 +1,127 @@ +%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: GearHelp + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + - first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: 0453138effcc80349b11371805f72f5b, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - first: + name: _BumpScale + second: 1 + - first: + name: _Cutoff + second: 0.5 + - first: + name: _DetailNormalMapScale + second: 1 + - first: + name: _DstBlend + second: 0 + - first: + name: _GlossMapScale + second: 1 + - first: + name: _Glossiness + second: 0.5 + - first: + name: _GlossyReflections + second: 1 + - first: + name: _Metallic + second: 0 + - first: + name: _Mode + second: 0 + - first: + name: _OcclusionStrength + second: 1 + - first: + name: _Parallax + second: 0.02 + - first: + name: _SmoothnessTextureChannel + second: 0 + - first: + name: _SpecularHighlights + second: 1 + - first: + name: _SrcBlend + second: 1 + - first: + name: _UVSec + second: 0 + - first: + name: _ZWrite + second: 1 + m_Colors: + - first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} + - first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/GearHelp.mat.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/GearHelp.mat.meta new file mode 100644 index 0000000..fb52e95 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/GearHelp.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 09c03a3c5049d234590b91bbc6e84462 +timeCreated: 1497549036 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Help.mat b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Help.mat new file mode 100644 index 0000000..3567c11 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Help.mat @@ -0,0 +1,127 @@ +%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: Help + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: + m_LightmapFlags: 5 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + - first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _MainTex + second: + m_Texture: {fileID: 2800000, guid: c8f5462cc092d0c40ad71773132863e0, type: 3} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - first: + name: _BumpScale + second: 1 + - first: + name: _Cutoff + second: 0.5 + - first: + name: _DetailNormalMapScale + second: 1 + - first: + name: _DstBlend + second: 0 + - first: + name: _GlossMapScale + second: 1 + - first: + name: _Glossiness + second: 0.5 + - first: + name: _GlossyReflections + second: 1 + - first: + name: _Metallic + second: 0 + - first: + name: _Mode + second: 0 + - first: + name: _OcclusionStrength + second: 1 + - first: + name: _Parallax + second: 0.02 + - first: + name: _SmoothnessTextureChannel + second: 0 + - first: + name: _SpecularHighlights + second: 1 + - first: + name: _SrcBlend + second: 1 + - first: + name: _UVSec + second: 0 + - first: + name: _ZWrite + second: 1 + m_Colors: + - first: + name: _Color + second: {r: 1, g: 1, b: 1, a: 1} + - first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Help.mat.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Help.mat.meta new file mode 100644 index 0000000..ca7a270 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Help.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4c18da23435024b43a2b78449cbb6ed0 +timeCreated: 1496780065 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Offline_Mat.mat b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Offline_Mat.mat new file mode 100644 index 0000000..024cfe0 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Offline_Mat.mat @@ -0,0 +1,127 @@ +%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: Offline_Mat + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 1 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + - first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - first: + name: _BumpScale + second: 1 + - first: + name: _Cutoff + second: 0.5 + - first: + name: _DetailNormalMapScale + second: 1 + - first: + name: _DstBlend + second: 0 + - first: + name: _GlossMapScale + second: 1 + - first: + name: _Glossiness + second: 0.5 + - first: + name: _GlossyReflections + second: 1 + - first: + name: _Metallic + second: 0 + - first: + name: _Mode + second: 0 + - first: + name: _OcclusionStrength + second: 1 + - first: + name: _Parallax + second: 0.02 + - first: + name: _SmoothnessTextureChannel + second: 0 + - first: + name: _SpecularHighlights + second: 1 + - first: + name: _SrcBlend + second: 1 + - first: + name: _UVSec + second: 0 + - first: + name: _ZWrite + second: 1 + m_Colors: + - first: + name: _Color + second: {r: 0, g: 0, b: 0, a: 1} + - first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Offline_Mat.mat.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Offline_Mat.mat.meta new file mode 100644 index 0000000..6c35a95 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Offline_Mat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 296de5be1228bf34380061dd6e6b0f49 +timeCreated: 1496780100 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Plane_Mat.mat b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Plane_Mat.mat new file mode 100644 index 0000000..5273be2 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Plane_Mat.mat @@ -0,0 +1,127 @@ +%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: Plane_Mat + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ShaderKeywords: _EMISSION + m_LightmapFlags: 1 + m_CustomRenderQueue: -1 + stringTagMap: {} + m_SavedProperties: + serializedVersion: 2 + m_TexEnvs: + - first: + name: _BumpMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailAlbedoMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailMask + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _DetailNormalMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _EmissionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _MainTex + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _MetallicGlossMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _OcclusionMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - first: + name: _ParallaxMap + second: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Floats: + - first: + name: _BumpScale + second: 1 + - first: + name: _Cutoff + second: 0.5 + - first: + name: _DetailNormalMapScale + second: 1 + - first: + name: _DstBlend + second: 0 + - first: + name: _GlossMapScale + second: 1 + - first: + name: _Glossiness + second: 0.5 + - first: + name: _GlossyReflections + second: 1 + - first: + name: _Metallic + second: 0 + - first: + name: _Mode + second: 0 + - first: + name: _OcclusionStrength + second: 1 + - first: + name: _Parallax + second: 0.02 + - first: + name: _SmoothnessTextureChannel + second: 0 + - first: + name: _SpecularHighlights + second: 1 + - first: + name: _SrcBlend + second: 1 + - first: + name: _UVSec + second: 0 + - first: + name: _ZWrite + second: 1 + m_Colors: + - first: + name: _Color + second: {r: 0, g: 0.25517225, b: 1, a: 1} + - first: + name: _EmissionColor + second: {r: 0, g: 0, b: 0, a: 1} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Plane_Mat.mat.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Plane_Mat.mat.meta new file mode 100644 index 0000000..dbefb45 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Materials/Plane_Mat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c466b89bb972b8a42bd266c102f8f2cb +timeCreated: 1496780131 +licenseType: Store +NativeFormatImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts.meta new file mode 100644 index 0000000..84dee1a --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: f05e47c366870a44ab2b3b5a8a64e107 +folderAsset: yes +timeCreated: 1496780004 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/P2PManager.cs b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/P2PManager.cs new file mode 100644 index 0000000..db28da2 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/P2PManager.cs @@ -0,0 +1,231 @@ +using UnityEngine; +using System; +using Oculus.Platform; +using Oculus.Platform.Models; + +// Helper class to manage a Peer-to-Peer connection to the other user. +// The connection is used to send and received the Transforms for the +// Avatars. The Transforms are sent via unreliable UDP at a fixed +// frequency. +public class P2PManager +{ + // packet header is a message type byte + private enum MessageType : byte + { + Update = 1, + }; + + public P2PManager() + { + Net.SetPeerConnectRequestCallback(PeerConnectRequestCallback); + Net.SetConnectionStateChangedCallback(ConnectionStateChangedCallback); + } + + #region Connection Management + + public void ConnectTo(ulong userID) + { + // ID comparison is used to decide who calls Connect and who calls Accept + if (SocialPlatformManager.MyID < userID) + { + Net.Connect(userID); + SocialPlatformManager.LogOutput("P2P connect to " + userID); + } + } + + public void Disconnect(ulong userID) + { + if (userID != 0) + { + Net.Close(userID); + + RemotePlayer remote = SocialPlatformManager.GetRemoteUser(userID); + if (remote != null) + { + remote.p2pConnectionState = PeerConnectionState.Unknown; + } + } + } + + void PeerConnectRequestCallback(Message msg) + { + SocialPlatformManager.LogOutput("P2P request from " + msg.Data.ID); + + RemotePlayer remote = SocialPlatformManager.GetRemoteUser(msg.Data.ID); + if (remote != null) + { + SocialPlatformManager.LogOutput("P2P request accepted from " + msg.Data.ID); + Net.Accept(msg.Data.ID); + } + } + + void ConnectionStateChangedCallback(Message msg) + { + SocialPlatformManager.LogOutput("P2P state to " + msg.Data.ID + " changed to " + msg.Data.State); + + RemotePlayer remote = SocialPlatformManager.GetRemoteUser(msg.Data.ID); + if (remote != null) + { + remote.p2pConnectionState = msg.Data.State; + + if (msg.Data.State == PeerConnectionState.Timeout && + // ID comparison is used to decide who calls Connect and who calls Accept + SocialPlatformManager.MyID < msg.Data.ID) + { + // keep trying until hangup! + Net.Connect(msg.Data.ID); + SocialPlatformManager.LogOutput("P2P re-connect to " + msg.Data.ID); + } + } + } + + #endregion + + #region Message Sending + + public void SendAvatarUpdate(ulong userID, Transform bodyTransform, UInt32 sequence, byte[] avatarPacket) + { + const int UPDATE_DATA_LENGTH = 41; + byte[] sendBuffer = new byte[avatarPacket.Length + UPDATE_DATA_LENGTH]; + + int offset = 0; + PackByte((byte)MessageType.Update, sendBuffer, ref offset); + + PackULong(SocialPlatformManager.MyID, sendBuffer, ref offset); + + PackFloat(bodyTransform.localPosition.x, sendBuffer, ref offset); + PackFloat(bodyTransform.localPosition.y, sendBuffer, ref offset); + PackFloat(bodyTransform.localPosition.z, sendBuffer, ref offset); + PackFloat(bodyTransform.localRotation.x, sendBuffer, ref offset); + PackFloat(bodyTransform.localRotation.y, sendBuffer, ref offset); + PackFloat(bodyTransform.localRotation.z, sendBuffer, ref offset); + PackFloat(bodyTransform.localRotation.w, sendBuffer, ref offset); + + PackUInt32(sequence, sendBuffer, ref offset); + + Debug.Assert(offset == UPDATE_DATA_LENGTH); + + Buffer.BlockCopy(avatarPacket, 0, sendBuffer, offset, avatarPacket.Length); + Net.SendPacket(userID, sendBuffer, SendPolicy.Unreliable); + } + #endregion + + #region Message Receiving + + public void GetRemotePackets() + { + Packet packet; + + while ((packet = Net.ReadPacket()) != null) + { + byte[] receiveBuffer = new byte[packet.Size]; + packet.ReadBytes(receiveBuffer); + + int offset = 0; + MessageType messageType = (MessageType)ReadByte(receiveBuffer, ref offset); + + ulong remoteUserID = ReadULong(receiveBuffer, ref offset); + RemotePlayer remote = SocialPlatformManager.GetRemoteUser(remoteUserID); + if (remote == null) + { + SocialPlatformManager.LogOutput("Unknown remote player: " + remoteUserID); + continue; + } + + if (messageType == MessageType.Update) + { + processAvatarPacket(remote, ref receiveBuffer, ref offset); + } + else + { + SocialPlatformManager.LogOutput("Invalid packet type: " + packet.Size); + continue; + } + + } + } + + public void processAvatarPacket(RemotePlayer remote, ref byte[] packet, ref int offset) + { + if (remote == null) + return; + + remote.receivedBodyPositionPrior = remote.receivedBodyPosition; + remote.receivedBodyPosition.x = ReadFloat(packet, ref offset); + remote.receivedBodyPosition.y = ReadFloat(packet, ref offset); + remote.receivedBodyPosition.z = ReadFloat(packet, ref offset); + + remote.receivedBodyRotationPrior = remote.receivedBodyRotation; + remote.receivedBodyRotation.x = ReadFloat(packet, ref offset); + remote.receivedBodyRotation.y = ReadFloat(packet, ref offset); + remote.receivedBodyRotation.z = ReadFloat(packet, ref offset); + remote.receivedBodyRotation.w = ReadFloat(packet, ref offset); + + remote.RemoteAvatar.transform.localPosition = remote.receivedBodyPosition; + remote.RemoteAvatar.transform.localRotation = remote.receivedBodyRotation; + + // forward the remaining data to the avatar system + int sequence = (int)ReadUInt32(packet, ref offset); + + byte[] remainingAvatarBuffer = new byte[packet.Length - offset]; + Buffer.BlockCopy(packet, offset, remainingAvatarBuffer, 0, remainingAvatarBuffer.Length); + + IntPtr avatarPacket = Oculus.Avatar.CAPI.ovrAvatarPacket_Read((UInt32)remainingAvatarBuffer.Length, remainingAvatarBuffer); + + var ovravatarPacket = new OvrAvatarPacket { ovrNativePacket = avatarPacket }; + remote.RemoteAvatar.GetComponent().QueuePacket(sequence, ovravatarPacket); + } + #endregion + + #region Serialization + + void PackByte(byte b, byte[] buf, ref int offset) + { + buf[offset] = b; + offset += sizeof(byte); + } + byte ReadByte(byte[] buf, ref int offset) + { + byte val = buf[offset]; + offset += sizeof(byte); + return val; + } + + void PackFloat(float f, byte[] buf, ref int offset) + { + Buffer.BlockCopy(BitConverter.GetBytes(f), 0, buf, offset, sizeof(float)); + offset += sizeof(float); + } + float ReadFloat(byte[] buf, ref int offset) + { + float val = BitConverter.ToSingle(buf, offset); + offset += sizeof(float); + return val; + } + + void PackULong(ulong u, byte[] buf, ref int offset) + { + Buffer.BlockCopy(BitConverter.GetBytes(u), 0, buf, offset, sizeof(ulong)); + offset += sizeof(ulong); + } + ulong ReadULong(byte[] buf, ref int offset) + { + ulong val = BitConverter.ToUInt64(buf, offset); + offset += sizeof(ulong); + return val; + } + + void PackUInt32(UInt32 u, byte[] buf, ref int offset) + { + Buffer.BlockCopy(BitConverter.GetBytes(u), 0, buf, offset, sizeof(UInt32)); + offset += sizeof(UInt32); + } + UInt32 ReadUInt32(byte[] buf, ref int offset) + { + UInt32 val = BitConverter.ToUInt32(buf, offset); + offset += sizeof(UInt32); + return val; + } + + #endregion +} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/P2PManager.cs.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/P2PManager.cs.meta new file mode 100644 index 0000000..250606c --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/P2PManager.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: e5d77a60e86b5bd4a999ef6c83f9e651 +timeCreated: 1521151723 +licenseType: Store +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/PlayerController.cs b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/PlayerController.cs new file mode 100644 index 0000000..991b7ee --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/PlayerController.cs @@ -0,0 +1,101 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +using Oculus.Platform; +using Oculus.Platform.Models; + +public class PlayerController : SocialPlatformManager +{ + + // Secondary camera to debug and view the whole scene from above + public Camera spyCamera; + + // The OVRCameraRig for the main player so we can disable it + private GameObject cameraRig; + + private bool showUI = true; + + public override void Awake() + { + base.Awake(); + cameraRig = localPlayerHead.gameObject; + } + + // Use this for initialization + public override void Start() + { + base.Start(); + spyCamera.enabled = false; + } + + // Update is called once per frame + public override void Update() + { + base.Update(); + checkInput(); + } + + // Check for input from the touch controllers + void checkInput() + { + if (UnityEngine.Application.platform == RuntimePlatform.Android) + { + // GearVR Controller + + // Bring up friend invite list + if (OVRInput.GetDown(OVRInput.Button.Back)) + { + Rooms.LaunchInvitableUserFlow(roomManager.roomID); + } + + // Toggle Camera + if (OVRInput.GetDown(OVRInput.Button.PrimaryTouchpad)) + { + ToggleCamera(); + } + + // Toggle Help UI + if (OVRInput.GetDown(OVRInput.Button.PrimaryIndexTrigger)) + { + ToggleUI(); + } + } + else + { + // PC Touch + + // Bring up friend invite list + if (OVRInput.GetDown(OVRInput.Button.Three)) + { + Rooms.LaunchInvitableUserFlow (roomManager.roomID); + } + + // Toggle Camera + if (OVRInput.GetDown(OVRInput.Button.Four)) + { + ToggleCamera(); + } + + // Toggle Help UI + if (OVRInput.GetDown(OVRInput.Button.PrimaryThumbstick)) + { + ToggleUI(); + } + } + } + + void ToggleCamera() + { + spyCamera.enabled = !spyCamera.enabled; + localAvatar.ShowThirdPerson = !localAvatar.ShowThirdPerson; + cameraRig.SetActive(!cameraRig.activeSelf); + } + + void ToggleUI() + { + showUI = !showUI; + helpPanel.SetActive(showUI); + localAvatar.ShowLeftController(showUI); + } +} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/PlayerController.cs.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/PlayerController.cs.meta new file mode 100644 index 0000000..51298cd --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/PlayerController.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 043fbfd0ae7027742bace7a3691feb13 +timeCreated: 1521151723 +licenseType: Store +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RemotePlayer.cs b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RemotePlayer.cs new file mode 100644 index 0000000..a523b16 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RemotePlayer.cs @@ -0,0 +1,32 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using Oculus.Platform; + +public class RemotePlayer +{ + public ulong remoteUserID; + public bool stillInRoom; + + // the result of the last connection state update message + public PeerConnectionState p2pConnectionState; + // the last reported state of the VOIP connection + public PeerConnectionState voipConnectionState; + + public OvrAvatar RemoteAvatar; + + // the last received position updates + public Vector3 receivedBodyPosition; + + // the previous received positions to interpolate from + public Vector3 receivedBodyPositionPrior; + + // the last received rotation updates + public Quaternion receivedBodyRotation; + + // the previous received rotations to interpolate from + public Quaternion receivedBodyRotationPrior; + + // the voip tracker for the player + public VoipAudioSourceHiLevel voipSource; +} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RemotePlayer.cs.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RemotePlayer.cs.meta new file mode 100644 index 0000000..f4fc8da --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RemotePlayer.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: e5bc955e8176ef1478360f25ef5ccc8a +timeCreated: 1521151723 +licenseType: Store +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RoomManager.cs b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RoomManager.cs new file mode 100644 index 0000000..fb8f143 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RoomManager.cs @@ -0,0 +1,225 @@ +using UnityEngine; +using System; +using System.Collections.Generic; +using Oculus.Platform; +using Oculus.Platform.Models; + +// Helper class to manage Room creation, membership and invites. +// Rooms are a mechanism to help Oculus users create a shared experience. +// Users can only be in one Room at a time. If the Owner of a room +// leaves, then ownership is transferred to some other member. +// Here we use rooms to create the notion of a 'call' to help us +// invite a Friend and establish a VOIP and P2P connection. +public class RoomManager +{ + // the ID of the Room that I'm in + public ulong roomID; + + // the ID of the Room that I'm invited to + private ulong invitedRoomID; + + // Am I the server? + private bool amIServer; + + // Have we already gone through the startup? + private bool startupDone; + + public RoomManager() + { + amIServer = false; + startupDone = false; + Rooms.SetRoomInviteAcceptedNotificationCallback(AcceptingInviteCallback); + Rooms.SetUpdateNotificationCallback(RoomUpdateCallback); + } + + #region Launched Application from Accepting Invite + + // Callback to check whether the User accepted an invite + void AcceptingInviteCallback(Message msg) + { + if (msg.IsError) + { + SocialPlatformManager.TerminateWithError(msg); + return; + } + + SocialPlatformManager.LogOutput("Launched Invite to join Room: " + msg.Data); + + invitedRoomID = Convert.ToUInt64(msg.GetString()); + + if (startupDone) + { + CheckForInvite(); + } + } + + // Check to see if the App was launched by accepting the Notication from the main Oculus app. + // If so, we can directly join that room. (If it's still available.) + public bool CheckForInvite() + { + startupDone = true; + + if (invitedRoomID != 0) + { + JoinExistingRoom(invitedRoomID); + return true; + } + else + { + return false; + } + } + + #endregion + + #region Create a Room and Invite Friend(s) from the Oculus Universal Menu + + public void CreateRoom() + { + Rooms.CreateAndJoinPrivate(RoomJoinPolicy.FriendsOfOwner, 4, true) + .OnComplete(CreateAndJoinPrivateRoomCallback); + } + + void CreateAndJoinPrivateRoomCallback(Message msg) + { + if (msg.IsError) + { + SocialPlatformManager.TerminateWithError(msg); + return; + } + + roomID = msg.Data.ID; + + if (msg.Data.OwnerOptional != null && msg.Data.OwnerOptional.ID == SocialPlatformManager.MyID) + { + amIServer = true; + } + else + { + amIServer = false; + } + + SocialPlatformManager.TransitionToState(SocialPlatformManager.State.WAITING_IN_A_ROOM); + SocialPlatformManager.SetFloorColorForState(amIServer); + } + + void OnLaunchInviteWorkflowComplete(Message msg) + { + if (msg.IsError) + { + SocialPlatformManager.TerminateWithError(msg); + return; + } + } + + #endregion + + #region Accept Invite + + public void JoinExistingRoom(ulong roomID) + { + SocialPlatformManager.TransitionToState(SocialPlatformManager.State.JOINING_A_ROOM); + Rooms.Join(roomID, true).OnComplete(JoinRoomCallback); + } + + void JoinRoomCallback(Message msg) + { + if (msg.IsError) + { + // is reasonable if caller called more than 1 person, and I didn't answer first + return; + } + + var ownerOculusId = msg.Data.OwnerOptional != null ? msg.Data.OwnerOptional.OculusID : "null"; + var userCount = msg.Data.UsersOptional != null ? msg.Data.UsersOptional.Count : 0; + + SocialPlatformManager.LogOutput("Joined Room " + msg.Data.ID + " owner: " + ownerOculusId + " count: " + userCount); + roomID = msg.Data.ID; + ProcessRoomData(msg); + } + + #endregion + + #region Room Updates + + void RoomUpdateCallback(Message msg) + { + if (msg.IsError) + { + SocialPlatformManager.TerminateWithError(msg); + return; + } + + var ownerOculusId = msg.Data.OwnerOptional != null ? msg.Data.OwnerOptional.OculusID : "null"; + var userCount = msg.Data.UsersOptional != null ? msg.Data.UsersOptional.Count : 0; + + SocialPlatformManager.LogOutput("Room Update " + msg.Data.ID + " owner: " + ownerOculusId + " count: " + userCount); + ProcessRoomData(msg); + } + + #endregion + + #region Room Exit + + public void LeaveCurrentRoom() + { + if (roomID != 0) + { + Rooms.Leave(roomID); + roomID = 0; + } + SocialPlatformManager.TransitionToState(SocialPlatformManager.State.LEAVING_A_ROOM); + } + + #endregion + + #region Process Room Data + + void ProcessRoomData(Message msg) + { + if (msg.Data.OwnerOptional != null && msg.Data.OwnerOptional.ID == SocialPlatformManager.MyID) + { + amIServer = true; + } + else + { + amIServer = false; + } + + // if the caller left while I was in the process of joining, just use that as our new room + if (msg.Data.UsersOptional != null && msg.Data.UsersOptional.Count == 1) + { + SocialPlatformManager.TransitionToState(SocialPlatformManager.State.WAITING_IN_A_ROOM); + } + else + { + SocialPlatformManager.TransitionToState(SocialPlatformManager.State.CONNECTED_IN_A_ROOM); + } + + // Look for users that left + SocialPlatformManager.MarkAllRemoteUsersAsNotInRoom(); + + if (msg.Data.UsersOptional != null) + { + foreach (User user in msg.Data.UsersOptional) + { + if (user.ID != SocialPlatformManager.MyID) + { + if (!SocialPlatformManager.IsUserInRoom(user.ID)) + { + SocialPlatformManager.AddRemoteUser(user.ID); + } + else + { + SocialPlatformManager.MarkRemoteUserInRoom(user.ID); + } + } + } + } + + SocialPlatformManager.ForgetRemoteUsersNotInRoom(); + SocialPlatformManager.SetFloorColorForState(amIServer); + } + + #endregion +} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RoomManager.cs.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RoomManager.cs.meta new file mode 100644 index 0000000..a2aa926 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/RoomManager.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: 923f57b3cf1990047b2e448680c8d5b8 +timeCreated: 1521151723 +licenseType: Store +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/SocialPlatformManager.cs b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/SocialPlatformManager.cs new file mode 100644 index 0000000..a5b5a9d --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/SocialPlatformManager.cs @@ -0,0 +1,556 @@ +using UnityEngine; +using System; +using System.IO; +using System.Collections.Generic; +using Oculus.Avatar; +using Oculus.Platform; +using Oculus.Platform.Models; + + +// This class coordinates communication with the Oculus Platform +// Service running in your device. +public class SocialPlatformManager : MonoBehaviour +{ + private static readonly Vector3 START_ROTATION_ONE = new Vector3(0, 180, 0); + private static readonly Vector3 START_POSITION_ONE = new Vector3(0, 4, 5); + + private static readonly Vector3 START_ROTATION_TWO = new Vector3(0, 0, 0); + private static readonly Vector3 START_POSITION_TWO = new Vector3(0, 4, -5); + + private static readonly Vector3 START_ROTATION_THREE = new Vector3(0, 270, 0); + private static readonly Vector3 START_POSITION_THREE = new Vector3(5, 4, 0); + + private static readonly Vector3 START_ROTATION_FOUR = new Vector3(0, 90, 0); + private static readonly Vector3 START_POSITION_FOUR = new Vector3(-5, 4, 0); + + private static readonly Color BLACK = new Color(0.0f, 0.0f, 0.0f); + private static readonly Color WHITE = new Color(1.0f, 1.0f, 1.0f); + private static readonly Color CYAN = new Color(0.0f, 1.0f, 1.0f); + private static readonly Color BLUE = new Color(0.0f, 0.0f, 1.0f); + private static readonly Color GREEN = new Color(0.0f, 1.0f, 0.0f); + + public Oculus.Platform.CAPI.FilterCallback micFilterDelegate = new Oculus.Platform.CAPI.FilterCallback(SocialPlatformManager.MicFilter); + private float voiceCurrent = 0.0f; + + // Local player + private UInt32 packetSequence = 0; + + public OvrAvatar localAvatarPrefab; + public OvrAvatar remoteAvatarPrefab; + + public GameObject helpPanel; + protected MeshRenderer helpMesh; + public Material riftMaterial; + public Material gearMaterial; + + protected OvrAvatar localAvatar; + protected GameObject localTrackingSpace; + protected GameObject localPlayerHead; + + // Remote players + protected Dictionary remoteUsers = new Dictionary(); + + // GameObject that represents the center sphere as a visual status indicator of the room + public GameObject roomSphere; + protected MeshRenderer sphereMesh; + public GameObject roomFloor; + protected MeshRenderer floorMesh; + + protected State currentState; + + protected static SocialPlatformManager s_instance = null; + protected RoomManager roomManager; + protected P2PManager p2pManager; + protected VoipManager voipManager; + + // my Application-scoped Oculus ID + protected ulong myID; + + // my Oculus user name + protected string myOculusID; + + + // animating the mouth for voip + public static readonly float VOIP_SCALE = 2f; + + public virtual void Update() + { + // Look for updates from remote users + p2pManager.GetRemotePackets(); + + // update avatar mouths to match voip volume + foreach (KeyValuePair kvp in remoteUsers) + { + float remoteVoiceCurrent = Mathf.Clamp(kvp.Value.voipSource.peakAmplitude * VOIP_SCALE, 0f, 1f); + kvp.Value.RemoteAvatar.VoiceAmplitude = remoteVoiceCurrent; + } + + if (localAvatar != null) + { + localAvatar.VoiceAmplitude = Mathf.Clamp(voiceCurrent * VOIP_SCALE, 0f, 1f); + } + } + + #region Initialization and Shutdown + + public virtual void Awake() + { + LogOutputLine("Start Log."); + + // Grab the MeshRenderers. We'll be using the material colour to visually show status + helpMesh = helpPanel.GetComponent(); + sphereMesh = roomSphere.GetComponent(); + floorMesh = roomFloor.GetComponent(); + + // Set up the local player + localTrackingSpace = this.transform.Find("OVRCameraRig/TrackingSpace").gameObject; + localPlayerHead = this.transform.Find("OVRCameraRig/TrackingSpace/CenterEyeAnchor").gameObject; + + // make sure only one instance of this manager ever exists + if (s_instance != null) + { + Destroy(gameObject); + return; + } + + s_instance = this; + DontDestroyOnLoad(gameObject); + + TransitionToState(State.INITIALIZING); + + Core.Initialize(); + + roomManager = new RoomManager(); + p2pManager = new P2PManager(); + voipManager = new VoipManager(); + } + + public virtual void Start() + { + // First thing we should do is perform an entitlement check to make sure + // we successfully connected to the Oculus Platform Service. + Entitlements.IsUserEntitledToApplication().OnComplete(IsEntitledCallback); + Oculus.Platform.Request.RunCallbacks(); + } + + void IsEntitledCallback(Message msg) + { + if (msg.IsError) + { + TerminateWithError(msg); + return; + } + + // Next get the identity of the user that launched the Application. + Users.GetLoggedInUser().OnComplete(GetLoggedInUserCallback); + Oculus.Platform.Request.RunCallbacks(); + } + + void GetLoggedInUserCallback(Message msg) + { + if (msg.IsError) + { + TerminateWithError(msg); + return; + } + + myID = msg.Data.ID; + myOculusID = msg.Data.OculusID; + + localAvatar = Instantiate(localAvatarPrefab); + localTrackingSpace = this.transform.Find("OVRCameraRig/TrackingSpace").gameObject; + + localAvatar.transform.SetParent(localTrackingSpace.transform, false); + localAvatar.transform.localPosition = new Vector3(0, 0, 0); + localAvatar.transform.localRotation = Quaternion.identity; + + if (UnityEngine.Application.platform == RuntimePlatform.Android) + { + helpPanel.transform.SetParent(localAvatar.transform.Find("body"), false); + helpPanel.transform.localPosition = new Vector3(0, 1.0f, 1.0f); + helpMesh.material = gearMaterial; + } + else + { + helpPanel.transform.SetParent(localAvatar.transform.Find("hand_left"), false); + helpPanel.transform.localPosition = new Vector3(0, 0.2f, 0.2f); + helpMesh.material = riftMaterial; + } + + localAvatar.oculusUserID = myID.ToString(); + localAvatar.RecordPackets = true; + localAvatar.PacketRecorded += OnLocalAvatarPacketRecorded; + localAvatar.EnableMouthVertexAnimation = true; + + Quaternion rotation = Quaternion.identity; + + switch (UnityEngine.Random.Range(0, 4)) + { + case 0: + rotation.eulerAngles = START_ROTATION_ONE; + this.transform.localPosition = START_POSITION_ONE; + this.transform.localRotation = rotation; + break; + + case 1: + rotation.eulerAngles = START_ROTATION_TWO; + this.transform.localPosition = START_POSITION_TWO; + this.transform.localRotation = rotation; + break; + + case 2: + rotation.eulerAngles = START_ROTATION_THREE; + this.transform.localPosition = START_POSITION_THREE; + this.transform.localRotation = rotation; + break; + + case 3: + default: + rotation.eulerAngles = START_ROTATION_FOUR; + this.transform.localPosition = START_POSITION_FOUR; + this.transform.localRotation = rotation; + break; + } + + TransitionToState(State.CHECKING_LAUNCH_STATE); + + // If the user launched the app by accepting the notification, then we want to + // join that room. If not, try to find a friend's room to join + if (!roomManager.CheckForInvite()) + { + SocialPlatformManager.LogOutput("No invite on launch, looking for a friend to join."); + Users.GetLoggedInUserFriendsAndRooms() + .OnComplete(GetLoggedInUserFriendsAndRoomsCallback); + } + Voip.SetMicrophoneFilterCallback(micFilterDelegate); + } + + void GetLoggedInUserFriendsAndRoomsCallback(Message msg) + { + if (msg.IsError) + { + return; + } + + foreach (UserAndRoom el in msg.Data) + { + // see if any friends are in a joinable room + if (el.User == null) continue; + if (el.RoomOptional == null) continue; + if (el.RoomOptional.IsMembershipLocked == true) continue; + if (el.RoomOptional.Joinability != RoomJoinability.CanJoin) continue; + if (el.RoomOptional.JoinPolicy == RoomJoinPolicy.None) continue; + + SocialPlatformManager.LogOutput("Trying to join room " + el.RoomOptional.ID + ", friend " + el.User.OculusID); + roomManager.JoinExistingRoom(el.RoomOptional.ID); + return; + } + + SocialPlatformManager.LogOutput("No friend to join. Creating my own room."); + // didn't find any open rooms, start a new room + roomManager.CreateRoom(); + TransitionToState(State.CREATING_A_ROOM); + } + + public void OnLocalAvatarPacketRecorded(object sender, OvrAvatar.PacketEventArgs args) + { + var size = Oculus.Avatar.CAPI.ovrAvatarPacket_GetSize(args.Packet.ovrNativePacket); + byte[] toSend = new byte[size]; + + Oculus.Avatar.CAPI.ovrAvatarPacket_Write(args.Packet.ovrNativePacket, size, toSend); + + foreach (KeyValuePair kvp in remoteUsers) + { + //LogOutputLine("Sending avatar Packet to " + kvp.Key); + p2pManager.SendAvatarUpdate(kvp.Key, this.localAvatar.transform, packetSequence, toSend); + } + + packetSequence++; + } + + public void OnApplicationQuit() + { + roomManager.LeaveCurrentRoom(); + + foreach (KeyValuePair kvp in remoteUsers) + { + p2pManager.Disconnect(kvp.Key); + voipManager.Disconnect(kvp.Key); + } + LogOutputLine("End Log."); + } + + public void AddUser(ulong userID, ref RemotePlayer remoteUser) + { + remoteUsers.Add(userID, remoteUser); + } + + public void LogOutputLine(string line) + { + Debug.Log(Time.time + ": " + line); + } + + // For most errors we terminate the Application since this example doesn't make + // sense if the user is disconnected. + public static void TerminateWithError(Message msg) + { + s_instance.LogOutputLine("Error: " + msg.GetError().Message); + UnityEngine.Application.Quit(); + } + + #endregion + + #region Properties + + public static State CurrentState + { + get + { + return s_instance.currentState; + } + } + + public static ulong MyID + { + get + { + if (s_instance != null) + { + return s_instance.myID; + } + else + { + return 0; + } + } + } + + public static string MyOculusID + { + get + { + if (s_instance != null && s_instance.myOculusID != null) + { + return s_instance.myOculusID; + } + else + { + return string.Empty; + } + } + } + + #endregion + + #region State Management + + public enum State + { + // loading platform library, checking application entitlement, + // getting the local user info + INITIALIZING, + + // Checking to see if we were launched from an invite + CHECKING_LAUNCH_STATE, + + // Creating a room to join + CREATING_A_ROOM, + + // in this state we've create a room, and hopefully + // sent some invites, and we're waiting people to join + WAITING_IN_A_ROOM, + + // in this state we're attempting to join a room from an invite + JOINING_A_ROOM, + + // we're in a room with others + CONNECTED_IN_A_ROOM, + + // Leaving a room + LEAVING_A_ROOM, + + // shutdown any connections and leave the current room + SHUTDOWN, + }; + + public static void TransitionToState(State newState) + { + if (s_instance) + { + s_instance.LogOutputLine("State " + s_instance.currentState + " -> " + newState); + } + + if (s_instance && s_instance.currentState != newState) + { + s_instance.currentState = newState; + + // state transition logic + switch (newState) + { + case State.SHUTDOWN: + s_instance.OnApplicationQuit(); + break; + + default: + break; + } + } + + SetSphereColorForState(); + } + + private static void SetSphereColorForState() + { + switch (s_instance.currentState) + { + case State.INITIALIZING: + case State.SHUTDOWN: + s_instance.sphereMesh.material.color = BLACK; + break; + + case State.WAITING_IN_A_ROOM: + s_instance.sphereMesh.material.color = WHITE; + break; + + case State.CONNECTED_IN_A_ROOM: + s_instance.sphereMesh.material.color = CYAN; + break; + + default: + break; + } + } + + public static void SetFloorColorForState(bool host) + { + if (host) + { + s_instance.floorMesh.material.color = BLUE; + } + else + { + s_instance.floorMesh.material.color = GREEN; + } + } + + public static void MarkAllRemoteUsersAsNotInRoom() + { + foreach (KeyValuePair kvp in s_instance.remoteUsers) + { + kvp.Value.stillInRoom = false; + } + } + + public static void MarkRemoteUserInRoom(ulong userID) + { + RemotePlayer remoteUser = new RemotePlayer(); + + if (s_instance.remoteUsers.TryGetValue(userID, out remoteUser)) + { + remoteUser.stillInRoom = true; + } + } + + public static void ForgetRemoteUsersNotInRoom() + { + List toPurge = new List(); + + foreach (KeyValuePair kvp in s_instance.remoteUsers) + { + if (kvp.Value.stillInRoom == false) + { + toPurge.Add(kvp.Key); + } + } + + foreach (ulong key in toPurge) + { + RemoveRemoteUser(key); + } + } + + public static void LogOutput(string line) + { + s_instance.LogOutputLine(Time.time + ": " + line); + } + + public static bool IsUserInRoom(ulong userID) + { + return s_instance.remoteUsers.ContainsKey(userID); + } + + public static void AddRemoteUser(ulong userID) + { + RemotePlayer remoteUser = new RemotePlayer(); + + remoteUser.RemoteAvatar = Instantiate(s_instance.remoteAvatarPrefab); + remoteUser.RemoteAvatar.oculusUserID = userID.ToString(); + remoteUser.RemoteAvatar.ShowThirdPerson = true; + remoteUser.RemoteAvatar.EnableMouthVertexAnimation = true; + remoteUser.p2pConnectionState = PeerConnectionState.Unknown; + remoteUser.voipConnectionState = PeerConnectionState.Unknown; + remoteUser.stillInRoom = true; + remoteUser.remoteUserID = userID; + + s_instance.AddUser(userID, ref remoteUser); + s_instance.p2pManager.ConnectTo(userID); + s_instance.voipManager.ConnectTo(userID); + + remoteUser.voipSource = remoteUser.RemoteAvatar.gameObject.AddComponent(); + remoteUser.voipSource.senderID = userID; + + s_instance.LogOutputLine("Adding User " + userID); + } + + public static void RemoveRemoteUser(ulong userID) + { + RemotePlayer remoteUser = new RemotePlayer(); + + if (s_instance.remoteUsers.TryGetValue(userID, out remoteUser)) + { + Destroy(remoteUser.RemoteAvatar.GetComponent(), 0); + Destroy(remoteUser.RemoteAvatar.gameObject, 0); + s_instance.remoteUsers.Remove(userID); + + s_instance.LogOutputLine("Removing User " + userID); + } + } + + public void UpdateVoiceData(short[] pcmData) + { + float voiceMax = 0.0f; + float[] floats = new float[pcmData.Length]; + for (int n = 0; n < pcmData.Length; n++) + { + float cur = floats[n] = (float)pcmData[n] / (float)short.MaxValue; + if (cur > voiceMax) + { + voiceMax = cur; + } + } + voiceCurrent = voiceMax; + } + + public static void MicFilter(short[] pcmData, System.UIntPtr pcmDataLength, int frequency, int numChannels) + { + s_instance.UpdateVoiceData(pcmData); + } + + + public static RemotePlayer GetRemoteUser(ulong userID) + { + RemotePlayer remoteUser = new RemotePlayer(); + + if (s_instance.remoteUsers.TryGetValue(userID, out remoteUser)) + { + return remoteUser; + } + else + { + return null; + } + } + + #endregion + +} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/SocialPlatformManager.cs.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/SocialPlatformManager.cs.meta new file mode 100644 index 0000000..e34a65d --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/SocialPlatformManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 61a76ada1a1960647bf44fc08c5d5743 +timeCreated: 1536104814 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/VoipManager.cs b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/VoipManager.cs new file mode 100644 index 0000000..13ff185 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/VoipManager.cs @@ -0,0 +1,72 @@ +using UnityEngine; +using System.Collections; + +using Oculus.Platform; +using Oculus.Platform.Models; + +// Helper class to manage the Voice-over-IP connection to the +// remote users +public class VoipManager +{ + public VoipManager() + { + Voip.SetVoipConnectRequestCallback(VoipConnectRequestCallback); + Voip.SetVoipStateChangeCallback(VoipStateChangedCallback); + } + + public void ConnectTo(ulong userID) + { + // ID comparison is used to decide who initiates and who gets the Callback + if (SocialPlatformManager.MyID < userID) + { + Voip.Start(userID); + SocialPlatformManager.LogOutput("Voip connect to " + userID); + } + } + + + public void Disconnect(ulong userID) + { + if (userID != 0) + { + Voip.Stop(userID); + + RemotePlayer remote = SocialPlatformManager.GetRemoteUser(userID); + if (remote != null) + { + remote.voipConnectionState = PeerConnectionState.Unknown; + } + } + } + + void VoipConnectRequestCallback(Message msg) + { + SocialPlatformManager.LogOutput("Voip request from " + msg.Data.ID); + + RemotePlayer remote = SocialPlatformManager.GetRemoteUser(msg.Data.ID); + if (remote != null) + { + SocialPlatformManager.LogOutput("Voip request accepted from " + msg.Data.ID); + Voip.Accept(msg.Data.ID); + } + } + + void VoipStateChangedCallback(Message msg) + { + SocialPlatformManager.LogOutput("Voip state to " + msg.Data.ID + " changed to " + msg.Data.State); + + RemotePlayer remote = SocialPlatformManager.GetRemoteUser(msg.Data.ID); + if (remote != null) + { + remote.voipConnectionState = msg.Data.State; + + // ID comparison is used to decide who initiates and who gets the Callback + if (msg.Data.State == PeerConnectionState.Timeout && SocialPlatformManager.MyID < msg.Data.ID) + { + // keep trying until hangup! + Voip.Start(msg.Data.ID); + SocialPlatformManager.LogOutput("Voip re-connect to " + msg.Data.ID); + } + } + } +} diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/VoipManager.cs.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/VoipManager.cs.meta new file mode 100644 index 0000000..c2dbb41 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Scripts/VoipManager.cs.meta @@ -0,0 +1,13 @@ +fileFormatVersion: 2 +guid: d22b9da5532b0224f82207825f9f6a65 +timeCreated: 1521151723 +licenseType: Store +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures.meta new file mode 100644 index 0000000..5119448 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: fc164fe2aad000b40a6f426b477793aa +folderAsset: yes +timeCreated: 1496779994 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/GearHelp.png b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/GearHelp.png new file mode 100644 index 0000000..a1b1577 Binary files /dev/null and b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/GearHelp.png differ diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/GearHelp.png.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/GearHelp.png.meta new file mode 100644 index 0000000..9eea27c --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/GearHelp.png.meta @@ -0,0 +1,58 @@ +fileFormatVersion: 2 +guid: 0453138effcc80349b11371805f72f5b +timeCreated: 1497548991 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/Help.png b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/Help.png new file mode 100644 index 0000000..9f93e8a Binary files /dev/null and b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/Help.png differ diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/Help.png.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/Help.png.meta new file mode 100644 index 0000000..90fa1b6 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/Assets/Textures/Help.png.meta @@ -0,0 +1,58 @@ +fileFormatVersion: 2 +guid: c8f5462cc092d0c40ad71773132863e0 +timeCreated: 1496780052 +licenseType: Store +TextureImporter: + fileIDToRecycleName: {} + serializedVersion: 2 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + linearTexture: 0 + correctGamma: 0 + fadeOut: 0 + borderMipMap: 0 + mipMapFadeDistanceStart: 1 + mipMapFadeDistanceEnd: 3 + bumpmap: + convertToNormalMap: 0 + externalNormalMap: 0 + heightScale: 0.25 + normalMapFilter: 0 + isReadable: 0 + grayScaleToAlpha: 0 + generateCubemap: 0 + cubemapConvolution: 0 + cubemapConvolutionSteps: 7 + cubemapConvolutionExponent: 1.5 + seamlessCubemap: 0 + textureFormat: -1 + maxTextureSize: 2048 + textureSettings: + filterMode: -1 + aniso: -1 + mipBias: -1 + wrapMode: -1 + nPOTScale: 1 + lightmap: 0 + rGBM: 0 + compressionQuality: 50 + spriteMode: 0 + spriteExtrude: 1 + spriteMeshType: 1 + alignment: 0 + spritePivot: {x: 0.5, y: 0.5} + spriteBorder: {x: 0, y: 0, z: 0, w: 0} + spritePixelsToUnits: 100 + alphaIsTransparency: 0 + spriteTessellationDetail: -1 + textureType: -1 + buildTargetSettings: [] + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + spritePackingTag: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/README.txt b/Assets/Oculus/Avatar/Samples/SocialStarter/README.txt new file mode 100644 index 0000000..095662d --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/README.txt @@ -0,0 +1,29 @@ +The SocialStarter sample is meant to show how to leverage the Oculus Avatars and Oculus platform features together to make a very basic networked social experience. + +Steps to run the sample: + +1. Import the Oculus Unity Utilities Package if you don't already have it included in your project. This will provide you with all of the necessary general Oculus Prefabs. +2. Import the Oculus Avatar SDK Unity Package if you don't already have it included in your project. This will provide you with all of the necessary Avatar Prefabs. +3. Import the Oculus Platform SDK Unity Package if you don't already have it included in your project. This will provide all of the C# interfaces to the Oculus Platform features. +4. In the Unity editor menus select "Oculus Avatars > Edit Configuration". Place your AppID in the two fields for Rift AppID and Gear AppID. +5. In the Unity editor menus select "Oculus Platform > Edit Settings". Place your AppID in the two fields for Rift AppID and Gear AppID. +6. Make sure the prefabs are set correctly. Select the OVRPlayerController object in the MainScene: +a) Local Avatar Prefab should be set to the "LocalAvatar (OvrAvatar)" prefab found in the Avatar SDK under "OvrAvatar > Content > Prefabs". +b) Remote Avatar Prefab should be set to the "RemoteAvatar (OvrAvatar)" prefab found in the Avatar SDK under "OvrAvatar > Content > Prefabs". + +How to use + +1. When you first start up the sample you are placed in both a virtual room and an online room. In the virtual room the colour of both the floor and the sphere in the middle are used as state indicators: + +a) The sphere colour indicates if you are successfully in an online room. Black means the room creation/join failed for some reason, White means you are in an online room. +b) The floor colour is blue if you are the owner of the room or green if you are just a member of the room. + +2. Your left hand should be holding the instructions UI: + +Button X: Send an Invite - This will bring up the Oculus Universal Menu which will show a list of your friends that you can invite. This may take a second or two to pop up. +Button Y: Toggle the sky camera - This allows you to view the scene from a static 3rd person camera. +Click left Stick: Toggle showing the instructions UI +Left Stick Analog: Move around the space +Right Stick Analog: Rotate + +3. When a user joins your room a VoIP connection and a P2P connection will be setup. The P2P connection is used to send Avatar updates as well as positional updates. diff --git a/Assets/Oculus/Avatar/Samples/SocialStarter/README.txt.meta b/Assets/Oculus/Avatar/Samples/SocialStarter/README.txt.meta new file mode 100644 index 0000000..09e2c72 --- /dev/null +++ b/Assets/Oculus/Avatar/Samples/SocialStarter/README.txt.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: a7a78d98ba50c73429cf004f1635d521 +timeCreated: 1517510514 +licenseType: Store +TextScriptImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts.meta b/Assets/Oculus/Avatar/Scripts.meta new file mode 100644 index 0000000..4ccec1c --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 1eb18b8db6c77f04c96874806a37143d +folderAsset: yes +timeCreated: 1466714102 +licenseType: Store +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatar.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatar.cs new file mode 100644 index 0000000..1da3dd9 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatar.cs @@ -0,0 +1,946 @@ +using UnityEngine; +using System.Collections; +using System; +using System.Linq; +using Oculus.Avatar; +using System.Runtime.InteropServices; +using System.Collections.Generic; +using UnityEngine.Events; + +#if UNITY_EDITOR +using UnityEditor; +#endif + +[System.Serializable] +public class AvatarLayer +{ + public int layerIndex; +} + +#if UNITY_EDITOR +[CustomPropertyDrawer(typeof(AvatarLayer))] +public class AvatarLayerPropertyDrawer : PropertyDrawer +{ + public override void OnGUI(Rect position, SerializedProperty property, GUIContent label) + { + EditorGUI.BeginProperty(position, GUIContent.none, property); + SerializedProperty layerIndex = property.FindPropertyRelative("layerIndex"); + position = EditorGUI.PrefixLabel(position, GUIUtility.GetControlID(FocusType.Passive), label); + layerIndex.intValue = EditorGUI.LayerField(position, layerIndex.intValue); + EditorGUI.EndProperty(); + } +} +#endif + +[System.Serializable] +public class PacketRecordSettings +{ + internal bool RecordingFrames = false; + public float UpdateRate = 1f / 30f; // 30 hz update of packets + internal float AccumulatedTime; +}; + +public class OvrAvatar : MonoBehaviour +{ + public OvrAvatarMaterialManager DefaultBodyMaterialManager; + public OvrAvatarMaterialManager DefaultHandMaterialManager; + + public OvrAvatarDriver Driver; + public OvrAvatarBase Base; + public OvrAvatarBody Body; + public OvrAvatarTouchController ControllerLeft; + public OvrAvatarTouchController ControllerRight; + public OvrAvatarHand HandLeft; + public OvrAvatarHand HandRight; + public bool RecordPackets; + public bool UseSDKPackets = true; + + public bool StartWithControllers; + public AvatarLayer FirstPersonLayer; + public AvatarLayer ThirdPersonLayer; + public bool ShowFirstPerson = true; + public bool ShowThirdPerson; + public ovrAvatarCapabilities Capabilities = ovrAvatarCapabilities.All; + public Shader SurfaceShader; + public Shader SurfaceShaderSelfOccluding; + public Shader SurfaceShaderPBS; + public Shader SurfaceShaderPBSV2Single; + public Shader SurfaceShaderPBSV2Combined; + public Shader SurfaceShaderPBSV2Simple; + public Shader SurfaceShaderPBSV2Loading; + + int renderPartCount = 0; + bool showLeftController; + bool showRightController; + List voiceUpdates = new List(); + + public string oculusUserID; + internal UInt64 oculusUserIDInternal; + +#if UNITY_ANDROID && UNITY_5_5_OR_NEWER && !UNITY_EDITOR + bool CombineMeshes = true; +#else + bool CombineMeshes = false; +#endif + +#if UNITY_EDITOR && UNITY_ANDROID + bool ForceMobileTextureFormat = true; +#else + bool ForceMobileTextureFormat = false; + +#endif + + private bool WaitingForCombinedMesh = false; + + public IntPtr sdkAvatar = IntPtr.Zero; + private HashSet assetLoadingIds = new HashSet(); + private Dictionary trackedComponents = + new Dictionary(); + + private UnityEvent AssetsDoneLoading = new UnityEvent(); + bool assetsFinishedLoading = false; + + public Transform LeftHandCustomPose; + public Transform RightHandCustomPose; + Transform cachedLeftHandCustomPose; + Transform[] cachedCustomLeftHandJoints; + ovrAvatarTransform[] cachedLeftHandTransforms; + Transform cachedRightHandCustomPose; + Transform[] cachedCustomRightHandJoints; + ovrAvatarTransform[] cachedRightHandTransforms; + + + private Vector4 clothingAlphaOffset = new Vector4(0f, 0f, 0f, 1f); + private UInt64 clothingAlphaTexture = 0; + + public class PacketEventArgs : EventArgs + { + public readonly OvrAvatarPacket Packet; + public PacketEventArgs(OvrAvatarPacket packet) + { + Packet = packet; + } + } + + public PacketRecordSettings PacketSettings = new PacketRecordSettings(); + + OvrAvatarPacket CurrentUnityPacket; + + public enum HandType + { + Right, + Left, + + Max + }; + + public enum HandJoint + { + HandBase, + IndexBase, + IndexTip, + ThumbBase, + ThumbTip, + + Max, + } + + private static string[,] HandJoints = new string[(int)HandType.Max, (int)HandJoint.Max] + { + { + "hands:r_hand_world", + "hands:r_hand_world/hands:b_r_hand/hands:b_r_index1", + "hands:r_hand_world/hands:b_r_hand/hands:b_r_index1/hands:b_r_index2/hands:b_r_index3/hands:b_r_index_ignore", + "hands:r_hand_world/hands:b_r_hand/hands:b_r_thumb1/hands:b_r_thumb2", + "hands:r_hand_world/hands:b_r_hand/hands:b_r_thumb1/hands:b_r_thumb2/hands:b_r_thumb3/hands:b_r_thumb_ignore" + }, + { + "hands:l_hand_world", + "hands:l_hand_world/hands:b_l_hand/hands:b_l_index1", + "hands:l_hand_world/hands:b_l_hand/hands:b_l_index1/hands:b_l_index2/hands:b_l_index3/hands:b_l_index_ignore", + "hands:l_hand_world/hands:b_l_hand/hands:b_l_thumb1/hands:b_l_thumb2", + "hands:l_hand_world/hands:b_l_hand/hands:b_l_thumb1/hands:b_l_thumb2/hands:b_l_thumb3/hands:b_l_thumb_ignore" + } + }; + +#if UNITY_ANDROID + internal ovrAvatarAssetLevelOfDetail LevelOfDetail = ovrAvatarAssetLevelOfDetail.Medium; +#else + internal ovrAvatarAssetLevelOfDetail LevelOfDetail = ovrAvatarAssetLevelOfDetail.Highest; +#endif + + void OnDestroy() + { + if (sdkAvatar != IntPtr.Zero) + { + CAPI.ovrAvatar_Destroy(sdkAvatar); + } + } + + public EventHandler PacketRecorded; + + public void AssetLoadedCallback(OvrAvatarAsset asset) + { + assetLoadingIds.Remove(asset.assetID); + } + + public void CombinedMeshLoadedCallback(IntPtr assetPtr) + { + if (!WaitingForCombinedMesh) + { + return; + } + + var meshIDs = CAPI.ovrAvatarAsset_GetCombinedMeshIDs(assetPtr); + foreach (var id in meshIDs) + { + assetLoadingIds.Remove(id); + } + + CAPI.ovrAvatar_GetCombinedMeshAlphaData(sdkAvatar, ref clothingAlphaTexture, ref clothingAlphaOffset); + + WaitingForCombinedMesh = false; + } + + private void AddAvatarComponent(GameObject componentObject, ovrAvatarComponent component) + { + OvrAvatarComponent ovrComponent = componentObject.AddComponent(); + trackedComponents.Add(component.name, ovrComponent); + + if (ovrComponent.name == "body") + { + ovrComponent.ClothingAlphaOffset = clothingAlphaOffset; + ovrComponent.ClothingAlphaTexture = clothingAlphaTexture; + } + + AddRenderParts(ovrComponent, component, componentObject.transform); + } + + private OvrAvatarSkinnedMeshRenderComponent AddSkinnedMeshRenderComponent(GameObject gameObject, ovrAvatarRenderPart_SkinnedMeshRender skinnedMeshRender) + { + OvrAvatarSkinnedMeshRenderComponent skinnedMeshRenderer = gameObject.AddComponent(); + skinnedMeshRenderer.Initialize(skinnedMeshRender, SurfaceShader, SurfaceShaderSelfOccluding, ThirdPersonLayer.layerIndex, FirstPersonLayer.layerIndex, renderPartCount++); + return skinnedMeshRenderer; + } + + private OvrAvatarSkinnedMeshRenderPBSComponent AddSkinnedMeshRenderPBSComponent(GameObject gameObject, ovrAvatarRenderPart_SkinnedMeshRenderPBS skinnedMeshRenderPBS) + { + OvrAvatarSkinnedMeshRenderPBSComponent skinnedMeshRenderer = gameObject.AddComponent(); + skinnedMeshRenderer.Initialize(skinnedMeshRenderPBS, SurfaceShaderPBS, ThirdPersonLayer.layerIndex, FirstPersonLayer.layerIndex, renderPartCount++); + return skinnedMeshRenderer; + } + + private OvrAvatarSkinnedMeshPBSV2RenderComponent AddSkinnedMeshRenderPBSV2Component( + IntPtr renderPart, + GameObject gameObject, + ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2 skinnedMeshRenderPBSV2, + OvrAvatarMaterialManager materialManager) + { + OvrAvatarSkinnedMeshPBSV2RenderComponent skinnedMeshRenderer = gameObject.AddComponent(); + skinnedMeshRenderer.Initialize( + renderPart, + skinnedMeshRenderPBSV2, + materialManager, + ThirdPersonLayer.layerIndex, + FirstPersonLayer.layerIndex, + renderPartCount++, + gameObject.name.Contains("body") && CombineMeshes, + LevelOfDetail); + + return skinnedMeshRenderer; + } + + private OvrAvatarProjectorRenderComponent AddProjectorRenderComponent(GameObject gameObject, ovrAvatarRenderPart_ProjectorRender projectorRender) + { + ovrAvatarComponent component = CAPI.ovrAvatarComponent_Get(sdkAvatar, projectorRender.componentIndex); + OvrAvatarComponent ovrComponent; + if (trackedComponents.TryGetValue(component.name, out ovrComponent)) + { + if (projectorRender.renderPartIndex < ovrComponent.RenderParts.Count) + { + OvrAvatarRenderComponent targetRenderPart = ovrComponent.RenderParts[(int)projectorRender.renderPartIndex]; + OvrAvatarProjectorRenderComponent projectorComponent = gameObject.AddComponent(); + projectorComponent.InitializeProjectorRender(projectorRender, SurfaceShader, targetRenderPart); + return projectorComponent; + } + } + return null; + } + + static public IntPtr GetRenderPart(ovrAvatarComponent component, UInt32 renderPartIndex) + { + long offset = Marshal.SizeOf(typeof(IntPtr)) * renderPartIndex; + IntPtr marshalPtr = new IntPtr(component.renderParts.ToInt64() + offset); + return (IntPtr)Marshal.PtrToStructure(marshalPtr, typeof(IntPtr)); + } + + private void UpdateAvatarComponent(ovrAvatarComponent component) + { + OvrAvatarComponent ovrComponent; + if (!trackedComponents.TryGetValue(component.name, out ovrComponent)) + { + throw new Exception(string.Format("trackedComponents didn't have {0}", component.name)); + } + + ovrComponent.UpdateAvatar(component, this); + } + + private static string GetRenderPartName(ovrAvatarComponent component, uint renderPartIndex) + { + return component.name + "_renderPart_" + (int)renderPartIndex; + } + + internal static void ConvertTransform(ovrAvatarTransform transform, Transform target) + { + Vector3 position = transform.position; + position.z = -position.z; + Quaternion orientation = transform.orientation; + orientation.x = -orientation.x; + orientation.y = -orientation.y; + target.localPosition = position; + target.localRotation = orientation; + target.localScale = transform.scale; + } + + public static ovrAvatarTransform CreateOvrAvatarTransform(Vector3 position, Quaternion orientation) + { + return new ovrAvatarTransform + { + position = new Vector3(position.x, position.y, -position.z), + orientation = new Quaternion(-orientation.x, -orientation.y, orientation.z, orientation.w), + scale = Vector3.one + }; + } + + private void RemoveAvatarComponent(string name) + { + OvrAvatarComponent componentObject; + trackedComponents.TryGetValue(name, out componentObject); + Destroy(componentObject.gameObject); + trackedComponents.Remove(name); + } + + private void UpdateSDKAvatarUnityState() + { + //Iterate through all the render components + UInt32 componentCount = CAPI.ovrAvatarComponent_Count(sdkAvatar); + HashSet componentsThisRun = new HashSet(); + for (UInt32 i = 0; i < componentCount; i++) + { + IntPtr ptr = CAPI.ovrAvatarComponent_Get_Native(sdkAvatar, i); + ovrAvatarComponent component = (ovrAvatarComponent)Marshal.PtrToStructure(ptr, typeof(ovrAvatarComponent)); + componentsThisRun.Add(component.name); + if (!trackedComponents.ContainsKey(component.name)) + { + GameObject componentObject = null; + Type specificType = null; + if ((Capabilities & ovrAvatarCapabilities.Base) != 0) + { + ovrAvatarBaseComponent? baseComponent = CAPI.ovrAvatarPose_GetBaseComponent(sdkAvatar); + if (baseComponent.HasValue && ptr == baseComponent.Value.renderComponent) + { + specificType = typeof(OvrAvatarBase); + if (Base != null) + { + componentObject = Base.gameObject; + } + } + } + + if (specificType == null && (Capabilities & ovrAvatarCapabilities.Body) != 0) + { + ovrAvatarBodyComponent? bodyComponent = CAPI.ovrAvatarPose_GetBodyComponent(sdkAvatar); + if (bodyComponent.HasValue && ptr == bodyComponent.Value.renderComponent) + { + specificType = typeof(OvrAvatarBody); + if (Body != null) + { + componentObject = Body.gameObject; + } + } + } + + if (specificType == null && (Capabilities & ovrAvatarCapabilities.Hands) != 0) + { + ovrAvatarControllerComponent? controllerComponent = CAPI.ovrAvatarPose_GetLeftControllerComponent(sdkAvatar); + if (specificType == null && controllerComponent.HasValue && ptr == controllerComponent.Value.renderComponent) + { + specificType = typeof(OvrAvatarTouchController); + if (ControllerLeft != null) + { + componentObject = ControllerLeft.gameObject; + } + } + + controllerComponent = CAPI.ovrAvatarPose_GetRightControllerComponent(sdkAvatar); + if (specificType == null && controllerComponent.HasValue && ptr == controllerComponent.Value.renderComponent) + { + specificType = typeof(OvrAvatarTouchController); + if (ControllerRight != null) + { + componentObject = ControllerRight.gameObject; + } + } + + ovrAvatarHandComponent? handComponent = CAPI.ovrAvatarPose_GetLeftHandComponent(sdkAvatar); + if (specificType == null && handComponent.HasValue && ptr == handComponent.Value.renderComponent) + { + specificType = typeof(OvrAvatarHand); + if (HandLeft != null) + { + componentObject = HandLeft.gameObject; + } + } + + handComponent = CAPI.ovrAvatarPose_GetRightHandComponent(sdkAvatar); + if (specificType == null && handComponent.HasValue && ptr == handComponent.Value.renderComponent) + { + specificType = typeof(OvrAvatarHand); + if (HandRight != null) + { + componentObject = HandRight.gameObject; + } + } + } + + // If this is an unknown type, just create an object for the rendering + if (componentObject == null && specificType == null) + { + componentObject = new GameObject(); + componentObject.name = component.name; + componentObject.transform.SetParent(transform); + } + if (componentObject != null) + { + AddAvatarComponent(componentObject, component); + } + } + UpdateAvatarComponent(component); + } + HashSet deletableNames = new HashSet(trackedComponents.Keys); + deletableNames.ExceptWith(componentsThisRun); + //deletableNames contains the name of all components which are tracked and were + //not present in this run + foreach (var name in deletableNames) + { + RemoveAvatarComponent(name); + } + + UpdateVoiceBehavior(); + } + + void UpdateCustomPoses() + { + // Check to see if the pose roots changed + if (UpdatePoseRoot(LeftHandCustomPose, ref cachedLeftHandCustomPose, ref cachedCustomLeftHandJoints, ref cachedLeftHandTransforms)) + { + if (cachedLeftHandCustomPose == null && sdkAvatar != IntPtr.Zero) + { + CAPI.ovrAvatar_SetLeftHandGesture(sdkAvatar, ovrAvatarHandGesture.Default); + } + } + if (UpdatePoseRoot(RightHandCustomPose, ref cachedRightHandCustomPose, ref cachedCustomRightHandJoints, ref cachedRightHandTransforms)) + { + if (cachedRightHandCustomPose == null && sdkAvatar != IntPtr.Zero) + { + CAPI.ovrAvatar_SetRightHandGesture(sdkAvatar, ovrAvatarHandGesture.Default); + } + } + + // Check to see if the custom gestures need to be updated + if (sdkAvatar != IntPtr.Zero) + { + if (cachedLeftHandCustomPose != null && UpdateTransforms(cachedCustomLeftHandJoints, cachedLeftHandTransforms)) + { + CAPI.ovrAvatar_SetLeftHandCustomGesture(sdkAvatar, (uint)cachedLeftHandTransforms.Length, cachedLeftHandTransforms); + } + if (cachedRightHandCustomPose != null && UpdateTransforms(cachedCustomRightHandJoints, cachedRightHandTransforms)) + { + CAPI.ovrAvatar_SetRightHandCustomGesture(sdkAvatar, (uint)cachedRightHandTransforms.Length, cachedRightHandTransforms); + } + } + } + + static bool UpdatePoseRoot(Transform poseRoot, ref Transform cachedPoseRoot, ref Transform[] cachedPoseJoints, ref ovrAvatarTransform[] transforms) + { + if (poseRoot == cachedPoseRoot) + { + return false; + } + + if (!poseRoot) + { + cachedPoseRoot = null; + cachedPoseJoints = null; + transforms = null; + } + else + { + List joints = new List(); + OrderJoints(poseRoot, joints); + cachedPoseRoot = poseRoot; + cachedPoseJoints = joints.ToArray(); + transforms = new ovrAvatarTransform[joints.Count]; + } + return true; + } + + static bool UpdateTransforms(Transform[] joints, ovrAvatarTransform[] transforms) + { + bool updated = false; + for (int i = 0; i < joints.Length; ++i) + { + Transform joint = joints[i]; + ovrAvatarTransform transform = CreateOvrAvatarTransform(joint.localPosition, joint.localRotation); + if (transform.position != transforms[i].position || transform.orientation != transforms[i].orientation) + { + transforms[i] = transform; + updated = true; + } + } + return updated; + } + + + private static void OrderJoints(Transform transform, List joints) + { + joints.Add(transform); + for (int i = 0; i < transform.childCount; ++i) + { + Transform child = transform.GetChild(i); + OrderJoints(child, joints); + } + } + + void AvatarSpecificationCallback(IntPtr avatarSpecification) + { +#if UNITY_ANDROID + Capabilities &= ~ovrAvatarCapabilities.BodyTilt; +#endif + sdkAvatar = CAPI.ovrAvatar_Create(avatarSpecification, Capabilities); + ShowLeftController(showLeftController); + ShowRightController(showRightController); + + //Fetch all the assets that this avatar uses. + UInt32 assetCount = CAPI.ovrAvatar_GetReferencedAssetCount(sdkAvatar); + for (UInt32 i = 0; i < assetCount; ++i) + { + UInt64 id = CAPI.ovrAvatar_GetReferencedAsset(sdkAvatar, i); + if (OvrAvatarSDKManager.Instance.GetAsset(id) == null) + { + OvrAvatarSDKManager.Instance.BeginLoadingAsset( + id, + LevelOfDetail, + AssetLoadedCallback); + + assetLoadingIds.Add(id); + } + } + + if (CombineMeshes) + { + OvrAvatarSDKManager.Instance.RegisterCombinedMeshCallback( + sdkAvatar, + CombinedMeshLoadedCallback); + } + } + + void Start() + { +#if !UNITY_ANDROID + if (CombineMeshes) + { + CombineMeshes = false; + AvatarLogger.Log("Combine Meshes Currently Only Supported On Android"); + } +#endif + +#if !UNITY_5_5_OR_NEWER + if (CombineMeshes) + { + CombineMeshes = false; + AvatarLogger.LogWarning("Unity Version too old to use Combined Mesh Shader, required 5.5.0+"); + } +#endif + + try + { + oculusUserIDInternal = UInt64.Parse(oculusUserID); + } + catch (Exception) + { + oculusUserIDInternal = 0; + + AvatarLogger.LogWarning("Invalid Oculus User ID Format"); + } + + AvatarLogger.Log("Starting OvrAvatar " + gameObject.name); + AvatarLogger.Log(AvatarLogger.Tab + "LOD: " + LevelOfDetail.ToString()); + AvatarLogger.Log(AvatarLogger.Tab + "Combine Meshes: " + CombineMeshes); + AvatarLogger.Log(AvatarLogger.Tab + "Force Mobile Textures: " + ForceMobileTextureFormat); + AvatarLogger.Log(AvatarLogger.Tab + "Oculus User ID: " + oculusUserIDInternal); + + ShowLeftController(StartWithControllers); + ShowRightController(StartWithControllers); + OvrAvatarSDKManager.Instance.RequestAvatarSpecification( + oculusUserIDInternal, + this.AvatarSpecificationCallback, + CombineMeshes, + LevelOfDetail, + ForceMobileTextureFormat); + + WaitingForCombinedMesh = CombineMeshes; + Driver.Mode = UseSDKPackets ? OvrAvatarDriver.PacketMode.SDK : OvrAvatarDriver.PacketMode.Unity; + } + + void Update() + { + if (sdkAvatar == IntPtr.Zero) + { + return; + } + + if (Driver != null) + { + Driver.UpdateTransforms(sdkAvatar); + + foreach (float[] voiceUpdate in voiceUpdates) + { + CAPI.ovrAvatarPose_UpdateVoiceVisualization(sdkAvatar, voiceUpdate); + } + + voiceUpdates.Clear(); + + CAPI.ovrAvatarPose_Finalize(sdkAvatar, Time.deltaTime); + } + + if (RecordPackets) + { + RecordFrame(); + } + + if (assetLoadingIds.Count == 0) + { + UpdateSDKAvatarUnityState(); + UpdateCustomPoses(); + + if (!assetsFinishedLoading) + { + AssetsDoneLoading.Invoke(); + assetsFinishedLoading = true; + } + } + } + + public static ovrAvatarHandInputState CreateInputState(ovrAvatarTransform transform, OvrAvatarDriver.ControllerPose pose) + { + ovrAvatarHandInputState inputState = new ovrAvatarHandInputState(); + inputState.transform = transform; + inputState.buttonMask = pose.buttons; + inputState.touchMask = pose.touches; + inputState.joystickX = pose.joystickPosition.x; + inputState.joystickY = pose.joystickPosition.y; + inputState.indexTrigger = pose.indexTrigger; + inputState.handTrigger = pose.handTrigger; + inputState.isActive = pose.isActive; + return inputState; + } + + public void ShowControllers(bool show) + { + ShowLeftController(show); + ShowRightController(show); + } + + public void ShowLeftController(bool show) + { + if (sdkAvatar != IntPtr.Zero) + { + CAPI.ovrAvatar_SetLeftControllerVisibility(sdkAvatar, show); + } + showLeftController = show; + } + + public void ShowRightController(bool show) + { + if (sdkAvatar != IntPtr.Zero) + { + CAPI.ovrAvatar_SetRightControllerVisibility(sdkAvatar, show); + } + showRightController = show; + } + + public void UpdateVoiceVisualization(float[] voiceSamples) + { + voiceUpdates.Add(voiceSamples); + } + + void RecordFrame() + { + if(UseSDKPackets) + { + RecordSDKFrame(); + } + else + { + RecordUnityFrame(); + } + } + + // Meant to be used mutually exclusively with RecordSDKFrame to give user more options to optimize or tweak packet data + private void RecordUnityFrame() + { + var deltaSeconds = Time.deltaTime; + var frame = Driver.GetCurrentPose(); + // If this is our first packet, store the pose as the initial frame + if (CurrentUnityPacket == null) + { + CurrentUnityPacket = new OvrAvatarPacket(frame); + deltaSeconds = 0; + } + + float recordedSeconds = 0; + while (recordedSeconds < deltaSeconds) + { + float remainingSeconds = deltaSeconds - recordedSeconds; + float remainingPacketSeconds = PacketSettings.UpdateRate - CurrentUnityPacket.Duration; + + // If we're not going to fill the packet, just add the frame + if (remainingSeconds < remainingPacketSeconds) + { + CurrentUnityPacket.AddFrame(frame, remainingSeconds); + recordedSeconds += remainingSeconds; + } + + // If we're going to fill the packet, interpolate the pose, send the packet, + // and open a new one + else + { + // Interpolate between the packet's last frame and our target pose + // to compute a pose at the end of the packet time. + OvrAvatarDriver.PoseFrame a = CurrentUnityPacket.FinalFrame; + OvrAvatarDriver.PoseFrame b = frame; + float t = remainingPacketSeconds / remainingSeconds; + OvrAvatarDriver.PoseFrame intermediatePose = OvrAvatarDriver.PoseFrame.Interpolate(a, b, t); + CurrentUnityPacket.AddFrame(intermediatePose, remainingPacketSeconds); + recordedSeconds += remainingPacketSeconds; + + // Broadcast the recorded packet + if (PacketRecorded != null) + { + PacketRecorded(this, new PacketEventArgs(CurrentUnityPacket)); + } + + // Open a new packet + CurrentUnityPacket = new OvrAvatarPacket(intermediatePose); + } + } + } + + private void RecordSDKFrame() + { + if (sdkAvatar == IntPtr.Zero) + { + return; + } + + if (!PacketSettings.RecordingFrames) + { + CAPI.ovrAvatarPacket_BeginRecording(sdkAvatar); + PacketSettings.AccumulatedTime = 0.0f; + PacketSettings.RecordingFrames = true; + } + + PacketSettings.AccumulatedTime += Time.deltaTime; + + if (PacketSettings.AccumulatedTime >= PacketSettings.UpdateRate) + { + PacketSettings.AccumulatedTime = 0.0f; + var packet = CAPI.ovrAvatarPacket_EndRecording(sdkAvatar); + CAPI.ovrAvatarPacket_BeginRecording(sdkAvatar); + + if (PacketRecorded != null) + { + PacketRecorded(this, new PacketEventArgs(new OvrAvatarPacket { ovrNativePacket = packet })); + } + + CAPI.ovrAvatarPacket_Free(packet); + } + } + + private void AddRenderParts( + OvrAvatarComponent ovrComponent, + ovrAvatarComponent component, + Transform parent) + { + for (UInt32 renderPartIndex = 0; renderPartIndex < component.renderPartCount; renderPartIndex++) + { + GameObject renderPartObject = new GameObject(); + renderPartObject.name = GetRenderPartName(component, renderPartIndex); + renderPartObject.transform.SetParent(parent); + IntPtr renderPart = GetRenderPart(component, renderPartIndex); + ovrAvatarRenderPartType type = CAPI.ovrAvatarRenderPart_GetType(renderPart); + OvrAvatarRenderComponent ovrRenderPart; + switch (type) + { + case ovrAvatarRenderPartType.SkinnedMeshRender: + ovrRenderPart = AddSkinnedMeshRenderComponent(renderPartObject, CAPI.ovrAvatarRenderPart_GetSkinnedMeshRender(renderPart)); + break; + case ovrAvatarRenderPartType.SkinnedMeshRenderPBS: + ovrRenderPart = AddSkinnedMeshRenderPBSComponent(renderPartObject, CAPI.ovrAvatarRenderPart_GetSkinnedMeshRenderPBS(renderPart)); + break; + case ovrAvatarRenderPartType.ProjectorRender: + ovrRenderPart = AddProjectorRenderComponent(renderPartObject, CAPI.ovrAvatarRenderPart_GetProjectorRender(renderPart)); + break; + case ovrAvatarRenderPartType.SkinnedMeshRenderPBS_V2: + { + OvrAvatarMaterialManager materialManager = null; + + if (ovrComponent.name == "body") + { + materialManager = DefaultBodyMaterialManager; + } + else if( ovrComponent.name.Contains("hand")) + { + materialManager = DefaultHandMaterialManager; + } + + ovrRenderPart = AddSkinnedMeshRenderPBSV2Component( + renderPart, + renderPartObject, + CAPI.ovrAvatarRenderPart_GetSkinnedMeshRenderPBSV2(renderPart), + materialManager); + } + break; + default: + throw new NotImplementedException(string.Format("Unsupported render part type: {0}", type.ToString())); + } + + ovrComponent.RenderParts.Add(ovrRenderPart); + } + } + + public void RefreshBodyParts() + { + OvrAvatarComponent component; + if (trackedComponents.TryGetValue("body", out component) && Body != null) + { + foreach (var part in component.RenderParts) + { + Destroy(part.gameObject); + } + + component.RenderParts.Clear(); + + ovrAvatarBodyComponent? sdkBodyComponent = CAPI.ovrAvatarPose_GetBodyComponent(sdkAvatar); + if (sdkBodyComponent != null) + { + ovrAvatarComponent sdKComponent = (ovrAvatarComponent)Marshal.PtrToStructure(sdkBodyComponent.Value.renderComponent, typeof(ovrAvatarComponent)); + AddRenderParts(component, sdKComponent, Body.gameObject.transform); + } + else + { + throw new Exception("Destroyed the body component, but didn't find a new one in the SDK"); + } + } + } + + public ovrAvatarBodyComponent? GetBodyComponent() + { + return CAPI.ovrAvatarPose_GetBodyComponent(sdkAvatar); + } + + + public Transform GetHandTransform(HandType hand, HandJoint joint) + { + if (hand >= HandType.Max || joint >= HandJoint.Max) + { + return null; + } + + var HandObject = hand == HandType.Left ? HandLeft : HandRight; + + if (HandObject != null) + { + var AvatarComponent = HandObject.GetComponent(); + if (AvatarComponent != null && AvatarComponent.RenderParts.Count > 0) + { + var SkinnedMesh = AvatarComponent.RenderParts[0]; + return SkinnedMesh.transform.Find(HandJoints[(int)hand, (int)joint]); + } + } + + return null; + } + + public void GetPointingDirection(HandType hand, ref Vector3 forward, ref Vector3 up) + { + Transform handBase = GetHandTransform(hand, HandJoint.HandBase); + + if (handBase != null) + { + forward = handBase.forward; + up = handBase.up; + } + } + + public Transform GetMouthTransform() + { + OvrAvatarComponent component; + if (trackedComponents.TryGetValue("voice", out component)) + { + if (component.RenderParts.Count > 0) + { + return component.RenderParts[0].transform; + } + } + + return null; + } + + static Vector3 MOUTH_POSITION_OFFSET = new Vector3(0, -0.018f, 0.1051f); + static string VOICE_PROPERTY = "_Voice"; + static string MOUTH_POSITION_PROPERTY = "_MouthPosition"; + static string MOUTH_DIRECTION_PROPERTY = "_MouthDirection"; + static string MOUTH_SCALE_PROPERTY = "_MouthEffectScale"; + + static float MOUTH_SCALE_GLOBAL = 0.007f; + static float MOUTH_MAX_GLOBAL = 0.007f; + static string NECK_JONT = "root_JNT/body_JNT/chest_JNT/neckBase_JNT/neck_JNT"; + + public float VoiceAmplitude = 0f; + public bool EnableMouthVertexAnimation = false; + + private void UpdateVoiceBehavior() + { + if (!EnableMouthVertexAnimation) + { + return; + } + + OvrAvatarComponent component; + if (trackedComponents.TryGetValue("body", out component)) + { + VoiceAmplitude = Mathf.Clamp(VoiceAmplitude, 0f, 1f); + + if (component.RenderParts.Count > 0) + { + var material = component.RenderParts[0].mesh.sharedMaterial; + var neckJoint = component.RenderParts[0].mesh.transform.Find(NECK_JONT); + var scaleDiff = neckJoint.TransformPoint(Vector3.up) - neckJoint.position; + + material.SetFloat(MOUTH_SCALE_PROPERTY, scaleDiff.magnitude); + + material.SetFloat( + VOICE_PROPERTY, + Mathf.Min(scaleDiff.magnitude * MOUTH_MAX_GLOBAL, scaleDiff.magnitude * VoiceAmplitude * MOUTH_SCALE_GLOBAL)); + + material.SetVector( + MOUTH_POSITION_PROPERTY, + neckJoint.TransformPoint(MOUTH_POSITION_OFFSET)); + + material.SetVector(MOUTH_DIRECTION_PROPERTY, neckJoint.up); + } + } + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatar.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatar.cs.meta new file mode 100644 index 0000000..c184790 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatar.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 00f3402a2ea5bff4880c0313515240cd +timeCreated: 1464046614 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarAsset.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarAsset.cs new file mode 100644 index 0000000..ba1238a --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarAsset.cs @@ -0,0 +1,5 @@ +using System; + +public class OvrAvatarAsset { + public UInt64 assetID; +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarAsset.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarAsset.cs.meta new file mode 100644 index 0000000..b7f6d51 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarAsset.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a7045bb39115f484a89ecaa778a2a60f +timeCreated: 1475521356 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetMesh.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetMesh.cs new file mode 100644 index 0000000..c3d05e6 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetMesh.cs @@ -0,0 +1,219 @@ +using System; +using Oculus.Avatar; +using UnityEngine; +using System.Runtime.InteropServices; + +public class OvrAvatarAssetMesh : OvrAvatarAsset +{ + public Mesh mesh; + private ovrAvatarSkinnedMeshPose skinnedBindPose; + public string[] jointNames; + + public OvrAvatarAssetMesh(UInt64 _assetId, IntPtr asset, ovrAvatarAssetType meshType) + { + assetID = _assetId; + mesh = new Mesh(); + mesh.name = "Procedural Geometry for asset " + _assetId; + + switch (meshType) + { + case ovrAvatarAssetType.Mesh: + { + ovrAvatarMeshAssetData meshAssetData = CAPI.ovrAvatarAsset_GetMeshData(asset); + + AvatarLogger.Log( + "OvrAvatarAssetMesh: " + + _assetId + + " " + + meshType.ToString() + + " VertexCount:" + + meshAssetData.vertexCount); + + + long vertexCount = (long)meshAssetData.vertexCount; + Vector3[] vertices = new Vector3[vertexCount]; + Vector3[] normals = new Vector3[vertexCount]; + Vector4[] tangents = new Vector4[vertexCount]; + Vector2[] uv = new Vector2[vertexCount]; + Color[] colors = new Color[vertexCount]; + BoneWeight[] boneWeights = new BoneWeight[vertexCount]; + + long vertexSize = (long)Marshal.SizeOf(typeof(ovrAvatarMeshVertex)); + long vertexBufferStart = meshAssetData.vertexBuffer.ToInt64(); + + for (long i = 0; i < vertexCount; i++) + { + long offset = vertexSize * i; + + ovrAvatarMeshVertex vertex = (ovrAvatarMeshVertex)Marshal.PtrToStructure(new IntPtr(vertexBufferStart + offset), typeof(ovrAvatarMeshVertex)); + vertices[i] = new Vector3(vertex.x, vertex.y, -vertex.z); + normals[i] = new Vector3(vertex.nx, vertex.ny, -vertex.nz); + tangents[i] = new Vector4(vertex.tx, vertex.ty, -vertex.tz, vertex.tw); + uv[i] = new Vector2(vertex.u, vertex.v); + colors[i] = new Color(0, 0, 0, 1); + + boneWeights[i].boneIndex0 = vertex.blendIndices[0]; + boneWeights[i].boneIndex1 = vertex.blendIndices[1]; + boneWeights[i].boneIndex2 = vertex.blendIndices[2]; + boneWeights[i].boneIndex3 = vertex.blendIndices[3]; + boneWeights[i].weight0 = vertex.blendWeights[0]; + boneWeights[i].weight1 = vertex.blendWeights[1]; + boneWeights[i].weight2 = vertex.blendWeights[2]; + boneWeights[i].weight3 = vertex.blendWeights[3]; + } + + mesh.vertices = vertices; + mesh.normals = normals; + mesh.uv = uv; + mesh.tangents = tangents; + mesh.boneWeights = boneWeights; + mesh.colors = colors; + + skinnedBindPose = meshAssetData.skinnedBindPose; + + ulong indexCount = meshAssetData.indexCount; + Int16[] indices = new Int16[indexCount]; + IntPtr indexBufferPtr = meshAssetData.indexBuffer; + Marshal.Copy(indexBufferPtr, indices, 0, (int)indexCount); + Int32[] triangles = new Int32[indexCount]; + for (ulong i = 0; i < indexCount; i += 3) + { + triangles[i + 2] = (Int32)indices[i]; + triangles[i + 1] = (Int32)indices[i + 1]; + triangles[i] = (Int32)indices[i + 2]; + } + mesh.triangles = triangles; + + UInt32 jointCount = skinnedBindPose.jointCount; + jointNames = new string[jointCount]; + for (UInt32 i = 0; i < jointCount; i++) + { + jointNames[i] = Marshal.PtrToStringAnsi(skinnedBindPose.jointNames[i]); + } + } + break; + + case ovrAvatarAssetType.CombinedMesh: + { + ovrAvatarMeshAssetDataV2 meshAssetData = CAPI.ovrAvatarAsset_GetCombinedMeshData(asset); + + AvatarLogger.Log( + "OvrAvatarAssetMesh: " + + _assetId + + " " + + meshType.ToString() + + " VertexCount:" + + meshAssetData.vertexCount); + + long vertexCount = (long)meshAssetData.vertexCount; + Vector3[] vertices = new Vector3[vertexCount]; + Vector3[] normals = new Vector3[vertexCount]; + Vector4[] tangents = new Vector4[vertexCount]; + Vector2[] uv = new Vector2[vertexCount]; + Color[] colors = new Color[vertexCount]; + BoneWeight[] boneWeights = new BoneWeight[vertexCount]; + + long vertexSize = (long)Marshal.SizeOf(typeof(ovrAvatarMeshVertexV2)); + long vertexBufferStart = meshAssetData.vertexBuffer.ToInt64(); + + for (long i = 0; i < vertexCount; i++) + { + long offset = vertexSize * i; + + ovrAvatarMeshVertexV2 vertex = (ovrAvatarMeshVertexV2)Marshal.PtrToStructure(new IntPtr(vertexBufferStart + offset), typeof(ovrAvatarMeshVertexV2)); + vertices[i] = new Vector3(vertex.x, vertex.y, -vertex.z); + normals[i] = new Vector3(vertex.nx, vertex.ny, -vertex.nz); + tangents[i] = new Vector4(vertex.tx, vertex.ty, -vertex.tz, vertex.tw); + uv[i] = new Vector2(vertex.u, vertex.v); + colors[i] = new Color(vertex.r, vertex.g, vertex.b, vertex.a); + + boneWeights[i].boneIndex0 = vertex.blendIndices[0]; + boneWeights[i].boneIndex1 = vertex.blendIndices[1]; + boneWeights[i].boneIndex2 = vertex.blendIndices[2]; + boneWeights[i].boneIndex3 = vertex.blendIndices[3]; + boneWeights[i].weight0 = vertex.blendWeights[0]; + boneWeights[i].weight1 = vertex.blendWeights[1]; + boneWeights[i].weight2 = vertex.blendWeights[2]; + boneWeights[i].weight3 = vertex.blendWeights[3]; + } + + mesh.vertices = vertices; + mesh.normals = normals; + mesh.uv = uv; + mesh.tangents = tangents; + mesh.boneWeights = boneWeights; + mesh.colors = colors; + + skinnedBindPose = meshAssetData.skinnedBindPose; + + ulong indexCount = meshAssetData.indexCount; + Int16[] indices = new Int16[indexCount]; + IntPtr indexBufferPtr = meshAssetData.indexBuffer; + Marshal.Copy(indexBufferPtr, indices, 0, (int)indexCount); + Int32[] triangles = new Int32[indexCount]; + for (ulong i = 0; i < indexCount; i += 3) + { + triangles[i + 2] = (Int32)indices[i]; + triangles[i + 1] = (Int32)indices[i + 1]; + triangles[i] = (Int32)indices[i + 2]; + } + mesh.triangles = triangles; + + UInt32 jointCount = skinnedBindPose.jointCount; + jointNames = new string[jointCount]; + for (UInt32 i = 0; i < jointCount; i++) + { + jointNames[i] = Marshal.PtrToStringAnsi(skinnedBindPose.jointNames[i]); + } + } + break; + + default: + throw new Exception("Bad Mesh Asset Type"); + } + } + + public SkinnedMeshRenderer CreateSkinnedMeshRendererOnObject(GameObject target) + { + SkinnedMeshRenderer skinnedMeshRenderer = target.AddComponent(); + skinnedMeshRenderer.sharedMesh = mesh; + mesh.name = "AvatarMesh_" + assetID; + UInt32 jointCount = skinnedBindPose.jointCount; + GameObject[] bones = new GameObject[jointCount]; + Transform[] boneTransforms = new Transform[jointCount]; + Matrix4x4[] bindPoses = new Matrix4x4[jointCount]; + for (UInt32 i = 0; i < jointCount; i++) + { + bones[i] = new GameObject(); + boneTransforms[i] = bones[i].transform; + bones[i].name = jointNames[i]; + int parentIndex = skinnedBindPose.jointParents[i]; + if (parentIndex == -1) + { + bones[i].transform.parent = skinnedMeshRenderer.transform; + skinnedMeshRenderer.rootBone = bones[i].transform; + } + else + { + bones[i].transform.parent = bones[parentIndex].transform; + } + + // Set the position relative to the parent + Vector3 position = skinnedBindPose.jointTransform[i].position; + position.z = -position.z; + bones[i].transform.localPosition = position; + + Quaternion orientation = skinnedBindPose.jointTransform[i].orientation; + orientation.x = -orientation.x; + orientation.y = -orientation.y; + bones[i].transform.localRotation = orientation; + + bones[i].transform.localScale = skinnedBindPose.jointTransform[i].scale; + + bindPoses[i] = bones[i].transform.worldToLocalMatrix * skinnedMeshRenderer.transform.localToWorldMatrix; + } + skinnedMeshRenderer.bones = boneTransforms; + mesh.bindposes = bindPoses; + return skinnedMeshRenderer; + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetMesh.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetMesh.cs.meta new file mode 100644 index 0000000..dbd05ea --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetMesh.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 80be643e69fa4a4478a5cb27a190bbd2 +timeCreated: 1475522461 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetTexture.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetTexture.cs new file mode 100644 index 0000000..4026b08 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetTexture.cs @@ -0,0 +1,58 @@ +using System; +using Oculus.Avatar; +using UnityEngine; + +public class OvrAvatarAssetTexture : OvrAvatarAsset { + public Texture2D texture; + + private const int ASTCHeaderSize = 16; + + public OvrAvatarAssetTexture(UInt64 _assetId, IntPtr asset) { + assetID = _assetId; + ovrAvatarTextureAssetData textureAssetData = CAPI.ovrAvatarAsset_GetTextureData(asset); + TextureFormat format; + IntPtr textureData = textureAssetData.textureData; + int textureDataSize = (int)textureAssetData.textureDataSize; + + AvatarLogger.Log( + "OvrAvatarAssetTexture - " + + _assetId + + ": " + + textureAssetData.format.ToString() + + " " + + textureAssetData.sizeX + + "x" + + textureAssetData.sizeY); + + switch (textureAssetData.format) + { + case ovrAvatarTextureFormat.RGB24: + format = TextureFormat.RGB24; + break; + case ovrAvatarTextureFormat.DXT1: + format = TextureFormat.DXT1; + break; + case ovrAvatarTextureFormat.DXT5: + format = TextureFormat.DXT5; + break; + case ovrAvatarTextureFormat.ASTC_RGB_6x6: + format = TextureFormat.ASTC_RGB_6x6; + textureData = new IntPtr(textureData.ToInt64() + ASTCHeaderSize); + textureDataSize -= ASTCHeaderSize; + break; + case ovrAvatarTextureFormat.ASTC_RGB_6x6_MIPMAPS: + format = TextureFormat.ASTC_RGB_6x6; + break; + default: + throw new NotImplementedException( + string.Format("Unsupported texture format {0}", + textureAssetData.format.ToString())); + } + texture = new Texture2D( + (int)textureAssetData.sizeX, (int)textureAssetData.sizeY, + format, textureAssetData.mipCount > 1, + QualitySettings.activeColorSpace == ColorSpace.Gamma ? false : true); + texture.LoadRawTextureData(textureData, textureDataSize); + texture.Apply(true, false); + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetTexture.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetTexture.cs.meta new file mode 100644 index 0000000..d67df96 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarAssetTexture.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8a3167eed50e56346be5b1cc65ad7226 +timeCreated: 1475522480 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarBase.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarBase.cs new file mode 100644 index 0000000..8559fc1 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarBase.cs @@ -0,0 +1,8 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +public class OvrAvatarBase : MonoBehaviour +{ +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarBase.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarBase.cs.meta new file mode 100644 index 0000000..aed70e9 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarBase.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a0e33623ec5372748b5703f61a4df82d +timeCreated: 1477606822 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarBody.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarBody.cs new file mode 100644 index 0000000..3e66aef --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarBody.cs @@ -0,0 +1,11 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +public class OvrAvatarBody : MonoBehaviour +{ + public virtual void UpdatePose(float voiceAmplitude) + { + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarBody.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarBody.cs.meta new file mode 100644 index 0000000..ccb2165 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarBody.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: eb7a6650b6cb46545967d3b380b7396c +timeCreated: 1466814542 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarComponent.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarComponent.cs new file mode 100644 index 0000000..38cd6c7 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarComponent.cs @@ -0,0 +1,153 @@ +using System; +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using Oculus.Avatar; +using System.Threading; + +public class OvrAvatarComponent : MonoBehaviour +{ + + public static readonly string[] LayerKeywords = new[] { "LAYERS_0", "LAYERS_1", "LAYERS_2", "LAYERS_3", "LAYERS_4", "LAYERS_5", "LAYERS_6", "LAYERS_7", "LAYERS_8", }; + public static readonly string[] LayerSampleModeParameters = new[] { "_LayerSampleMode0", "_LayerSampleMode1", "_LayerSampleMode2", "_LayerSampleMode3", "_LayerSampleMode4", "_LayerSampleMode5", "_LayerSampleMode6", "_LayerSampleMode7", }; + public static readonly string[] LayerBlendModeParameters = new[] { "_LayerBlendMode0", "_LayerBlendMode1", "_LayerBlendMode2", "_LayerBlendMode3", "_LayerBlendMode4", "_LayerBlendMode5", "_LayerBlendMode6", "_LayerBlendMode7", }; + public static readonly string[] LayerMaskTypeParameters = new[] { "_LayerMaskType0", "_LayerMaskType1", "_LayerMaskType2", "_LayerMaskType3", "_LayerMaskType4", "_LayerMaskType5", "_LayerMaskType6", "_LayerMaskType7", }; + public static readonly string[] LayerColorParameters = new[] { "_LayerColor0", "_LayerColor1", "_LayerColor2", "_LayerColor3", "_LayerColor4", "_LayerColor5", "_LayerColor6", "_LayerColor7", }; + public static readonly string[] LayerSurfaceParameters = new[] { "_LayerSurface0", "_LayerSurface1", "_LayerSurface2", "_LayerSurface3", "_LayerSurface4", "_LayerSurface5", "_LayerSurface6", "_LayerSurface7", }; + public static readonly string[] LayerSampleParametersParameters = new[] { "_LayerSampleParameters0", "_LayerSampleParameters1", "_LayerSampleParameters2", "_LayerSampleParameters3", "_LayerSampleParameters4", "_LayerSampleParameters5", "_LayerSampleParameters6", "_LayerSampleParameters7", }; + public static readonly string[] LayerMaskParametersParameters = new[] { "_LayerMaskParameters0", "_LayerMaskParameters1", "_LayerMaskParameters2", "_LayerMaskParameters3", "_LayerMaskParameters4", "_LayerMaskParameters5", "_LayerMaskParameters6", "_LayerMaskParameters7", }; + public static readonly string[] LayerMaskAxisParameters = new[] { "_LayerMaskAxis0", "_LayerMaskAxis1", "_LayerMaskAxis2", "_LayerMaskAxis3", "_LayerMaskAxis4", "_LayerMaskAxis5", "_LayerMaskAxis6", "_LayerMaskAxis7", }; + + private Dictionary materialStates = new Dictionary(); + public List RenderParts = new List(); + + private bool DrawSkeleton = false; + private bool FirstMaterialUpdate = true; + + public ulong ClothingAlphaTexture = 0; + public Vector4 ClothingAlphaOffset; + + public void UpdateAvatar(ovrAvatarComponent component, OvrAvatar avatar) + { + OvrAvatar.ConvertTransform(component.transform, transform); + + for (UInt32 renderPartIndex = 0; renderPartIndex < component.renderPartCount; renderPartIndex++) + { + if (RenderParts.Count <= renderPartIndex) + { + break; + } + + OvrAvatarRenderComponent renderComponent = RenderParts[(int)renderPartIndex]; + IntPtr renderPart = OvrAvatar.GetRenderPart(component, renderPartIndex); + ovrAvatarRenderPartType type = CAPI.ovrAvatarRenderPart_GetType(renderPart); + switch (type) + { + case ovrAvatarRenderPartType.SkinnedMeshRender: + ((OvrAvatarSkinnedMeshRenderComponent)renderComponent).UpdateSkinnedMeshRender(this, avatar, renderPart); + break; + case ovrAvatarRenderPartType.SkinnedMeshRenderPBS: + ((OvrAvatarSkinnedMeshRenderPBSComponent)renderComponent).UpdateSkinnedMeshRenderPBS(avatar, renderPart, renderComponent.mesh.sharedMaterial); + break; + case ovrAvatarRenderPartType.ProjectorRender: + ((OvrAvatarProjectorRenderComponent)renderComponent).UpdateProjectorRender(this, CAPI.ovrAvatarRenderPart_GetProjectorRender(renderPart)); + break; + case ovrAvatarRenderPartType.SkinnedMeshRenderPBS_V2: + ((OvrAvatarSkinnedMeshPBSV2RenderComponent)renderComponent).UpdateSkinnedMeshRender(this, avatar, renderPart); + break; + default: + break; + } + } + } + + protected void UpdateActive(OvrAvatar avatar, ovrAvatarVisibilityFlags mask) + { + bool active = avatar.ShowFirstPerson && (mask & ovrAvatarVisibilityFlags.FirstPerson) != 0; + active |= avatar.ShowThirdPerson && (mask & ovrAvatarVisibilityFlags.ThirdPerson) != 0; + this.gameObject.SetActive(active); + } + + public void UpdateAvatarMaterial(Material mat, ovrAvatarMaterialState matState) + { + mat.SetColor("_BaseColor", matState.baseColor); + mat.SetInt("_BaseMaskType", (int)matState.baseMaskType); + mat.SetVector("_BaseMaskParameters", matState.baseMaskParameters); + mat.SetVector("_BaseMaskAxis", matState.baseMaskAxis); + + if (matState.alphaMaskTextureID != 0) + { + mat.SetTexture("_AlphaMask", GetLoadedTexture(matState.alphaMaskTextureID)); + mat.SetTextureScale("_AlphaMask", new Vector2(matState.alphaMaskScaleOffset.x, matState.alphaMaskScaleOffset.y)); + mat.SetTextureOffset("_AlphaMask", new Vector2(matState.alphaMaskScaleOffset.z, matState.alphaMaskScaleOffset.w)); + } + + if (ClothingAlphaTexture != 0) + { + mat.EnableKeyword("VERTALPHA_ON"); + mat.SetTexture("_AlphaMask2", GetLoadedTexture(ClothingAlphaTexture)); + mat.SetTextureScale("_AlphaMask2", new Vector2(ClothingAlphaOffset.x, ClothingAlphaOffset.y)); + mat.SetTextureOffset("_AlphaMask2", new Vector2(ClothingAlphaOffset.z, ClothingAlphaOffset.w)); + } + + if (matState.normalMapTextureID != 0) + { + mat.EnableKeyword("NORMAL_MAP_ON"); + mat.SetTexture("_NormalMap", GetLoadedTexture(matState.normalMapTextureID)); + mat.SetTextureScale("_NormalMap", new Vector2(matState.normalMapScaleOffset.x, matState.normalMapScaleOffset.y)); + mat.SetTextureOffset("_NormalMap", new Vector2(matState.normalMapScaleOffset.z, matState.normalMapScaleOffset.w)); + } + if (matState.parallaxMapTextureID != 0) + { + mat.SetTexture("_ParallaxMap", GetLoadedTexture(matState.parallaxMapTextureID)); + mat.SetTextureScale("_ParallaxMap", new Vector2(matState.parallaxMapScaleOffset.x, matState.parallaxMapScaleOffset.y)); + mat.SetTextureOffset("_ParallaxMap", new Vector2(matState.parallaxMapScaleOffset.z, matState.parallaxMapScaleOffset.w)); + } + if (matState.roughnessMapTextureID != 0) + { + mat.EnableKeyword("ROUGHNESS_ON"); + mat.SetTexture("_RoughnessMap", GetLoadedTexture(matState.roughnessMapTextureID)); + mat.SetTextureScale("_RoughnessMap", new Vector2(matState.roughnessMapScaleOffset.x, matState.roughnessMapScaleOffset.y)); + mat.SetTextureOffset("_RoughnessMap", new Vector2(matState.roughnessMapScaleOffset.z, matState.roughnessMapScaleOffset.w)); + } + mat.EnableKeyword(LayerKeywords[matState.layerCount]); + for (ulong layerIndex = 0; layerIndex < matState.layerCount; layerIndex++) + { + ovrAvatarMaterialLayerState layer = matState.layers[layerIndex]; + + mat.SetInt(LayerSampleModeParameters[layerIndex], (int)layer.sampleMode); + mat.SetInt(LayerBlendModeParameters[layerIndex], (int)layer.blendMode); + mat.SetInt(LayerMaskTypeParameters[layerIndex], (int)layer.maskType); + mat.SetColor(LayerColorParameters[layerIndex], layer.layerColor); + if (layer.sampleMode != ovrAvatarMaterialLayerSampleMode.Color) + { + string surfaceProperty = LayerSurfaceParameters[layerIndex]; + mat.SetTexture(surfaceProperty, GetLoadedTexture(layer.sampleTexture)); + mat.SetTextureScale(surfaceProperty, new Vector2(layer.sampleScaleOffset.x, layer.sampleScaleOffset.y)); + mat.SetTextureOffset(surfaceProperty, new Vector2(layer.sampleScaleOffset.z, layer.sampleScaleOffset.w)); + } + + if (layer.sampleMode == ovrAvatarMaterialLayerSampleMode.Parallax) + { + mat.EnableKeyword("PARALLAX_ON"); + } + + mat.SetColor(LayerSampleParametersParameters[layerIndex], layer.sampleParameters); + mat.SetColor(LayerMaskParametersParameters[layerIndex], layer.maskParameters); + mat.SetColor(LayerMaskAxisParameters[layerIndex], layer.maskAxis); + } + + materialStates[mat] = matState; + } + + public static Texture2D GetLoadedTexture(UInt64 assetId) + { + OvrAvatarAssetTexture tex = (OvrAvatarAssetTexture)OvrAvatarSDKManager.Instance.GetAsset(assetId); + if (tex == null) + { + return null; + } + + return tex.texture; + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarComponent.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarComponent.cs.meta new file mode 100644 index 0000000..7af794e --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarComponent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4d8af585c6ed18849905454f83194043 +timeCreated: 1479155378 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarDriver.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarDriver.cs new file mode 100644 index 0000000..574fc7c --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarDriver.cs @@ -0,0 +1,103 @@ +using UnityEngine; +using System.Collections; +using System; +using Oculus.Avatar; + +public abstract class OvrAvatarDriver : MonoBehaviour { + + public enum PacketMode + { + SDK, + Unity + }; + + + public PacketMode Mode; + protected PoseFrame CurrentPose; + public PoseFrame GetCurrentPose() { return CurrentPose; } + public abstract void UpdateTransforms(IntPtr sdkAvatar); + + public struct ControllerPose + { + public ovrAvatarButton buttons; + public ovrAvatarTouch touches; + public Vector2 joystickPosition; + public float indexTrigger; + public float handTrigger; + public bool isActive; + + public static ControllerPose Interpolate(ControllerPose a, ControllerPose b, float t) + { + return new ControllerPose + { + buttons = t < 0.5f ? a.buttons : b.buttons, + touches = t < 0.5f ? a.touches : b.touches, + joystickPosition = Vector2.Lerp(a.joystickPosition, b.joystickPosition, t), + indexTrigger = Mathf.Lerp(a.indexTrigger, b.indexTrigger, t), + handTrigger = Mathf.Lerp(a.handTrigger, b.handTrigger, t), + isActive = t < 0.5f ? a.isActive : b.isActive, + }; + } + } + + public struct PoseFrame + { + public Vector3 headPosition; + public Quaternion headRotation; + public Vector3 handLeftPosition; + public Quaternion handLeftRotation; + public Vector3 handRightPosition; + public Quaternion handRightRotation; + public float voiceAmplitude; + + public ControllerPose controllerLeftPose; + public ControllerPose controllerRightPose; + + public static PoseFrame Interpolate(PoseFrame a, PoseFrame b, float t) + { + return new PoseFrame + { + headPosition = Vector3.Lerp(a.headPosition, b.headPosition, t), + headRotation = Quaternion.Slerp(a.headRotation, b.headRotation, t), + handLeftPosition = Vector3.Lerp(a.handLeftPosition, b.handLeftPosition, t), + handLeftRotation = Quaternion.Slerp(a.handLeftRotation, b.handLeftRotation, t), + handRightPosition = Vector3.Lerp(a.handRightPosition, b.handRightPosition, t), + handRightRotation = Quaternion.Slerp(a.handRightRotation, b.handRightRotation, t), + voiceAmplitude = Mathf.Lerp(a.voiceAmplitude, b.voiceAmplitude, t), + controllerLeftPose = ControllerPose.Interpolate(a.controllerLeftPose, b.controllerLeftPose, t), + controllerRightPose = ControllerPose.Interpolate(a.controllerRightPose, b.controllerRightPose, t), + }; + } + }; + + protected void UpdateTransformsFromPose(IntPtr sdkAvatar) + { + if (sdkAvatar != IntPtr.Zero) + { + ovrAvatarTransform bodyTransform = OvrAvatar.CreateOvrAvatarTransform(CurrentPose.headPosition, CurrentPose.headRotation); + ovrAvatarHandInputState inputStateLeft = OvrAvatar.CreateInputState(OvrAvatar.CreateOvrAvatarTransform(CurrentPose.handLeftPosition, CurrentPose.handLeftRotation), CurrentPose.controllerLeftPose); + ovrAvatarHandInputState inputStateRight = OvrAvatar.CreateInputState(OvrAvatar.CreateOvrAvatarTransform(CurrentPose.handRightPosition, CurrentPose.handRightRotation), CurrentPose.controllerRightPose); + + CAPI.ovrAvatarPose_UpdateBody(sdkAvatar, bodyTransform); + + if (GetIsTrackedRemote()) + { + CAPI.ovrAvatarPose_UpdateSDK3DofHands(sdkAvatar, inputStateLeft, inputStateRight, GetRemoteControllerType()); + } + else + { + CAPI.ovrAvatarPose_UpdateHands(sdkAvatar, inputStateLeft, inputStateRight); + } + } + } + + public static bool GetIsTrackedRemote() + { + return OVRInput.IsControllerConnected(OVRInput.Controller.RTrackedRemote) || OVRInput.IsControllerConnected(OVRInput.Controller.LTrackedRemote); + } + + private ovrAvatarControllerType GetRemoteControllerType() + { + return OVRPlugin.productName == "Oculus Go" ? ovrAvatarControllerType.Go : ovrAvatarControllerType.Malibu; + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarDriver.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarDriver.cs.meta new file mode 100644 index 0000000..3bdc633 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarDriver.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b0bda905d6cc47640bc17f99e364a1b9 +timeCreated: 1464049373 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarHand.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarHand.cs new file mode 100644 index 0000000..5544634 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarHand.cs @@ -0,0 +1,8 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; + +public class OvrAvatarHand : MonoBehaviour +{ +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarHand.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarHand.cs.meta new file mode 100644 index 0000000..e9773e6 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarHand.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: e53b07ad62d980a4da9fffff0b05fd2e +timeCreated: 1464054646 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarLocalDriver.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarLocalDriver.cs new file mode 100644 index 0000000..f8fd26b --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarLocalDriver.cs @@ -0,0 +1,108 @@ +using UnityEngine; +using System.Collections; +using System; +using System.Collections.Generic; +using Oculus.Avatar; + +public class OvrAvatarLocalDriver : OvrAvatarDriver { + + ControllerPose GetMalibuControllerPose(OVRInput.Controller controller) + { + ovrAvatarButton buttons = 0; + if (OVRInput.Get(OVRInput.Button.PrimaryIndexTrigger, controller)) buttons |= ovrAvatarButton.One; + + return new ControllerPose + { + buttons = buttons, + touches = OVRInput.Get(OVRInput.Touch.PrimaryTouchpad) ? ovrAvatarTouch.One : 0, + joystickPosition = OVRInput.Get(OVRInput.Axis2D.PrimaryTouchpad, controller), + indexTrigger = 0f, + handTrigger = 0f, + isActive = (OVRInput.GetActiveController() & controller) != 0, + }; + } + + float voiceAmplitude = 0.0f; + ControllerPose GetControllerPose(OVRInput.Controller controller) + { + ovrAvatarButton buttons = 0; + if (OVRInput.Get(OVRInput.Button.One, controller)) buttons |= ovrAvatarButton.One; + if (OVRInput.Get(OVRInput.Button.Two, controller)) buttons |= ovrAvatarButton.Two; + if (OVRInput.Get(OVRInput.Button.Start, controller)) buttons |= ovrAvatarButton.Three; + if (OVRInput.Get(OVRInput.Button.PrimaryThumbstick, controller)) buttons |= ovrAvatarButton.Joystick; + + ovrAvatarTouch touches = 0; + if (OVRInput.Get(OVRInput.Touch.One, controller)) touches |= ovrAvatarTouch.One; + if (OVRInput.Get(OVRInput.Touch.Two, controller)) touches |= ovrAvatarTouch.Two; + if (OVRInput.Get(OVRInput.Touch.PrimaryThumbstick, controller)) touches |= ovrAvatarTouch.Joystick; + if (OVRInput.Get(OVRInput.Touch.PrimaryThumbRest, controller)) touches |= ovrAvatarTouch.ThumbRest; + if (OVRInput.Get(OVRInput.Touch.PrimaryIndexTrigger, controller)) touches |= ovrAvatarTouch.Index; + if (!OVRInput.Get(OVRInput.NearTouch.PrimaryIndexTrigger, controller)) touches |= ovrAvatarTouch.Pointing; + if (!OVRInput.Get(OVRInput.NearTouch.PrimaryThumbButtons, controller)) touches |= ovrAvatarTouch.ThumbUp; + + return new ControllerPose + { + buttons = buttons, + touches = touches, + joystickPosition = OVRInput.Get(OVRInput.Axis2D.PrimaryThumbstick, controller), + indexTrigger = OVRInput.Get(OVRInput.Axis1D.PrimaryIndexTrigger, controller), + handTrigger = OVRInput.Get(OVRInput.Axis1D.PrimaryHandTrigger, controller), + isActive = (OVRInput.GetActiveController() & controller) != 0, + }; + } + + private void CalculateCurrentPose() + { +#if UNITY_2017_2_OR_NEWER + Vector3 headPos = UnityEngine.XR.InputTracking.GetLocalPosition(UnityEngine.XR.XRNode.CenterEye); +#else + Vector3 headPos = UnityEngine.VR.InputTracking.GetLocalPosition(UnityEngine.VR.VRNode.CenterEye); +#endif + + if (GetIsTrackedRemote()) + { + CurrentPose = new PoseFrame + { + voiceAmplitude = voiceAmplitude, + headPosition = headPos, +#if UNITY_2017_2_OR_NEWER + headRotation = UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.CenterEye), +#else + headRotation = UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.CenterEye), +#endif + handLeftPosition = OVRInput.GetLocalControllerPosition(OVRInput.Controller.LTrackedRemote), + handLeftRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.LTrackedRemote), + handRightPosition = OVRInput.GetLocalControllerPosition(OVRInput.Controller.RTrackedRemote), + handRightRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.RTrackedRemote), + controllerLeftPose = GetMalibuControllerPose(OVRInput.Controller.LTrackedRemote), + controllerRightPose = GetMalibuControllerPose(OVRInput.Controller.RTrackedRemote), + }; + } + else + { + CurrentPose = new PoseFrame + { + voiceAmplitude = voiceAmplitude, + headPosition = headPos, +#if UNITY_2017_2_OR_NEWER + headRotation = UnityEngine.XR.InputTracking.GetLocalRotation(UnityEngine.XR.XRNode.CenterEye), +#else + headRotation = UnityEngine.VR.InputTracking.GetLocalRotation(UnityEngine.VR.VRNode.CenterEye), +#endif + handLeftPosition = OVRInput.GetLocalControllerPosition(OVRInput.Controller.LTouch), + handLeftRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.LTouch), + handRightPosition = OVRInput.GetLocalControllerPosition(OVRInput.Controller.RTouch), + handRightRotation = OVRInput.GetLocalControllerRotation(OVRInput.Controller.RTouch), + controllerLeftPose = GetControllerPose(OVRInput.Controller.LTouch), + controllerRightPose = GetControllerPose(OVRInput.Controller.RTouch), + }; + } + + } + + public override void UpdateTransforms(IntPtr sdkAvatar) + { + CalculateCurrentPose(); + UpdateTransformsFromPose(sdkAvatar); + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarLocalDriver.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarLocalDriver.cs.meta new file mode 100644 index 0000000..798ef51 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarLocalDriver.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: ac27124318cf8e84aa7350c2ac1cdb80 +timeCreated: 1464049705 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarLogger.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarLogger.cs new file mode 100644 index 0000000..51f4dc3 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarLogger.cs @@ -0,0 +1,38 @@ +using UnityEngine; + +namespace Oculus.Avatar +{ + public static class AvatarLogger + { + public const string LogAvatar = "[Avatars] - "; + public const string Tab = " "; + + [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), + System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_BASIC")] + public static void Log(string logMsg) + { + Debug.Log(LogAvatar + logMsg); + } + + [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), + System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_BASIC")] + public static void Log(string logMsg, Object context) + { + Debug.Log(LogAvatar + logMsg , context); + } + + [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), + System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_WARNING")] + public static void LogWarning(string logMsg) + { + Debug.LogWarning(LogAvatar + logMsg); + } + + [System.Diagnostics.Conditional("ENABLE_AVATAR_LOGS"), + System.Diagnostics.Conditional("ENABLE_AVATAR_LOG_ERROR")] + public static void LogError(string logMsg) + { + Debug.LogError(LogAvatar + logMsg); + } + }; +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarLogger.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarLogger.cs.meta new file mode 100644 index 0000000..073015a --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarLogger.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6d391500bc1e8da42a41ef796dd22ed0 +timeCreated: 1519433181 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarMaterialManager.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarMaterialManager.cs new file mode 100644 index 0000000..d5db298 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarMaterialManager.cs @@ -0,0 +1,354 @@ +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.Rendering; +using Oculus.Avatar; +using System.Collections; + +public class OvrAvatarMaterialManager : MonoBehaviour +{ + // Set up in the Prefab, and meant to be indexed by LOD + public Texture2D[] DiffuseFallbacks; + public Texture2D[] NormalFallbacks; + + private Renderer TargetRenderer; + private AvatarTextureArrayProperties[] TextureArrays; + + private OvrAvatarTextureCopyManager TextureCopyManager; + + public enum TextureType + { + DiffuseTextures = 0, + NormalMaps, + RoughnessMaps, + + Count + } + // Material properties required to render a single component + [System.Serializable] + public struct AvatarComponentMaterialProperties + { + public ovrAvatarBodyPartType TypeIndex; + public Color Color; + public Texture2D[] Textures; + + [Range(0, 1)] public float DiffuseIntensity; + [Range(0, 10)] public float RimIntensity; + [Range(0, 1)] public float BacklightIntensity; + [Range(0, 1)] public float ReflectionIntensity; + } + + // Texture arrays + [System.Serializable] + public struct AvatarTextureArrayProperties + { + public Texture2D[] Textures; + public Texture2DArray TextureArray; + } + + // Material property arrays that are pushed to the shader + [System.Serializable] + public struct AvatarMaterialPropertyBlock + { + public Vector4[] Colors; + public float[] DiffuseIntensities; + public float[] RimIntensities; + public float[] BacklightIntensities; + public float[] ReflectionIntensities; + } + + private readonly string[] TextureTypeToShaderProperties = + { + "_MainTex", // TextureType.DiffuseTextures = 0 + "_NormalMap", // TextureType.NormalMaps + "_RoughnessMap" // TextureType.RoughnessMaps + }; + + public Color[] BodyColorTints; + public List ReflectionProbes = new List(); + + // Container class for all the data relating to an avatar material description + [System.Serializable] + public class AvatarMaterialConfig + { + public AvatarComponentMaterialProperties[] ComponentMaterialProperties; + public AvatarMaterialPropertyBlock MaterialPropertyBlock; + } + + // Local config that this manager instance will render + public AvatarMaterialConfig LocalAvatarConfig; + // Default avatar config used to initially populate the locally managed avatar config + public AvatarMaterialConfig DefaultAvatarConfig; + + // Property block for pushing to shader + private AvatarMaterialPropertyBlock LocalAvatarMaterialPropertyBlock; + + public static int RENDER_QUEUE = 3640; + + // Shader properties + public static string AVATAR_SHADER_COMBINED = "OvrAvatar/Avatar_Mobile_CombinedMesh"; + public static string AVATAR_SHADER_LOADER = "OvrAvatar/Avatar_Mobile_Loader"; + public static string AVATAR_SHADER_MAINTEX = "_MainTex"; + public static string AVATAR_SHADER_NORMALMAP = "_NormalMap"; + public static string AVATAR_SHADER_ROUGHNESSMAP = "_RoughnessMap"; + public static string AVATAR_SHADER_COLOR = "_BaseColor"; + public static string AVATAR_SHADER_DIFFUSEINTENSITY = "_DiffuseIntensity"; + public static string AVATAR_SHADER_RIMINTENSITY = "_RimIntensity"; + public static string AVATAR_SHADER_BACKLIGHTINTENSITY = "_BacklightIntensity"; + public static string AVATAR_SHADER_REFLECTIONINTENSITY = "_ReflectionIntensity"; + public static string AVATAR_SHADER_CUBEMAP = "_Cubemap"; + public static string AVATAR_SHADER_ALPHA = "_Alpha"; + public static string AVATAR_SHADER_LOADING_DIMMER = "_LoadingDimmer"; + + // Loading animation + private const float LOADING_ANIMATION_AMPLITUDE = 0.5f; + private const float LOADING_ANIMATION_PERIOD = 0.35f; + private const float LOADING_ANIMATION_CURVE_SCALE = 0.25f; + private const float LOADING_ANIMATION_DIMMER_MIN = 0.3f; + + void Awake() + { + TextureCopyManager = gameObject.AddComponent(); + } + + public void CreateTextureArrays() + { + const int componentCount = (int)ovrAvatarBodyPartType.Count; + const int textureTypeCount = (int)TextureType.Count; + + for (int index = 0; index < componentCount; index++) + { + LocalAvatarConfig.ComponentMaterialProperties[index].Textures = new Texture2D[textureTypeCount]; + DefaultAvatarConfig.ComponentMaterialProperties[index].Textures = new Texture2D[textureTypeCount]; + } + + TextureArrays = new AvatarTextureArrayProperties[textureTypeCount]; + } + + public void SetRenderer(Renderer renderer) + { + TargetRenderer = renderer; + TargetRenderer.GetClosestReflectionProbes(ReflectionProbes); + } + + public void OnCombinedMeshReady() + { + InitTextureArrays(); + SetMaterialPropertyBlock(); + StartCoroutine(RunLoadingAnimation()); + } + + // Prepare texture arrays and copy to GPU + public void InitTextureArrays() + { + var localProps = LocalAvatarConfig.ComponentMaterialProperties[0]; + + for (int i = 0; i < TextureArrays.Length && i < localProps.Textures.Length; i++) + { + TextureArrays[i].TextureArray = new Texture2DArray( + localProps.Textures[0].height, localProps.Textures[0].width, + LocalAvatarConfig.ComponentMaterialProperties.Length, + localProps.Textures[0].format, + true, + QualitySettings.activeColorSpace == ColorSpace.Gamma ? false : true + ) { filterMode = FilterMode.Trilinear }; + + TextureArrays[i].Textures + = new Texture2D[LocalAvatarConfig.ComponentMaterialProperties.Length]; + + for (int j = 0; j < LocalAvatarConfig.ComponentMaterialProperties.Length; j++) + { + TextureArrays[i].Textures[j] + = LocalAvatarConfig.ComponentMaterialProperties[j].Textures[i]; + } + + ProcessTexturesWithMips( + TextureArrays[i].Textures, + localProps.Textures[i].height, + TextureArrays[i].TextureArray); + } + } + + private void ProcessTexturesWithMips( + Texture2D[] textures, + int texArrayResolution, + Texture2DArray texArray) + { + for (int i = 0; i < textures.Length; i++) + { + int currentMipSize = texArrayResolution; + int correctNumberOfMips = textures[i].mipmapCount - 1; + + // Add mips to copyTexture queue in low-high order from correctNumberOfMips..0 + for (int mipLevel = correctNumberOfMips; mipLevel >= 0; mipLevel--) + { + int mipSize = texArrayResolution / currentMipSize; + TextureCopyManager.CopyTexture( + textures[i], + texArray, + mipLevel, + mipSize, + i, + true); + + currentMipSize /= 2; + } + } + } + + private void SetMaterialPropertyBlock() + { + if (TargetRenderer != null) + { + for (int i = 0; i < LocalAvatarConfig.ComponentMaterialProperties.Length; i++) + { + LocalAvatarConfig.MaterialPropertyBlock.Colors[i] + = LocalAvatarConfig.ComponentMaterialProperties[i].Color; + LocalAvatarConfig.MaterialPropertyBlock.DiffuseIntensities[i] + = LocalAvatarConfig.ComponentMaterialProperties[i].DiffuseIntensity; + LocalAvatarConfig.MaterialPropertyBlock.RimIntensities[i] + = LocalAvatarConfig.ComponentMaterialProperties[i].RimIntensity; + LocalAvatarConfig.MaterialPropertyBlock.BacklightIntensities[i] + = LocalAvatarConfig.ComponentMaterialProperties[i].BacklightIntensity; + LocalAvatarConfig.MaterialPropertyBlock.ReflectionIntensities[i] + = LocalAvatarConfig.ComponentMaterialProperties[i].ReflectionIntensity; + } + } + } + + private void ApplyMaterialPropertyBlock() + { + MaterialPropertyBlock materialPropertyBlock = new MaterialPropertyBlock(); + materialPropertyBlock.SetVectorArray(AVATAR_SHADER_COLOR, + LocalAvatarConfig.MaterialPropertyBlock.Colors); + materialPropertyBlock.SetFloatArray(AVATAR_SHADER_DIFFUSEINTENSITY, + LocalAvatarConfig.MaterialPropertyBlock.DiffuseIntensities); + materialPropertyBlock.SetFloatArray(AVATAR_SHADER_RIMINTENSITY, + LocalAvatarConfig.MaterialPropertyBlock.RimIntensities); + materialPropertyBlock.SetFloatArray(AVATAR_SHADER_BACKLIGHTINTENSITY, + LocalAvatarConfig.MaterialPropertyBlock.BacklightIntensities); + materialPropertyBlock.SetFloatArray(AVATAR_SHADER_REFLECTIONINTENSITY, + LocalAvatarConfig.MaterialPropertyBlock.ReflectionIntensities); + TargetRenderer.GetClosestReflectionProbes(ReflectionProbes); + + if (ReflectionProbes != null && ReflectionProbes.Count > 0 && ReflectionProbes[0].probe.texture != null) + { + materialPropertyBlock.SetTexture(AVATAR_SHADER_CUBEMAP, ReflectionProbes[0].probe.texture); + } + + for (int i = 0; i < TextureArrays.Length; i++) + { + materialPropertyBlock.SetTexture(TextureTypeToShaderProperties[i], + TextureArrays[(int)(TextureType)i].TextureArray); + } + + TargetRenderer.SetPropertyBlock(materialPropertyBlock); + } + + // Return a component type based on name + public static ovrAvatarBodyPartType GetComponentType(string objectName) + { + if (objectName.Contains("0")) + { + return ovrAvatarBodyPartType.Body; + } + else if (objectName.Contains("1")) + { + return ovrAvatarBodyPartType.Clothing; + } + else if (objectName.Contains("2")) + { + return ovrAvatarBodyPartType.Eyewear; + } + else if (objectName.Contains("3")) + { + return ovrAvatarBodyPartType.Hair; + } + else if (objectName.Contains("4")) + { + return ovrAvatarBodyPartType.Beard; + } + + return ovrAvatarBodyPartType.Count; + } + + public void ValidateTextures() + { + var props = LocalAvatarConfig.ComponentMaterialProperties; + + int[] heights = new int[(int)TextureType.Count]; + TextureFormat[] formats = new TextureFormat[(int)TextureType.Count]; + + for (var propIndex = 0; propIndex < props.Length; propIndex++) + { + for (var index = 0; index < props[propIndex].Textures.Length; index++) + { + if (props[propIndex].Textures[index] == null) + { + throw new System.Exception( + props[propIndex].TypeIndex.ToString() + + "Invalid: " + + ((TextureType)index).ToString()); + } + + heights[index] = props[propIndex].Textures[index].height; + formats[index] = props[propIndex].Textures[index].format; + } + } + + for (int textureIndex = 0; textureIndex < (int)TextureType.Count; textureIndex++) + { + for (var propIndex = 1; propIndex < props.Length; propIndex++) + { + if (props[propIndex - 1].Textures[textureIndex].height + != props[propIndex].Textures[textureIndex].height) + { + throw new System.Exception( + props[propIndex].TypeIndex.ToString() + + " Mismatching Resolutions: " + + ((TextureType)textureIndex).ToString() + + " " + + props[propIndex - 1].Textures[textureIndex].height + + " vs " + + props[propIndex].Textures[textureIndex].height + + " Ensure you are using ASTC texture compression on Android or turn off CombineMeshes"); + } + + if (props[propIndex - 1].Textures[textureIndex].format + != props[propIndex].Textures[textureIndex].format) + { + throw new System.Exception( + props[propIndex].TypeIndex.ToString() + + " Mismatching Formats: " + + ((TextureType)textureIndex).ToString() + + " Ensure you are using ASTC texture compression on Android or turn off CombineMeshes"); + } + } + } + } + + // Loading animation on the Dimmer properyt + // Smooth sine lerp every 0.3 seconds between 0.25 and 0.5 + private IEnumerator RunLoadingAnimation() + { + // Set the material to single component while the avatar loads + int renderQueue = TargetRenderer.sharedMaterial.renderQueue; + TargetRenderer.sharedMaterial.shader = Shader.Find(AVATAR_SHADER_LOADER); + TargetRenderer.sharedMaterial.renderQueue = renderQueue; + TargetRenderer.sharedMaterial.SetColor(AVATAR_SHADER_COLOR, Color.white); + + while (TextureCopyManager.GetTextureCount() > 0) + { + float distance = (LOADING_ANIMATION_AMPLITUDE * Mathf.Sin(Time.timeSinceLevelLoad / LOADING_ANIMATION_PERIOD) + + LOADING_ANIMATION_AMPLITUDE) * (LOADING_ANIMATION_CURVE_SCALE) + LOADING_ANIMATION_DIMMER_MIN; + TargetRenderer.sharedMaterial.SetFloat(AVATAR_SHADER_LOADING_DIMMER, distance); + yield return null; + } + // Restore render order and swap the combined material + renderQueue = TargetRenderer.sharedMaterial.renderQueue; + TargetRenderer.sharedMaterial.SetFloat(AVATAR_SHADER_LOADING_DIMMER, 1f); + TargetRenderer.sharedMaterial.shader = Shader.Find(AVATAR_SHADER_COMBINED); + TargetRenderer.sharedMaterial.renderQueue = renderQueue; + + ApplyMaterialPropertyBlock(); + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarMaterialManager.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarMaterialManager.cs.meta new file mode 100644 index 0000000..52e5819 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarMaterialManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: a139d83bf6796734db220df8a5bfacbd +timeCreated: 1518209612 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarMeshInstance.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarMeshInstance.cs new file mode 100644 index 0000000..cb65193 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarMeshInstance.cs @@ -0,0 +1,180 @@ +using UnityEngine; +using System; +using Oculus.Avatar; +using System.Collections.Generic; + +public class OvrAvatarMeshInstance : MonoBehaviour +{ + HashSet AssetsToLoad; + + public UInt64 MeshID = 0; + UInt64 MaterialID = 0; + UInt64 FadeTextureID = 0; + public ovrAvatarBodyPartType MeshType; + public ovrAvatarMaterialState MaterialState; + MeshFilter Mesh; + MeshRenderer MeshInstance; + + public void AssetLoadedCallback(OvrAvatarAsset asset) + { + AssetsToLoad.Remove(asset.assetID); + HandleAssetAvailable(asset); + + if (AssetsToLoad.Count <= 0) + { + UpdateMaterial(); + } + } + + public void SetMeshAssets(UInt64 fadeTexture, UInt64 meshID, UInt64 materialID, ovrAvatarBodyPartType type) + { + MaterialID = materialID; + MeshID = meshID; + FadeTextureID = fadeTexture; + MeshType = type; + + AssetsToLoad = new HashSet(); + + RequestAsset(meshID); + RequestAsset(materialID); + RequestAsset(fadeTexture); + } + + private void HandleAssetAvailable(OvrAvatarAsset asset) + { + if (asset.assetID == MeshID) + { + Mesh = gameObject.AddComponent(); + MeshInstance = gameObject.AddComponent(); + MeshInstance.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; + Mesh.sharedMesh = ((OvrAvatarAssetMesh)asset).mesh; + + Material mat = new Material(Shader.Find("OvrAvatar/AvatarSurfaceShaderSelfOccluding")); + MeshInstance.material = mat; + } + + if (asset.assetID == MaterialID) + { + MaterialState = ((OvrAvatarAssetMaterial)asset).material; + MaterialState.alphaMaskTextureID = FadeTextureID; + RequestMaterialTextures(); + } + } + + public void ChangeMaterial(UInt64 assetID) + { + MaterialID = assetID; + RequestAsset(MaterialID); + } + + private void RequestAsset(UInt64 assetID) + { + if (assetID == 0) + { + return; + } + + OvrAvatarAsset asset = OvrAvatarSDKManager.Instance.GetAsset(assetID); + if (asset == null) + { + OvrAvatarSDKManager.Instance.BeginLoadingAsset(assetID, ovrAvatarAssetLevelOfDetail.Medium, this.AssetLoadedCallback); + AssetsToLoad.Add(assetID); + } + else + { + HandleAssetAvailable(asset); + } + } + + private void RequestMaterialTextures() + { + RequestAsset(MaterialState.normalMapTextureID); + RequestAsset(MaterialState.parallaxMapTextureID); + RequestAsset(MaterialState.roughnessMapTextureID); + + for (var layerIndex = 0; layerIndex < MaterialState.layerCount; layerIndex++) + { + RequestAsset(MaterialState.layers[layerIndex].sampleTexture); + } + } + + public void SetActive(bool active) + { + gameObject.SetActive(active); + + if (active) + { + UpdateMaterial(); + } + } + + private void UpdateMaterial() + { + if (MeshInstance == null || MaterialID == 0) + { + return; + } + + var mat = MeshInstance.material; + var matState = MaterialState; + + mat.SetColor("_BaseColor", matState.baseColor); + mat.SetInt("_BaseMaskType", (int)matState.baseMaskType); + mat.SetVector("_BaseMaskParameters", matState.baseMaskParameters); + mat.SetVector("_BaseMaskAxis", matState.baseMaskAxis); + + if (matState.alphaMaskTextureID != 0) + { + mat.SetTexture("_AlphaMask", OvrAvatarComponent.GetLoadedTexture(matState.alphaMaskTextureID)); + mat.SetTextureScale("_AlphaMask", new Vector2(matState.alphaMaskScaleOffset.x, matState.alphaMaskScaleOffset.y)); + mat.SetTextureOffset("_AlphaMask", new Vector2(matState.alphaMaskScaleOffset.z, matState.alphaMaskScaleOffset.w)); + } + + if (matState.normalMapTextureID != 0) + { + mat.EnableKeyword("NORMAL_MAP_ON"); + mat.SetTexture("_NormalMap", OvrAvatarComponent.GetLoadedTexture(matState.normalMapTextureID)); + mat.SetTextureScale("_NormalMap", new Vector2(matState.normalMapScaleOffset.x, matState.normalMapScaleOffset.y)); + mat.SetTextureOffset("_NormalMap", new Vector2(matState.normalMapScaleOffset.z, matState.normalMapScaleOffset.w)); + } + if (matState.parallaxMapTextureID != 0) + { + mat.SetTexture("_ParallaxMap", OvrAvatarComponent.GetLoadedTexture(matState.parallaxMapTextureID)); + mat.SetTextureScale("_ParallaxMap", new Vector2(matState.parallaxMapScaleOffset.x, matState.parallaxMapScaleOffset.y)); + mat.SetTextureOffset("_ParallaxMap", new Vector2(matState.parallaxMapScaleOffset.z, matState.parallaxMapScaleOffset.w)); + } + if (matState.roughnessMapTextureID != 0) + { + mat.EnableKeyword("ROUGHNESS_ON"); + mat.SetTexture("_RoughnessMap", OvrAvatarComponent.GetLoadedTexture(matState.roughnessMapTextureID)); + mat.SetTextureScale("_RoughnessMap", new Vector2(matState.roughnessMapScaleOffset.x, matState.roughnessMapScaleOffset.y)); + mat.SetTextureOffset("_RoughnessMap", new Vector2(matState.roughnessMapScaleOffset.z, matState.roughnessMapScaleOffset.w)); + } + mat.EnableKeyword(OvrAvatarComponent.LayerKeywords[matState.layerCount]); + for (ulong layerIndex = 0; layerIndex < matState.layerCount; layerIndex++) + { + ovrAvatarMaterialLayerState layer = matState.layers[layerIndex]; + + mat.SetInt(OvrAvatarComponent.LayerSampleModeParameters[layerIndex], (int)layer.sampleMode); + mat.SetInt(OvrAvatarComponent.LayerBlendModeParameters[layerIndex], (int)layer.blendMode); + mat.SetInt(OvrAvatarComponent.LayerMaskTypeParameters[layerIndex], (int)layer.maskType); + mat.SetColor(OvrAvatarComponent.LayerColorParameters[layerIndex], layer.layerColor); + if (layer.sampleMode != ovrAvatarMaterialLayerSampleMode.Color) + { + string surfaceProperty = OvrAvatarComponent.LayerSurfaceParameters[layerIndex]; + mat.SetTexture(surfaceProperty, OvrAvatarComponent.GetLoadedTexture(layer.sampleTexture)); + mat.SetTextureScale(surfaceProperty, new Vector2(layer.sampleScaleOffset.x, layer.sampleScaleOffset.y)); + mat.SetTextureOffset(surfaceProperty, new Vector2(layer.sampleScaleOffset.z, layer.sampleScaleOffset.w)); + } + + if (layer.sampleMode == ovrAvatarMaterialLayerSampleMode.Parallax) + { + mat.EnableKeyword("PARALLAX_ON"); + } + + mat.SetColor(OvrAvatarComponent.LayerSampleParametersParameters[layerIndex], layer.sampleParameters); + mat.SetColor(OvrAvatarComponent.LayerMaskParametersParameters[layerIndex], layer.maskParameters); + mat.SetColor(OvrAvatarComponent.LayerMaskAxisParameters[layerIndex], layer.maskAxis); + } + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarMeshInstance.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarMeshInstance.cs.meta new file mode 100644 index 0000000..6d0bb21 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarMeshInstance.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: b826904b5b22c3d42b56ca245ec8a58b +timeCreated: 1493063917 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarPacket.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarPacket.cs new file mode 100644 index 0000000..c9f368a --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarPacket.cs @@ -0,0 +1,231 @@ +using UnityEngine; +using System.Collections; +using System.IO; +using System.Collections.Generic; +using System; + +public class OvrAvatarPacket +{ + // Used with SDK driven packet flow + public IntPtr ovrNativePacket = IntPtr.Zero; + + // =============================================================== + // All code below used for unity only pose blending option. + // =============================================================== + List frameTimes = new List(); + List frames = new List(); + List encodedAudioPackets = new List(); + + public float Duration { get { return frameTimes[frameTimes.Count - 1]; } } + public OvrAvatarDriver.PoseFrame FinalFrame { get { return frames[frames.Count - 1]; } } + + public OvrAvatarPacket() + { + } + + public OvrAvatarPacket(OvrAvatarDriver.PoseFrame initialPose) + { + frameTimes.Add(0.0f); + frames.Add(initialPose); + } + + OvrAvatarPacket(List frameTimes, List frames, List audioPackets) + { + this.frameTimes = frameTimes; + this.frames = frames; + } + + public void AddFrame(OvrAvatarDriver.PoseFrame frame, float deltaSeconds) + { + frameTimes.Add(Duration + deltaSeconds); + frames.Add(frame); + } + + public OvrAvatarDriver.PoseFrame GetPoseFrame(float seconds) + { + if (frames.Count == 1) + { + return frames[0]; + } + + // This can be replaced with a more efficient binary search + int tailIndex = 1; + while (tailIndex < frameTimes.Count && frameTimes[tailIndex] < seconds) + { + ++tailIndex; + } + OvrAvatarDriver.PoseFrame a = frames[tailIndex - 1]; + OvrAvatarDriver.PoseFrame b = frames[tailIndex]; + float aTime = frameTimes[tailIndex - 1]; + float bTime = frameTimes[tailIndex]; + float t = (seconds - aTime) / (bTime - aTime); + return OvrAvatarDriver.PoseFrame.Interpolate(a, b, t); + } + + public static OvrAvatarPacket Read(Stream stream) + { + BinaryReader reader = new BinaryReader(stream); + + // Todo: bounds check frame count + int frameCount = reader.ReadInt32(); + List frameTimes = new List(frameCount); + for (int i = 0; i < frameCount; ++i) + { + frameTimes.Add(reader.ReadSingle()); + } + List frames = new List(frameCount); + for (int i = 0; i < frameCount; ++i) + { + frames.Add(reader.ReadPoseFrame()); + } + + // Todo: bounds check audio packet count + int audioPacketCount = reader.ReadInt32(); + List audioPackets = new List(audioPacketCount); + for (int i = 0; i < audioPacketCount; ++i) + { + int audioPacketSize = reader.ReadInt32(); + byte[] audioPacket = reader.ReadBytes(audioPacketSize); + audioPackets.Add(audioPacket); + } + + return new OvrAvatarPacket(frameTimes, frames, audioPackets); + } + + public void Write(Stream stream) + { + BinaryWriter writer = new BinaryWriter(stream); + + // Write all of the frames + int frameCount = frameTimes.Count; + writer.Write(frameCount); + for (int i = 0; i < frameCount; ++i) + { + writer.Write(frameTimes[i]); + } + for (int i = 0; i < frameCount; ++i) + { + OvrAvatarDriver.PoseFrame frame = frames[i]; + writer.Write(frame); + } + + // Write all of the encoded audio packets + int audioPacketCount = encodedAudioPackets.Count; + writer.Write(audioPacketCount); + for (int i = 0; i < audioPacketCount; ++i) + { + byte[] packet = encodedAudioPackets[i]; + writer.Write(packet.Length); + writer.Write(packet); + } + } +} + +static class BinaryWriterExtensions +{ + public static void Write(this BinaryWriter writer, OvrAvatarDriver.PoseFrame frame) + { + writer.Write(frame.headPosition); + writer.Write(frame.headRotation); + writer.Write(frame.handLeftPosition); + writer.Write(frame.handLeftRotation); + writer.Write(frame.handRightPosition); + writer.Write(frame.handRightRotation); + writer.Write(frame.voiceAmplitude); + + writer.Write(frame.controllerLeftPose); + writer.Write(frame.controllerRightPose); + } + + public static void Write(this BinaryWriter writer, Vector3 vec3) + { + writer.Write(vec3.x); + writer.Write(vec3.y); + writer.Write(vec3.z); + } + + public static void Write(this BinaryWriter writer, Vector2 vec2) + { + writer.Write(vec2.x); + writer.Write(vec2.y); + } + + public static void Write(this BinaryWriter writer, Quaternion quat) + { + writer.Write(quat.x); + writer.Write(quat.y); + writer.Write(quat.z); + writer.Write(quat.w); + } + public static void Write(this BinaryWriter writer, OvrAvatarDriver.ControllerPose pose) + { + writer.Write((uint)pose.buttons); + writer.Write((uint)pose.touches); + writer.Write(pose.joystickPosition); + writer.Write(pose.indexTrigger); + writer.Write(pose.handTrigger); + writer.Write(pose.isActive); + } +} + +static class BinaryReaderExtensions +{ + public static OvrAvatarDriver.PoseFrame ReadPoseFrame(this BinaryReader reader) + { + return new OvrAvatarDriver.PoseFrame + { + headPosition = reader.ReadVector3(), + headRotation = reader.ReadQuaternion(), + handLeftPosition = reader.ReadVector3(), + handLeftRotation = reader.ReadQuaternion(), + handRightPosition = reader.ReadVector3(), + handRightRotation = reader.ReadQuaternion(), + voiceAmplitude = reader.ReadSingle(), + + controllerLeftPose = reader.ReadControllerPose(), + controllerRightPose = reader.ReadControllerPose(), + }; + } + + public static Vector2 ReadVector2(this BinaryReader reader) + { + return new Vector2 + { + x = reader.ReadSingle(), + y = reader.ReadSingle() + }; + } + + public static Vector3 ReadVector3(this BinaryReader reader) + { + return new Vector3 + { + x = reader.ReadSingle(), + y = reader.ReadSingle(), + z = reader.ReadSingle() + }; + } + + public static Quaternion ReadQuaternion(this BinaryReader reader) + { + return new Quaternion + { + x = reader.ReadSingle(), + y = reader.ReadSingle(), + z = reader.ReadSingle(), + w = reader.ReadSingle(), + }; + } + public static OvrAvatarDriver.ControllerPose ReadControllerPose(this BinaryReader reader) + { + return new OvrAvatarDriver.ControllerPose + { + buttons = (ovrAvatarButton)reader.ReadUInt32(), + touches = (ovrAvatarTouch)reader.ReadUInt32(), + joystickPosition = reader.ReadVector2(), + indexTrigger = reader.ReadSingle(), + handTrigger = reader.ReadSingle(), + isActive = reader.ReadBoolean(), + }; + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarPacket.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarPacket.cs.meta new file mode 100644 index 0000000..d9ad05f --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarPacket.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 3b7dd866fbed2654e838d772129dc70c +timeCreated: 1464197799 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarProjectorRenderComponent.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarProjectorRenderComponent.cs new file mode 100644 index 0000000..492971c --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarProjectorRenderComponent.cs @@ -0,0 +1,65 @@ +using UnityEngine; +using System.Collections; +using System; +using System.Collections.Generic; + +public class OvrAvatarProjectorRenderComponent : OvrAvatarRenderComponent { + + Material material; + + internal void InitializeProjectorRender(ovrAvatarRenderPart_ProjectorRender render, Shader shader, OvrAvatarRenderComponent target) + { + if (shader == null) + { + shader = Shader.Find("OvrAvatar/AvatarSurfaceShader"); + } + + material = CreateAvatarMaterial(gameObject.name + "_projector", shader); + material.EnableKeyword("PROJECTOR_ON"); + + Renderer renderer = target.GetComponent(); + if (renderer != null) + { + List materials = new List(renderer.sharedMaterials); + materials.Add(material); + renderer.sharedMaterials = materials.ToArray(); + } + } + + internal void UpdateProjectorRender(OvrAvatarComponent component, ovrAvatarRenderPart_ProjectorRender render) + { + OvrAvatar.ConvertTransform(render.localTransform, this.transform); + material.SetMatrix("_ProjectorWorldToLocal", this.transform.worldToLocalMatrix); + component.UpdateAvatarMaterial(material, render.materialState); + + } + + void OnDrawGizmos() + { + Vector3 v000 = transform.localToWorldMatrix.MultiplyPoint(new Vector3(-1.0f, -1.0f, -1.0f)); + Vector3 v100 = transform.localToWorldMatrix.MultiplyPoint(new Vector3(+1.0f, -1.0f, -1.0f)); + Vector3 v010 = transform.localToWorldMatrix.MultiplyPoint(new Vector3(-1.0f, +1.0f, -1.0f)); + Vector3 v110 = transform.localToWorldMatrix.MultiplyPoint(new Vector3(+1.0f, +1.0f, -1.0f)); + Vector3 v001 = transform.localToWorldMatrix.MultiplyPoint(new Vector3(-1.0f, -1.0f, +1.0f)); + Vector3 v101 = transform.localToWorldMatrix.MultiplyPoint(new Vector3(+1.0f, -1.0f, +1.0f)); + Vector3 v011 = transform.localToWorldMatrix.MultiplyPoint(new Vector3(-1.0f, +1.0f, +1.0f)); + Vector3 v111 = transform.localToWorldMatrix.MultiplyPoint(new Vector3(+1.0f, +1.0f, +1.0f)); + + Gizmos.color = Color.gray; + + Gizmos.DrawLine(v000, v100); + Gizmos.DrawLine(v000, v010); + Gizmos.DrawLine(v010, v110); + Gizmos.DrawLine(v100, v110); + + Gizmos.DrawLine(v000, v001); + Gizmos.DrawLine(v100, v101); + Gizmos.DrawLine(v010, v011); + Gizmos.DrawLine(v110, v111); + + Gizmos.DrawLine(v001, v101); + Gizmos.DrawLine(v001, v011); + Gizmos.DrawLine(v011, v111); + Gizmos.DrawLine(v101, v111); + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarProjectorRenderComponent.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarProjectorRenderComponent.cs.meta new file mode 100644 index 0000000..ee3e911 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarProjectorRenderComponent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: f909beaa7f33f914b90f9addaedcae18 +timeCreated: 1479156352 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarRemoteDriver.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarRemoteDriver.cs new file mode 100644 index 0000000..13a0472 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarRemoteDriver.cs @@ -0,0 +1,121 @@ +using UnityEngine; +using System.Collections; +using System; +using System.Collections.Generic; +using Oculus.Avatar; + +public class OvrAvatarRemoteDriver : OvrAvatarDriver +{ + Queue packetQueue = new Queue(); + + IntPtr CurrentSDKPacket = IntPtr.Zero; + float CurrentPacketTime = 0f; + + const int MinPacketQueue = 1; + const int MaxPacketQueue = 4; + + int CurrentSequence = -1; + + // Used for legacy Unity only packet blending + bool isStreaming = false; + OvrAvatarPacket currentPacket = null; + + public void QueuePacket(int sequence, OvrAvatarPacket packet) + { + if (sequence > CurrentSequence) + { + CurrentSequence = sequence; + packetQueue.Enqueue(packet); + } + } + + public override void UpdateTransforms(IntPtr sdkAvatar) + { + switch(Mode) + { + case PacketMode.SDK: + UpdateFromSDKPacket(sdkAvatar); + break; + case PacketMode.Unity: + UpdateFromUnityPacket(sdkAvatar); + break; + default: + break; + } + } + + private void UpdateFromSDKPacket(IntPtr sdkAvatar) + { + + if (CurrentSDKPacket == IntPtr.Zero && packetQueue.Count >= MinPacketQueue) + { + CurrentSDKPacket = packetQueue.Dequeue().ovrNativePacket; + } + + if (CurrentSDKPacket != IntPtr.Zero) + { + float PacketDuration = CAPI.ovrAvatarPacket_GetDurationSeconds(CurrentSDKPacket); + CAPI.ovrAvatar_UpdatePoseFromPacket(sdkAvatar, CurrentSDKPacket, Mathf.Min(PacketDuration, CurrentPacketTime)); + CurrentPacketTime += Time.deltaTime; + + if (CurrentPacketTime > PacketDuration) + { + CAPI.ovrAvatarPacket_Free(CurrentSDKPacket); + CurrentSDKPacket = IntPtr.Zero; + CurrentPacketTime = CurrentPacketTime - PacketDuration; + + //Throw away packets deemed too old. + while (packetQueue.Count > MaxPacketQueue) + { + packetQueue.Dequeue(); + } + } + } + } + + private void UpdateFromUnityPacket(IntPtr sdkAvatar) + { + // If we're not currently streaming, check to see if we've buffered enough + if (!isStreaming && packetQueue.Count > MinPacketQueue) + { + currentPacket = packetQueue.Dequeue(); + isStreaming = true; + } + + // If we are streaming, update our pose + if (isStreaming) + { + CurrentPacketTime += Time.deltaTime; + + // If we've elapsed past our current packet, advance + while (CurrentPacketTime > currentPacket.Duration) + { + + // If we're out of packets, stop streaming and + // lock to the final frame + if (packetQueue.Count == 0) + { + CurrentPose = currentPacket.FinalFrame; + CurrentPacketTime = 0.0f; + currentPacket = null; + isStreaming = false; + return; + } + + while (packetQueue.Count > MaxPacketQueue) + { + packetQueue.Dequeue(); + } + + // Otherwise, dequeue the next packet + CurrentPacketTime -= currentPacket.Duration; + currentPacket = packetQueue.Dequeue(); + } + + // Compute the pose based on our current time offset in the packet + CurrentPose = currentPacket.GetPoseFrame(CurrentPacketTime); + + UpdateTransformsFromPose(sdkAvatar); + } + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarRemoteDriver.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarRemoteDriver.cs.meta new file mode 100644 index 0000000..c38a754 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarRemoteDriver.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: c198a42a3843ca04fa633b60f428ff51 +timeCreated: 1464302604 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarRenderComponent.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarRenderComponent.cs new file mode 100644 index 0000000..4b94d7f --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarRenderComponent.cs @@ -0,0 +1,109 @@ +using UnityEngine; +using System.Collections; +using System.Collections.Generic; +using System; +using Oculus.Avatar; + +public class OvrAvatarRenderComponent : MonoBehaviour { + + private bool firstSkinnedUpdate = true; + public SkinnedMeshRenderer mesh; + public Transform[] bones; + + protected void UpdateActive(OvrAvatar avatar, ovrAvatarVisibilityFlags mask) + { + bool active = avatar.ShowFirstPerson && (mask & ovrAvatarVisibilityFlags.FirstPerson) != 0; + active |= avatar.ShowThirdPerson && (mask & ovrAvatarVisibilityFlags.ThirdPerson) != 0; + this.gameObject.SetActive(active); + } + + protected SkinnedMeshRenderer CreateSkinnedMesh(ulong assetID, ovrAvatarVisibilityFlags visibilityMask, int thirdPersonLayer, int firstPersonLayer, int sortingOrder) + { + OvrAvatarAssetMesh meshAsset = (OvrAvatarAssetMesh)OvrAvatarSDKManager.Instance.GetAsset(assetID); + if (meshAsset == null) + { + throw new Exception("Couldn't find mesh for asset " + assetID); + } + if ((visibilityMask & ovrAvatarVisibilityFlags.ThirdPerson) != 0) + { + this.gameObject.layer = thirdPersonLayer; + } + else + { + this.gameObject.layer = firstPersonLayer; + } + SkinnedMeshRenderer renderer = meshAsset.CreateSkinnedMeshRendererOnObject(gameObject); + renderer.quality = SkinQuality.Bone4; + renderer.sortingOrder = sortingOrder; + renderer.updateWhenOffscreen = true; + if ((visibilityMask & ovrAvatarVisibilityFlags.SelfOccluding) == 0) + { + renderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; + } + return renderer; + } + + protected void UpdateSkinnedMesh(OvrAvatar avatar, Transform[] bones, ovrAvatarTransform localTransform, ovrAvatarVisibilityFlags visibilityMask, IntPtr renderPart) + { + UpdateActive(avatar, visibilityMask); + OvrAvatar.ConvertTransform(localTransform, this.transform); + ovrAvatarRenderPartType type = CAPI.ovrAvatarRenderPart_GetType(renderPart); + UInt64 dirtyJoints; + switch (type) + { + case ovrAvatarRenderPartType.SkinnedMeshRender: + dirtyJoints = CAPI.ovrAvatarSkinnedMeshRender_GetDirtyJoints(renderPart); + break; + case ovrAvatarRenderPartType.SkinnedMeshRenderPBS: + dirtyJoints = CAPI.ovrAvatarSkinnedMeshRenderPBS_GetDirtyJoints(renderPart); + break; + case ovrAvatarRenderPartType.SkinnedMeshRenderPBS_V2: + dirtyJoints = CAPI.ovrAvatarSkinnedMeshRenderPBSV2_GetDirtyJoints(renderPart); + break; + default: + throw new Exception("Unhandled render part type: " + type); + } + for (UInt32 i = 0; i < 64; i++) + { + UInt64 dirtyMask = (ulong)1 << (int)i; + // We need to make sure that we fully update the initial position of + // Skinned mesh renderers, then, thereafter, we can only update dirty joints + if ((firstSkinnedUpdate && i < bones.Length) || + (dirtyMask & dirtyJoints) != 0) + { + //This joint is dirty and needs to be updated + Transform targetBone = bones[i]; + ovrAvatarTransform transform; + switch (type) + { + case ovrAvatarRenderPartType.SkinnedMeshRender: + transform = CAPI.ovrAvatarSkinnedMeshRender_GetJointTransform(renderPart, i); + break; + case ovrAvatarRenderPartType.SkinnedMeshRenderPBS: + transform = CAPI.ovrAvatarSkinnedMeshRenderPBS_GetJointTransform(renderPart, i); + break; + case ovrAvatarRenderPartType.SkinnedMeshRenderPBS_V2: + transform = CAPI.ovrAvatarSkinnedMeshRenderPBSV2_GetJointTransform(renderPart, i); + break; + default: + throw new Exception("Unhandled render part type: " + type); + } + OvrAvatar.ConvertTransform(transform, targetBone); + } + } + firstSkinnedUpdate = false; + } + + protected Material CreateAvatarMaterial(string name, Shader shader) + { + if (shader == null) + { + throw new Exception("No shader provided for avatar material."); + } + Material mat = new Material(shader); + mat.name = name; + return mat; + } + + +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarRenderComponent.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarRenderComponent.cs.meta new file mode 100644 index 0000000..f1d51b3 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarRenderComponent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 6a9e8691abb99884880df5ecada5e4d8 +timeCreated: 1479155394 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKCAPI.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKCAPI.cs new file mode 100644 index 0000000..e15bda4 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKCAPI.cs @@ -0,0 +1,1059 @@ +using UnityEngine; +using System; +using System.Runtime.InteropServices; +using Oculus.Avatar; + +//This needs to be the csharp equivalent of ovrAvatarCapabilities in OVR_Avatar.h +[Flags] +public enum ovrAvatarCapabilities +{ + Body = 1 << 0, + Hands = 1 << 1, + Base = 1 << 2, + BodyTilt = 1 << 4, + All = -1 +}; + +// This needs to be the csharp equivalent of ovrAvatarMessageType in OVR_Avatar.h +public enum ovrAvatarMessageType { + AvatarSpecification, + AssetLoaded, + Count +}; + +// This needs to be the csharp equivalent of ovrAvatarMessage_AvatarSpecification in OVR_Avatar.h +public struct ovrAvatarMessage_AvatarSpecification { + public IntPtr avatarSpec; //ovrAvatarSpecification*, opaque pointer + public UInt64 oculusUserID; +}; + +// This needs to be the csharp equivalent of ovrAvatarMessage_AssetLoaded in OVR_Avatar.h +public struct ovrAvatarMessage_AssetLoaded { + public UInt64 assetID; + public IntPtr asset; //ovrAvatarAsset*, opaque pointer +}; + +// This needs to be the csharp equivalent of ovrAvatarAssetType in OVR_Avatar.h +public enum ovrAvatarAssetType { + Mesh, + Texture, + Pose, + Material, + CombinedMesh, + PBSMaterial, + Count +}; + +// This needs to be the csharp equivalent of ovrAvatarMeshVertex in OVR_Avatar.h +public struct ovrAvatarMeshVertex +{ + public float x; + public float y; + public float z; + public float nx; + public float ny; + public float nz; + public float tx; + public float ty; + public float tz; + public float tw; + public float u; + public float v; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] blendIndices; ///< Indices into the bind pose + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public float[] blendWeights; ///< Blend weights for each component in the bind pose +}; + +// This needs to be the csharp equivalent of ovrAvatarMeshVertex in OVR_Avatar.h +public struct ovrAvatarMeshVertexV2 +{ + public float x; + public float y; + public float z; + public float nx; + public float ny; + public float nz; + public float tx; + public float ty; + public float tz; + public float tw; + public float u; + public float v; + public float r; + public float g; + public float b; + public float a; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] blendIndices; ///< Indices into the bind pose + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public float[] blendWeights; ///< Blend weights for each component in the bind pose +}; + + +// This needs to be the csharp equivalent of ovrAvatarMeshAssetData in OVR_Avatar.h +public struct ovrAvatarMeshAssetData +{ + public UInt32 vertexCount; + public IntPtr vertexBuffer; //const ovrAvatarMeshVertex* + public UInt32 indexCount; + public IntPtr indexBuffer; //const uint16t* + public ovrAvatarSkinnedMeshPose skinnedBindPose; +}; + +/// Mesh Asset Data V2 +/// +public struct ovrAvatarMeshAssetDataV2 +{ + public UInt32 vertexCount; + public IntPtr vertexBuffer; //const ovrAvatarMeshVertexV2* + public UInt32 indexCount; + public IntPtr indexBuffer; //const uint16t* + public ovrAvatarSkinnedMeshPose skinnedBindPose; +}; + +// This needs to be the csharp equivalent of ovrAvatarTextureFormat in OVR_Avatar.h +public enum ovrAvatarTextureFormat { + RGB24, + DXT1, + DXT5, + ASTC_RGB_6x6, + ASTC_RGB_6x6_MIPMAPS, + Count +}; + +// This needs to be the csharp equivalent of ovrAvatarTextureAssetData in OVR_Avatar.h +public struct ovrAvatarTextureAssetData { + public ovrAvatarTextureFormat format; + public UInt32 sizeX; + public UInt32 sizeY; + public UInt32 mipCount; + public UInt64 textureDataSize; + public IntPtr textureData; // const uint8_t* +}; + +// This needs to be the csharp equivalent of ovrAvatarRenderPartType in OVR_Avatar.h +public enum ovrAvatarRenderPartType +{ + SkinnedMeshRender, + SkinnedMeshRenderPBS, + ProjectorRender, + SkinnedMeshRenderPBS_V2, + Count +}; + +// This needs to be the csharp equivalent of ovrAvatarTransform in OVR_Avatar.h +public struct ovrAvatarTransform +{ + public Vector3 position; + public Quaternion orientation; + public Vector3 scale; +}; + +// This needs to be the csharp equivalent of ovrAvatarButton in OVR_Avatar.h +[Flags] +public enum ovrAvatarButton +{ + One = 0x0001, + Two = 0x0002, + Three = 0x0004, + Joystick = 0x0008, +} + +// This needs to be the csharp equivalent of ovrAvatarTouch in OVR_Avatar.h +[Flags] +public enum ovrAvatarTouch +{ + One = 0x0001, + Two = 0x0002, + Joystick = 0x0004, + ThumbRest = 0x0008, + Index = 0x0010, + Pointing = 0x0040, + ThumbUp = 0x0080, +} + +// This needs to be the csharp equivalent of ovrAvatarHandInputState in OVR_Avatar.h +public struct ovrAvatarHandInputState +{ + public ovrAvatarTransform transform; + public ovrAvatarButton buttonMask; + public ovrAvatarTouch touchMask; + public float joystickX; + public float joystickY; + public float indexTrigger; + public float handTrigger; + [MarshalAs(UnmanagedType.I1)] + public bool isActive; +}; + +// This needs to be the csharp equivalent of ovrAvatarComponent in OVR_Avatar.h +public struct ovrAvatarComponent +{ + public ovrAvatarTransform transform; + public UInt32 renderPartCount; + public IntPtr renderParts; //const ovrAvatarRenderPart* const* + + [MarshalAs(UnmanagedType.LPStr)] + public string name; +}; + +// This needs to be the csharp equivalent of ovrAvatarBodyComponent in OVR_Avatar.h +public struct ovrAvatarBaseComponent +{ + public Vector3 basePosition; + public IntPtr renderComponent; //const ovrAvatarComponent* +}; + +// This needs to be the csharp equivalent of ovrAvatarBodyComponent in OVR_Avatar.h +public struct ovrAvatarBodyComponent { + public ovrAvatarTransform leftEyeTransform; + public ovrAvatarTransform rightEyeTransform; + public ovrAvatarTransform centerEyeTransform; + public IntPtr renderComponent; //const ovrAvatarComponent* +}; + +// This needs to be the csharp equivalent of ovrAvatarControllerComponent in OVR_Avatar.h +public struct ovrAvatarControllerComponent +{ + public ovrAvatarHandInputState inputState; + public IntPtr renderComponent; //const ovrAvatarComponent* +}; + +// This needs to be the csharp equivalent of ovrAvatarHandComponent in OVR_Avatar.h +public struct ovrAvatarHandComponent { + public ovrAvatarHandInputState inputState; + public IntPtr renderComponent; //const ovrAvatarComponent* +}; + +// This needs to be the csharp equivalent of ovrAvatarMaterialLayerBlendMode in OVR_Avatar.h +public enum ovrAvatarMaterialLayerBlendMode{ + Add, + Multiply, + Count +}; + +// This needs to be the csharp equivalent of ovrAvatarMaterialLayerSampleMode in OVR_Avatar.h +public enum ovrAvatarMaterialLayerSampleMode{ + Color, + Texture, + TextureSingleChannel, + Parallax, + Count +}; + +// This needs to be the csharp equivalent of ovrAvatarMaterialLayerMaskType in OVR_Avatar.h +public enum ovrAvatarMaterialMaskType{ + None, + Positional, + ViewReflection, + Fresnel, + Pulse, + Count +}; + +// This needs to be the csharp equivalent of Controller Types from OVR_Avatar.h +public enum ovrAvatarControllerType +{ + Touch, + Malibu, + Go, + + Count, +}; + +public enum ovrAvatarAssetLevelOfDetail +{ + Lowest = 1, + Medium = 3, + Highest = 5, +}; + +public enum ovrAvatarLookAndFeelVersion +{ + Unknown = -1, + One = 0, + Two = 1, +}; + +// This needs to be the csharp equivalent of ovrAvatarMaterialLayerState in OVR_Avatar.h +public struct ovrAvatarMaterialLayerState{ + public ovrAvatarMaterialLayerBlendMode blendMode; + public ovrAvatarMaterialLayerSampleMode sampleMode; + public ovrAvatarMaterialMaskType maskType; + public Vector4 layerColor; + public Vector4 sampleParameters; + public UInt64 sampleTexture; + public Vector4 sampleScaleOffset; + public Vector4 maskParameters; + public Vector4 maskAxis; + + static bool VectorEquals(Vector4 a, Vector4 b) + { + return a.x == b.x && a.y == b.y && a.z == b.z && a.w == b.w; + } + + public override bool Equals(object obj) + { + if (!(obj is ovrAvatarMaterialLayerState)) + { + return false; + } + ovrAvatarMaterialLayerState other = (ovrAvatarMaterialLayerState)obj; + if (blendMode != other.blendMode) return false; + if (sampleMode != other.sampleMode) return false; + if (maskType != other.maskType) return false; + if (!VectorEquals(layerColor, other.layerColor)) return false; + if (!VectorEquals(sampleParameters, other.sampleParameters)) return false; + if (sampleTexture != other.sampleTexture) return false; + if (!VectorEquals(sampleScaleOffset, other.sampleScaleOffset)) return false; + if (!VectorEquals(maskParameters, other.maskParameters)) return false; + if (!VectorEquals(maskAxis, other.maskAxis)) return false; + return true; + } + public override int GetHashCode() + { + return blendMode.GetHashCode() ^ + sampleMode.GetHashCode() ^ + maskType.GetHashCode() ^ + layerColor.GetHashCode() ^ + sampleParameters.GetHashCode() ^ + sampleTexture.GetHashCode() ^ + sampleScaleOffset.GetHashCode() ^ + maskParameters.GetHashCode() ^ + maskAxis.GetHashCode(); + } +}; + +// This needs to be the csharp equivalent of ovrAvatarMaterialState in OVR_Avatar.h +public struct ovrAvatarMaterialState +{ + public Vector4 baseColor; + public ovrAvatarMaterialMaskType baseMaskType; + public Vector4 baseMaskParameters; + public Vector4 baseMaskAxis; + public ovrAvatarMaterialLayerSampleMode sampleMode; + public UInt64 alphaMaskTextureID; + public Vector4 alphaMaskScaleOffset; + public UInt64 normalMapTextureID; + public Vector4 normalMapScaleOffset; + public UInt64 parallaxMapTextureID; + public Vector4 parallaxMapScaleOffset; + public UInt64 roughnessMapTextureID; + public Vector4 roughnessMapScaleOffset; + public UInt32 layerCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public ovrAvatarMaterialLayerState[] layers; + + static bool VectorEquals(Vector4 a, Vector4 b) + { + return a.x == b.x && a.y == b.y && a.z == b.z && a.w == b.w; + } + + public override bool Equals(object obj) + { + if (!(obj is ovrAvatarMaterialState)) + { + return false; + } + ovrAvatarMaterialState other = (ovrAvatarMaterialState)obj; + if (!VectorEquals(baseColor, other.baseColor)) return false; + if (baseMaskType != other.baseMaskType) return false; + if (!VectorEquals(baseMaskParameters, other.baseMaskParameters)) return false; + if (!VectorEquals(baseMaskAxis, other.baseMaskAxis)) return false; + if (sampleMode != other.sampleMode) return false; + if (alphaMaskTextureID != other.alphaMaskTextureID) return false; + if (!VectorEquals(alphaMaskScaleOffset, other.alphaMaskScaleOffset)) return false; + if (normalMapTextureID != other.normalMapTextureID) return false; + if (!VectorEquals(normalMapScaleOffset, other.normalMapScaleOffset)) return false; + if (parallaxMapTextureID != other.parallaxMapTextureID) return false; + if (!VectorEquals(parallaxMapScaleOffset, other.parallaxMapScaleOffset)) return false; + if (roughnessMapTextureID != other.roughnessMapTextureID) return false; + if (!VectorEquals(roughnessMapScaleOffset, other.roughnessMapScaleOffset)) return false; + if (layerCount != other.layerCount) return false; + for (int i = 0; i < layerCount; ++i) + { + if (!layers[i].Equals(other.layers[i])) return false; + } + return true; + } + + public override int GetHashCode() + { + int hash = 0; + hash ^= baseColor.GetHashCode(); + hash ^= baseMaskType.GetHashCode(); + hash ^= baseMaskParameters.GetHashCode(); + hash ^= baseMaskAxis.GetHashCode(); + hash ^= sampleMode.GetHashCode(); + hash ^= alphaMaskTextureID.GetHashCode(); + hash ^= alphaMaskScaleOffset.GetHashCode(); + hash ^= normalMapTextureID.GetHashCode(); + hash ^= normalMapScaleOffset.GetHashCode(); + hash ^= parallaxMapTextureID.GetHashCode(); + hash ^= parallaxMapScaleOffset.GetHashCode(); + hash ^= roughnessMapTextureID.GetHashCode(); + hash ^= roughnessMapScaleOffset.GetHashCode(); + hash ^= layerCount.GetHashCode(); + for (int i = 0; i < layerCount; ++i) + { + hash ^= layers[i].GetHashCode(); + } + return hash; + } +}; + +public struct ovrAvatarPBSMaterialState +{ + public Vector4 baseColor; ///< Underlying base color for the material + public UInt64 albedoTextureID; ///< Texture id for the albedo map + public Vector4 albedoMultiplier; ///< Multiplier for albedo texture sample + public UInt64 metallicnessTextureID; ///< Texture id for the metal map + public float glossinessScale; ///< Glossiness factor + public UInt64 normalTextureID; ///< Texture id for the normal map + public UInt64 heightTextureID; ///< Texture id for the height map + public UInt64 occlusionTextureID; ///< Texture id for the occlusion map + public UInt64 emissionTextureID; ///< Texture id for the emission map + public Vector4 emissionMultiplier; ///< Multiplier for emission texture sample + public UInt64 detailMaskTextureID; ///< Texture id for the detail mask map + public UInt64 detailAlbedoTextureID; ///< Texture id for the detail albedo map + public UInt64 detailNormalTextureID; ///< Texture id for the detail normal map + static bool VectorEquals(Vector4 a, Vector4 b) + { + return a.x == b.x && a.y == b.y && a.z == b.z && a.w == b.w; + } + + public override bool Equals(object obj) + { + if (!(obj is ovrAvatarPBSMaterialState)) + { + return false; + } + ovrAvatarPBSMaterialState other = (ovrAvatarPBSMaterialState)obj; + if (!VectorEquals(baseColor, other.baseColor)) return false; + if (albedoTextureID != other.albedoTextureID) return false; + if (!VectorEquals(albedoMultiplier, other.albedoMultiplier)) return false; + if (metallicnessTextureID != other.metallicnessTextureID) return false; + if (glossinessScale != other.glossinessScale) return false; + if (normalTextureID != other.normalTextureID) return false; + if (heightTextureID != other.heightTextureID) return false; + if (occlusionTextureID != other.occlusionTextureID) return false; + if (emissionTextureID != other.emissionTextureID) return false; + if (!VectorEquals(emissionMultiplier, other.emissionMultiplier)) return false; + if (detailMaskTextureID != other.detailMaskTextureID) return false; + if (detailAlbedoTextureID != other.detailAlbedoTextureID) return false; + if (detailNormalTextureID != other.detailNormalTextureID) return false; + return true; + } + public override int GetHashCode() + { + return baseColor.GetHashCode() ^ + albedoTextureID.GetHashCode() ^ + albedoMultiplier.GetHashCode() ^ + metallicnessTextureID.GetHashCode() ^ + glossinessScale.GetHashCode() ^ + normalTextureID.GetHashCode() ^ + heightTextureID.GetHashCode() ^ + occlusionTextureID.GetHashCode() ^ + emissionTextureID.GetHashCode() ^ + emissionMultiplier.GetHashCode() ^ + detailMaskTextureID.GetHashCode() ^ + detailAlbedoTextureID.GetHashCode() ^ + detailNormalTextureID.GetHashCode(); + } +}; + +public class OvrAvatarAssetMaterial : OvrAvatarAsset +{ + public OvrAvatarAssetMaterial(UInt64 id, IntPtr mat) + { + assetID = id; + material = CAPI.ovrAvatarAsset_GetMaterialState(mat); + } + + public ovrAvatarMaterialState material; +} +// This needs to be the csharp equivalent of ovrAvatarSkinnedMeshPose in OVR_Avatar.h +public struct ovrAvatarSkinnedMeshPose +{ + public UInt32 jointCount; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + public ovrAvatarTransform[] jointTransform; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + public int[] jointParents; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] + public IntPtr[] jointNames; //const char * jointNames[64]; +}; + + +[Flags] +public enum ovrAvatarVisibilityFlags +{ + FirstPerson = 1 << 0, + ThirdPerson = 1 << 1, + SelfOccluding = 1 << 2, +}; + +// This needs to be the csharp equivalent of ovrAvatarRenderPart_SkinnedMeshRender in OVR_Avatar.h +public struct ovrAvatarRenderPart_SkinnedMeshRender +{ + public ovrAvatarTransform localTransform; + public ovrAvatarVisibilityFlags visibilityMask; + public UInt64 meshAssetID; + public ovrAvatarMaterialState materialState; + public ovrAvatarSkinnedMeshPose skinnedPose; +}; + +// This needs to be the csharp equivalent of ovrAvatarRenderPart_SkinnedMeshRenderPBS in OVR_Avatar.h +public struct ovrAvatarRenderPart_SkinnedMeshRenderPBS +{ + public ovrAvatarTransform localTransform; + public ovrAvatarVisibilityFlags visibilityMask; + public UInt64 meshAssetID; + public UInt64 albedoTextureAssetID; + public UInt64 surfaceTextureAssetID; + public ovrAvatarSkinnedMeshPose skinnedPose; +}; + +// This needs to be the csharp equivalent of ovrAvatarRenderPart_ProjectorRender in OVR_Avatar.h +public struct ovrAvatarRenderPart_ProjectorRender +{ + public ovrAvatarTransform localTransform; + public UInt32 componentIndex; + public UInt32 renderPartIndex; + public ovrAvatarMaterialState materialState; +}; + +// This needs to be the csharp equivalent of ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2 in OVR_Avatar.h +public struct ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2 +{ + public ovrAvatarTransform localTransform; + public ovrAvatarVisibilityFlags visibilityMask; + public UInt64 meshAssetID; + public ovrAvatarPBSMaterialState materialState; + public ovrAvatarSkinnedMeshPose skinnedPose; +}; + +// This needs to be the csharp equivalent of ovrAvatarHandGesture in OVR_Avatar.h +public enum ovrAvatarHandGesture { + Default, + GripSphere, + GripCube, + Count +}; + +public enum ovrAvatarBodyPartType +{ + Body, + Clothing, + Eyewear, + Hair, + Beard, + Count +}; + +namespace Oculus.Avatar +{ + public class CAPI + { +#if UNITY_ANDROID && !UNITY_EDITOR + private const string LibFile = "ovravatarloader"; + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_InitializeAndroidUnity(string appID); +#else + private const string LibFile = "libovravatar"; + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_Initialize(string appID); +#endif + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_Shutdown(); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr ovrAvatarMessage_Pop(); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarMessageType ovrAvatarMessage_GetType(IntPtr msg); + + public static ovrAvatarMessage_AvatarSpecification ovrAvatarMessage_GetAvatarSpecification( + IntPtr msg) + { + IntPtr ptr = ovrAvatarMessage_GetAvatarSpecification_Native(msg); + return (ovrAvatarMessage_AvatarSpecification)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarMessage_AvatarSpecification)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarMessage_GetAvatarSpecification")] + private static extern IntPtr ovrAvatarMessage_GetAvatarSpecification_Native(IntPtr msg); + + public static ovrAvatarMessage_AssetLoaded ovrAvatarMessage_GetAssetLoaded( + IntPtr msg) + { + IntPtr ptr = ovrAvatarMessage_GetAssetLoaded_Native(msg); + return (ovrAvatarMessage_AssetLoaded)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarMessage_AssetLoaded)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarMessage_GetAssetLoaded")] + private static extern IntPtr ovrAvatarMessage_GetAssetLoaded_Native(IntPtr msg); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarMessage_Free(IntPtr msg); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr ovrAvatarSpecificationRequest_Create(UInt64 userID); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarSpecificationRequest_Destroy(IntPtr specificationRequest); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarSpecificationRequest_SetCombineMeshes(IntPtr specificationRequest, bool useCombinedMesh); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarSpecificationRequest_SetLookAndFeelVersion(IntPtr specificationRequest, ovrAvatarLookAndFeelVersion version); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarSpecificationRequest_SetLevelOfDetail(IntPtr specificationRequest, ovrAvatarAssetLevelOfDetail lod); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_RequestAvatarSpecification(UInt64 userID); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_RequestAvatarSpecificationFromSpecRequest(IntPtr specificationRequest); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr ovrAvatar_Create(IntPtr avatarSpecification, + ovrAvatarCapabilities capabilities); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_Destroy(IntPtr avatar); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarPose_UpdateBody( + IntPtr avatar, ovrAvatarTransform headPose); + + public static void ovrAvatarPose_UpdateVoiceVisualization( + IntPtr avatar, float[] pcmData) + { + ovrAvatarPose_UpdateVoiceVisualization_Native( + avatar, (UInt32)pcmData.Length, pcmData); + } + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarPose_UpdateVoiceVisualization")] + private static extern void ovrAvatarPose_UpdateVoiceVisualization_Native( + IntPtr avatar, UInt32 pcmDataSize, [In] float[] pcmData); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarPose_UpdateHands( + IntPtr avatar, + ovrAvatarHandInputState inputStateLeft, + ovrAvatarHandInputState inputStateRight); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarPose_Update3DofHands( + IntPtr avatar, + IntPtr inputStateLeft, + IntPtr inputStateRight, + ovrAvatarControllerType type); + + public static void ovrAvatarPose_UpdateSDK3DofHands( + IntPtr avatar, + ovrAvatarHandInputState inputStateLeft, + ovrAvatarHandInputState inputStateRight, + ovrAvatarControllerType type) + { + System.IntPtr leftPtr = Marshal.AllocHGlobal(Marshal.SizeOf(inputStateLeft)); + System.IntPtr rightPtr = Marshal.AllocHGlobal(Marshal.SizeOf(inputStateRight)); + Marshal.StructureToPtr(inputStateLeft, leftPtr, false); + Marshal.StructureToPtr(inputStateRight, rightPtr, false); + + ovrAvatar_SetLeftControllerVisibility(avatar, true); + ovrAvatar_SetRightControllerVisibility(avatar, true); + ovrAvatar_SetLeftHandVisibility(avatar, true); + ovrAvatar_SetRightHandVisibility(avatar, true); + ovrAvatarPose_Update3DofHands(avatar, leftPtr, rightPtr, type); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarPose_Finalize(IntPtr avatar, float elapsedSeconds); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_SetLeftControllerVisibility(IntPtr avatar, bool show); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_SetRightControllerVisibility(IntPtr avatar, bool show); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_SetLeftHandVisibility(IntPtr avatar, bool show); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_SetRightHandVisibility(IntPtr avatar, bool show); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt32 ovrAvatarComponent_Count(IntPtr avatar); + + public static ovrAvatarComponent ovrAvatarComponent_Get( + IntPtr avatar, UInt32 index) + { + IntPtr ptr = ovrAvatarComponent_Get_Native(avatar, index); + return (ovrAvatarComponent)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarComponent)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarComponent_Get")] + public static extern IntPtr ovrAvatarComponent_Get_Native(IntPtr avatar, UInt32 index); + + public static ovrAvatarBaseComponent? ovrAvatarPose_GetBaseComponent( + IntPtr avatar) + { + IntPtr ptr = ovrAvatarPose_GetBaseComponent_Native(avatar); + return ptr == IntPtr.Zero + ? (ovrAvatarBaseComponent?)null + : (ovrAvatarBaseComponent)Marshal.PtrToStructure(ptr, typeof(ovrAvatarBaseComponent)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarPose_GetBaseComponent")] + private static extern IntPtr ovrAvatarPose_GetBaseComponent_Native(IntPtr avatar); + + public static ovrAvatarBodyComponent? ovrAvatarPose_GetBodyComponent( + IntPtr avatar) + { + IntPtr ptr = ovrAvatarPose_GetBodyComponent_Native(avatar); + return ptr == IntPtr.Zero + ? (ovrAvatarBodyComponent?)null + : (ovrAvatarBodyComponent)Marshal.PtrToStructure(ptr, typeof(ovrAvatarBodyComponent)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarPose_GetBodyComponent")] + private static extern IntPtr ovrAvatarPose_GetBodyComponent_Native(IntPtr avatar); + + public static ovrAvatarControllerComponent? ovrAvatarPose_GetLeftControllerComponent( + IntPtr avatar) + { + IntPtr ptr = ovrAvatarPose_GetLeftControllerComponent_Native(avatar); + return ptr == IntPtr.Zero + ? (ovrAvatarControllerComponent?)null + : (ovrAvatarControllerComponent)Marshal.PtrToStructure(ptr, typeof(ovrAvatarControllerComponent)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarPose_GetLeftControllerComponent")] + private static extern IntPtr ovrAvatarPose_GetLeftControllerComponent_Native(IntPtr avatar); + + public static ovrAvatarControllerComponent? ovrAvatarPose_GetRightControllerComponent( + IntPtr avatar) + { + IntPtr ptr = ovrAvatarPose_GetRightControllerComponent_Native(avatar); + return ptr == IntPtr.Zero + ? (ovrAvatarControllerComponent?)null + : (ovrAvatarControllerComponent)Marshal.PtrToStructure(ptr, typeof(ovrAvatarControllerComponent)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarPose_GetRightControllerComponent")] + private static extern IntPtr ovrAvatarPose_GetRightControllerComponent_Native(IntPtr avatar); + + public static ovrAvatarHandComponent? ovrAvatarPose_GetLeftHandComponent( + IntPtr avatar) + { + IntPtr ptr = ovrAvatarPose_GetLeftHandComponent_Native(avatar); + return ptr == IntPtr.Zero + ? (ovrAvatarHandComponent?)null + : (ovrAvatarHandComponent)Marshal.PtrToStructure(ptr, typeof(ovrAvatarHandComponent)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarPose_GetLeftHandComponent")] + private static extern IntPtr ovrAvatarPose_GetLeftHandComponent_Native(IntPtr avatar); + + public static ovrAvatarHandComponent? ovrAvatarPose_GetRightHandComponent( + IntPtr avatar) + { + IntPtr ptr = ovrAvatarPose_GetRightHandComponent_Native(avatar); + return ptr == IntPtr.Zero + ? (ovrAvatarHandComponent?)null + : (ovrAvatarHandComponent)Marshal.PtrToStructure(ptr, typeof(ovrAvatarHandComponent)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarPose_GetRightHandComponent")] + private static extern IntPtr ovrAvatarPose_GetRightHandComponent_Native(IntPtr avatar); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarAsset_BeginLoading(UInt64 assetID); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern bool ovrAvatarAsset_BeginLoadingLOD(UInt64 assetId, ovrAvatarAssetLevelOfDetail lod); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarAssetType ovrAvatarAsset_GetType(IntPtr assetHandle); + + public static ovrAvatarMeshAssetData ovrAvatarAsset_GetMeshData( + IntPtr assetPtr) + { + IntPtr ptr = ovrAvatarAsset_GetMeshData_Native(assetPtr); + return (ovrAvatarMeshAssetData)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarMeshAssetData)); + } + + public static ovrAvatarMeshAssetDataV2 ovrAvatarAsset_GetCombinedMeshData( + IntPtr assetPtr) + { + IntPtr ptr = ovrAvatarAsset_GetCombinedMeshData_Native(assetPtr); + return (ovrAvatarMeshAssetDataV2)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarMeshAssetDataV2)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatarAsset_GetCombinedMeshData")] + private static extern IntPtr ovrAvatarAsset_GetCombinedMeshData_Native(IntPtr assetPtr); + + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatarAsset_GetMeshData")] + private static extern IntPtr ovrAvatarAsset_GetMeshData_Native(IntPtr assetPtr); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr ovrAvatarAsset_GetAvatar(IntPtr assetHandle); + + public static UInt64[] ovrAvatarAsset_GetCombinedMeshIDs(IntPtr assetHandle) + { + UInt32 count = 0; + System.IntPtr countPtr = Marshal.AllocHGlobal(Marshal.SizeOf(count)); + IntPtr idBuffer = ovrAvatarAsset_GetCombinedMeshIDs_Native(assetHandle, countPtr); + count = (UInt32)Marshal.PtrToStructure(countPtr, typeof(UInt32)); + UInt64[] meshIDs = new UInt64[count]; + + for (int i = 0; i < count; i++) + { + meshIDs[i] = (UInt64)Marshal.ReadInt64(idBuffer, i * Marshal.SizeOf(typeof(UInt64))); + } + + return meshIDs; + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatarAsset_GetCombinedMeshIDs")] + public static extern IntPtr ovrAvatarAsset_GetCombinedMeshIDs_Native(IntPtr assetHandle, IntPtr count); + + public static void ovrAvatar_GetCombinedMeshAlphaData(IntPtr avatar, ref UInt64 textureID, ref Vector4 offset) + { + System.IntPtr textureIDPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(UInt64))); + System.IntPtr offsetPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Vector4))); + + ovrAvatar_GetCombinedMeshAlphaData_Native(avatar, textureIDPtr, offsetPtr); + + textureID = (UInt64)Marshal.PtrToStructure(textureIDPtr, typeof(UInt64)); + offset = (Vector4)Marshal.PtrToStructure(offsetPtr, typeof(Vector4)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatar_GetCombinedMeshAlphaData")] + public static extern IntPtr ovrAvatar_GetCombinedMeshAlphaData_Native(IntPtr avatar, IntPtr textureIDPtr, IntPtr offsetPtr); + + public static ovrAvatarTextureAssetData ovrAvatarAsset_GetTextureData( + IntPtr assetPtr) + { + IntPtr ptr = ovrAvatarAsset_GetTextureData_Native(assetPtr); + return (ovrAvatarTextureAssetData)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarTextureAssetData)); + } + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarAsset_GetTextureData")] + private static extern IntPtr ovrAvatarAsset_GetTextureData_Native(IntPtr assetPtr); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = + "ovrAvatarAsset_GetMaterialData")] + private static extern IntPtr ovrAvatarAsset_GetMaterialData_Native(IntPtr assetPtr); + public static ovrAvatarMaterialState ovrAvatarAsset_GetMaterialState(IntPtr assetPtr) + { + IntPtr ptr = ovrAvatarAsset_GetMaterialData_Native(assetPtr); + return (ovrAvatarMaterialState)Marshal.PtrToStructure(ptr, typeof(ovrAvatarMaterialState)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarRenderPartType ovrAvatarRenderPart_GetType(IntPtr renderPart); + + public static ovrAvatarRenderPart_SkinnedMeshRender ovrAvatarRenderPart_GetSkinnedMeshRender(IntPtr renderPart) + { + IntPtr ptr = ovrAvatarRenderPart_GetSkinnedMeshRender_Native(renderPart); + return (ovrAvatarRenderPart_SkinnedMeshRender)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarRenderPart_SkinnedMeshRender)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatarRenderPart_GetSkinnedMeshRender")] + private static extern IntPtr ovrAvatarRenderPart_GetSkinnedMeshRender_Native(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarTransform ovrAvatarSkinnedMeshRender_GetTransform(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarTransform ovrAvatarSkinnedMeshRenderPBS_GetTransform(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarTransform ovrAvatarSkinnedMeshRenderPBSV2_GetTransform(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarVisibilityFlags ovrAvatarSkinnedMeshRender_GetVisibilityMask(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern bool ovrAvatarSkinnedMeshRender_MaterialStateChanged(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern bool ovrAvatarSkinnedMeshRenderPBSV2_MaterialStateChanged(IntPtr renderPart); + + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarVisibilityFlags ovrAvatarSkinnedMeshRenderPBS_GetVisibilityMask(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarVisibilityFlags ovrAvatarSkinnedMeshRenderPBSV2_GetVisibilityMask(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarMaterialState ovrAvatarSkinnedMeshRender_GetMaterialState(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarPBSMaterialState ovrAvatarSkinnedMeshRenderPBSV2_GetPBSMaterialState(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt64 ovrAvatarSkinnedMeshRender_GetDirtyJoints(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt64 ovrAvatarSkinnedMeshRenderPBS_GetDirtyJoints(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt64 ovrAvatarSkinnedMeshRenderPBSV2_GetDirtyJoints(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarTransform ovrAvatarSkinnedMeshRender_GetJointTransform(IntPtr renderPart, UInt32 jointIndex); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarTransform ovrAvatarSkinnedMeshRenderPBS_GetJointTransform(IntPtr renderPart, UInt32 jointIndex); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern ovrAvatarTransform ovrAvatarSkinnedMeshRenderPBSV2_GetJointTransform(IntPtr renderPart, UInt32 jointIndex); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt64 ovrAvatarSkinnedMeshRenderPBS_GetAlbedoTextureAssetID(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt64 ovrAvatarSkinnedMeshRenderPBS_GetSurfaceTextureAssetID(IntPtr renderPart); + + public static ovrAvatarRenderPart_SkinnedMeshRenderPBS ovrAvatarRenderPart_GetSkinnedMeshRenderPBS(IntPtr renderPart) + { + IntPtr ptr = ovrAvatarRenderPart_GetSkinnedMeshRenderPBS_Native(renderPart); + return (ovrAvatarRenderPart_SkinnedMeshRenderPBS)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarRenderPart_SkinnedMeshRenderPBS)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatarRenderPart_GetSkinnedMeshRenderPBS")] + private static extern IntPtr ovrAvatarRenderPart_GetSkinnedMeshRenderPBS_Native(IntPtr renderPart); + + public static ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2 ovrAvatarRenderPart_GetSkinnedMeshRenderPBSV2(IntPtr renderPart) + { + IntPtr ptr = ovrAvatarRenderPart_GetSkinnedMeshRenderPBSV2_Native(renderPart); + return (ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2)); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatarRenderPart_GetSkinnedMeshRenderPBSV2")] + private static extern IntPtr ovrAvatarRenderPart_GetSkinnedMeshRenderPBSV2_Native(IntPtr renderPart); + + public static ovrAvatarRenderPart_ProjectorRender ovrAvatarRenderPart_GetProjectorRender(IntPtr renderPart) + { + IntPtr ptr = ovrAvatarRenderPart_GetProjectorRender_Native(renderPart); + return (ovrAvatarRenderPart_ProjectorRender)Marshal.PtrToStructure( + ptr, typeof(ovrAvatarRenderPart_ProjectorRender)); + } + + public static ovrAvatarPBSMaterialState[] ovrAvatar_GetBodyPBSMaterialStates(IntPtr renderPart) + { + System.IntPtr countPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(UInt32))); + IntPtr ptrState = ovrAvatar_GetBodyPBSMaterialStates_Native(renderPart, countPtr); + UInt32 count = (UInt32)Marshal.ReadInt32(countPtr); + + ovrAvatarPBSMaterialState[] states = new ovrAvatarPBSMaterialState[count]; + + for (int i = 0; i < states.Length; i++) + { + IntPtr nextItem = new IntPtr(ptrState.ToInt64() + i * Marshal.SizeOf(typeof(ovrAvatarPBSMaterialState))); + states[i] = (ovrAvatarPBSMaterialState)Marshal.PtrToStructure(nextItem, typeof(ovrAvatarPBSMaterialState)); + } + + return states; + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatar_GetBodyPBSMaterialStates")] + private static extern IntPtr ovrAvatar_GetBodyPBSMaterialStates_Native(IntPtr avatar, IntPtr count); + + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl, EntryPoint = "ovrAvatarRenderPart_GetProjectorRender")] + private static extern IntPtr ovrAvatarRenderPart_GetProjectorRender_Native(IntPtr renderPart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt32 ovrAvatar_GetReferencedAssetCount(IntPtr avatar); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt64 ovrAvatar_GetReferencedAsset(IntPtr avatar, UInt32 index); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_SetLeftHandGesture(IntPtr avatar, ovrAvatarHandGesture gesture); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_SetRightHandGesture(IntPtr avatar, ovrAvatarHandGesture gesture); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_SetLeftHandCustomGesture(IntPtr avatar, UInt32 jointCount, [In] ovrAvatarTransform[] customJointTransforms); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_SetRightHandCustomGesture(IntPtr avatar, UInt32 jointCount, [In] ovrAvatarTransform[] customJointTransforms); + + //Native calls for efficient packet updates + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatar_UpdatePoseFromPacket(IntPtr avatar, IntPtr packet, float secondsFromStart); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarPacket_BeginRecording(IntPtr avatar); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr ovrAvatarPacket_EndRecording(IntPtr avatar); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern UInt32 ovrAvatarPacket_GetSize(IntPtr packet); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern float ovrAvatarPacket_GetDurationSeconds(IntPtr packet); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarPacket_Free(IntPtr packet); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern bool ovrAvatarPacket_Write(IntPtr packet, UInt32 bufferSize, [Out] byte[] buffer); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr ovrAvatarPacket_Read(UInt32 bufferSize, [In] byte[] buffer); + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + private static extern void ovrAvatar_SetInternalForceASTCTextures(bool value); + + // Renaming the outward facing method to remove Internal from name + public static void ovrAvatar_SetForceASTCTextures(bool value) + { + ovrAvatar_SetInternalForceASTCTextures(value); + } + + [DllImport(LibFile, CallingConvention = CallingConvention.Cdecl)] + public static extern void ovrAvatarSpecificationRequest_SetFallbackLookAndFeelVersion(IntPtr specificationRequest, ovrAvatarLookAndFeelVersion version); + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKCAPI.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKCAPI.cs.meta new file mode 100644 index 0000000..3fbc715 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKCAPI.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 0348026b48363904bb332b53a21c35b2 +timeCreated: 1474928508 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKManager.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKManager.cs new file mode 100644 index 0000000..0714860 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKManager.cs @@ -0,0 +1,243 @@ +using UnityEngine; +using System.Collections; +using Oculus.Avatar; +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; + +public delegate void specificationCallback(IntPtr specification); +public delegate void assetLoadedCallback(OvrAvatarAsset asset); +public delegate void combinedMeshLoadedCallback(IntPtr asset); + +public class OvrAvatarSDKManager : MonoBehaviour +{ + private static OvrAvatarSDKManager _instance; + private Dictionary> specificationCallbacks; + private Dictionary> assetLoadedCallbacks; + private Dictionary combinedMeshLoadedCallbacks; + private Dictionary assetCache; + + public static OvrAvatarSDKManager Instance + { + get + { + if (_instance == null) + { + _instance = GameObject.FindObjectOfType(); + if (_instance == null) + { + GameObject manager = new GameObject("OvrAvatarSDKManager"); + _instance = manager.AddComponent(); + _instance.Initialize(); + } + } + return _instance; + } + } + + private void Initialize() + { +#if UNITY_ANDROID && !UNITY_EDITOR + string appId = OvrAvatarSettings.GearAppID; + if (appId == "") + { + AvatarLogger.Log("No Gear VR App ID has been provided. Go to Oculus Avatar > Edit Configuration to supply one", OvrAvatarSettings.Instance); + appId = "0"; + } + + CAPI.ovrAvatar_InitializeAndroidUnity(appId); +#else + string appId = OvrAvatarSettings.AppID; + if (appId == "") + { + AvatarLogger.Log("No Oculus Rift App ID has been provided. Go to Oculus Avatar > Edit Configuration to supply one", OvrAvatarSettings.Instance); + appId = "0"; + } + + CAPI.ovrAvatar_Initialize(appId); +#endif + specificationCallbacks = new Dictionary>(); + assetLoadedCallbacks = new Dictionary>(); + combinedMeshLoadedCallbacks = new Dictionary(); + assetCache = new Dictionary(); + } + + void OnDestroy() + { + CAPI.ovrAvatar_Shutdown(); + } + + // Update is called once per frame + void Update () { + IntPtr message = CAPI.ovrAvatarMessage_Pop(); + if (message == IntPtr.Zero) + { + return; + } + + ovrAvatarMessageType messageType = CAPI.ovrAvatarMessage_GetType(message); + switch (messageType) + { + case ovrAvatarMessageType.AssetLoaded: + { + ovrAvatarMessage_AssetLoaded assetMessage = CAPI.ovrAvatarMessage_GetAssetLoaded(message); + IntPtr asset = assetMessage.asset; + UInt64 assetID = assetMessage.assetID; + ovrAvatarAssetType assetType = CAPI.ovrAvatarAsset_GetType(asset); + OvrAvatarAsset assetData; + IntPtr avatarOwner = IntPtr.Zero; + + switch (assetType) + { + case ovrAvatarAssetType.Mesh: + assetData = new OvrAvatarAssetMesh(assetID, asset, ovrAvatarAssetType.Mesh); + break; + case ovrAvatarAssetType.Texture: + assetData = new OvrAvatarAssetTexture(assetID, asset); + break; + case ovrAvatarAssetType.Material: + assetData = new OvrAvatarAssetMaterial(assetID, asset); + break; + case ovrAvatarAssetType.CombinedMesh: + avatarOwner = CAPI.ovrAvatarAsset_GetAvatar(asset); + assetData = new OvrAvatarAssetMesh(assetID, asset, ovrAvatarAssetType.CombinedMesh); + break; + default: + throw new NotImplementedException(string.Format("Unsupported asset type format {0}", assetType.ToString())); + } + + HashSet callbackSet; + if (assetType == ovrAvatarAssetType.CombinedMesh) + { + if (!assetCache.ContainsKey(assetID)) + { + assetCache.Add(assetID, assetData); + } + + combinedMeshLoadedCallback callback; + if (combinedMeshLoadedCallbacks.TryGetValue(avatarOwner, out callback)) + { + callback(asset); + combinedMeshLoadedCallbacks.Remove(avatarOwner); + } + else + { + AvatarLogger.LogWarning("Loaded a combined mesh with no owner: " + assetMessage.assetID); + } + } + else + { + if (assetLoadedCallbacks.TryGetValue(assetMessage.assetID, out callbackSet)) + { + assetCache.Add(assetID, assetData); + + foreach (var callback in callbackSet) + { + callback(assetData); + } + + assetLoadedCallbacks.Remove(assetMessage.assetID); + } + } + + break; + } + case ovrAvatarMessageType.AvatarSpecification: + { + ovrAvatarMessage_AvatarSpecification spec = CAPI.ovrAvatarMessage_GetAvatarSpecification(message); + HashSet callbackSet; + if (specificationCallbacks.TryGetValue(spec.oculusUserID, out callbackSet)) + { + foreach (var callback in callbackSet) + { + callback(spec.avatarSpec); + } + + specificationCallbacks.Remove(spec.oculusUserID); + } + else + { + AvatarLogger.LogWarning("Error, got an avatar specification callback from a user id we don't have a record for: " + spec.oculusUserID); + } + break; + } + default: + throw new NotImplementedException("Unhandled ovrAvatarMessageType: " + messageType); + } + CAPI.ovrAvatarMessage_Free(message); + } + + public void RequestAvatarSpecification( + UInt64 userId, + specificationCallback callback, + bool useCombinedMesh, + ovrAvatarAssetLevelOfDetail lod, + bool forceMobileTextureFormat) + { + CAPI.ovrAvatar_SetForceASTCTextures(forceMobileTextureFormat); + + HashSet callbackSet; + if (!specificationCallbacks.TryGetValue(userId, out callbackSet)) + { + callbackSet = new HashSet(); + specificationCallbacks.Add(userId, callbackSet); + + IntPtr specRequest = CAPI.ovrAvatarSpecificationRequest_Create(userId); + CAPI.ovrAvatarSpecificationRequest_SetLookAndFeelVersion(specRequest, ovrAvatarLookAndFeelVersion.Two); + CAPI.ovrAvatarSpecificationRequest_SetFallbackLookAndFeelVersion(specRequest, ovrAvatarLookAndFeelVersion.One); + CAPI.ovrAvatarSpecificationRequest_SetLevelOfDetail(specRequest, lod); + CAPI.ovrAvatarSpecificationRequest_SetCombineMeshes(specRequest, useCombinedMesh); + CAPI.ovrAvatar_RequestAvatarSpecificationFromSpecRequest(specRequest); + CAPI.ovrAvatarSpecificationRequest_Destroy(specRequest); + } + + callbackSet.Add(callback); + } + + public void BeginLoadingAsset( + UInt64 assetId, + ovrAvatarAssetLevelOfDetail lod, + assetLoadedCallback callback) + { + HashSet callbackSet; + if (!assetLoadedCallbacks.TryGetValue(assetId, out callbackSet)) + { + callbackSet = new HashSet(); + assetLoadedCallbacks.Add(assetId, callbackSet); + } + + AvatarLogger.Log("Loading Asset ID: " + assetId); + + CAPI.ovrAvatarAsset_BeginLoadingLOD(assetId, lod); + callbackSet.Add(callback); + } + + public void RegisterCombinedMeshCallback( + IntPtr sdkAvatar, + combinedMeshLoadedCallback callback) + { + combinedMeshLoadedCallback currentCallback; + if (!combinedMeshLoadedCallbacks.TryGetValue(sdkAvatar, out currentCallback)) + { + combinedMeshLoadedCallbacks.Add(sdkAvatar, callback); + } + else + { + throw new Exception("Adding second combind mesh callback for same avatar"); + } + } + + + public OvrAvatarAsset GetAsset(UInt64 assetId) + { + OvrAvatarAsset asset; + if (assetCache.TryGetValue(assetId, out asset)) + { + return asset; + } + else + { + return null; + } + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKManager.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKManager.cs.meta new file mode 100644 index 0000000..86d19ca --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSDKManager.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 2ba08ec2733a3a54fbc9490f0f4ab2f0 +timeCreated: 1475011862 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSettings.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarSettings.cs new file mode 100644 index 0000000..e0f1dad --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSettings.cs @@ -0,0 +1,65 @@ +using UnityEngine; +using System.Collections; + +#if UNITY_EDITOR + [UnityEditor.InitializeOnLoad] +#endif +public sealed class OvrAvatarSettings : ScriptableObject { + public static string AppID + { + get { return Instance.ovrAppID; } + set { Instance.ovrAppID = value; } + } + + public static string GearAppID + { + get { return Instance.ovrGearAppID; } + set { Instance.ovrGearAppID = value; } + } + + private static OvrAvatarSettings instance; + public static OvrAvatarSettings Instance + { + get + { + if (instance == null) + { + instance = Resources.Load("OvrAvatarSettings"); + + // This can happen if the developer never input their App Id into the Unity Editor + // Use a dummy object with defaults for the getters so we don't have a null pointer exception + if (instance == null) + { + instance = ScriptableObject.CreateInstance(); + +#if UNITY_EDITOR + // Only in the editor should we save it to disk + 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"), + "OvrAvatarSettings.asset" + ); + UnityEditor.AssetDatabase.CreateAsset(instance, fullPath); +#endif + } + } + return instance; + } + + set + { + instance = value; + } + } + + [SerializeField] + private string ovrAppID = ""; + + [SerializeField] + private string ovrGearAppID = ""; +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSettings.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarSettings.cs.meta new file mode 100644 index 0000000..290ae26 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSettings.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 70c2f484f132c044097f03d65cac3b24 +timeCreated: 1478024706 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSettingsEditor.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarSettingsEditor.cs new file mode 100644 index 0000000..7720207 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSettingsEditor.cs @@ -0,0 +1,44 @@ +#if UNITY_EDITOR +using UnityEngine; +using System.Collections; +using UnityEditor; + +[CustomEditor(typeof(OvrAvatarSettings))] +public class OvrAvatarSettingsEditor : Editor { + GUIContent appIDLabel = new GUIContent("Oculus Rift App Id [?]", + "This AppID will be used for OvrAvatar registration."); + + GUIContent gearAppIDLabel = new GUIContent("Gear VR App Id [?]", + "This AppID will be used for OvrAvatar registration when building to the Android target."); + + [UnityEditor.MenuItem("Oculus Avatars/Edit Configuration")] + public static void Edit() + { + var settings = OvrAvatarSettings.Instance; + UnityEditor.Selection.activeObject = settings; + } + + private static string MakeTextBox(GUIContent label, string variable) { + EditorGUILayout.BeginHorizontal(); + EditorGUILayout.LabelField(label); + GUI.changed = false; + var result = EditorGUILayout.TextField(variable); + if (GUI.changed) + { + EditorUtility.SetDirty(OvrAvatarSettings.Instance); + GUI.changed = false; + } + EditorGUILayout.EndHorizontal(); + return result; + } + public override void OnInspectorGUI() + { + EditorGUILayout.BeginVertical(); + OvrAvatarSettings.AppID = + OvrAvatarSettingsEditor.MakeTextBox(appIDLabel, OvrAvatarSettings.AppID); + OvrAvatarSettings.GearAppID = + OvrAvatarSettingsEditor.MakeTextBox(gearAppIDLabel, OvrAvatarSettings.GearAppID); + EditorGUILayout.EndVertical(); + } +} +#endif diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSettingsEditor.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarSettingsEditor.cs.meta new file mode 100644 index 0000000..e4f9404 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSettingsEditor.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 1511f2aaa4ab15e4b8a0ac1a805a402b +timeCreated: 1478024800 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderComponent.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderComponent.cs new file mode 100644 index 0000000..409953e --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderComponent.cs @@ -0,0 +1,50 @@ +using UnityEngine; +using System.Collections; +using System; +using Oculus.Avatar; + +public class OvrAvatarSkinnedMeshRenderComponent : OvrAvatarRenderComponent +{ + Shader surface; + Shader surfaceSelfOccluding; + bool previouslyActive = false; + + internal void Initialize(ovrAvatarRenderPart_SkinnedMeshRender skinnedMeshRender, Shader surface, Shader surfaceSelfOccluding, int thirdPersonLayer, int firstPersonLayer, int sortOrder) + { + this.surfaceSelfOccluding = surfaceSelfOccluding != null ? surfaceSelfOccluding : Shader.Find("OvrAvatar/AvatarSurfaceShaderSelfOccluding"); + this.surface = surface != null ? surface : Shader.Find("OvrAvatar/AvatarSurfaceShader"); + this.mesh = CreateSkinnedMesh(skinnedMeshRender.meshAssetID, skinnedMeshRender.visibilityMask, thirdPersonLayer, firstPersonLayer, sortOrder); + bones = mesh.bones; + UpdateMeshMaterial(skinnedMeshRender.visibilityMask, mesh); + } + + public void UpdateSkinnedMeshRender(OvrAvatarComponent component, OvrAvatar avatar, IntPtr renderPart) + { + ovrAvatarVisibilityFlags visibilityMask = CAPI.ovrAvatarSkinnedMeshRender_GetVisibilityMask(renderPart); + ovrAvatarTransform localTransform = CAPI.ovrAvatarSkinnedMeshRender_GetTransform(renderPart); + UpdateSkinnedMesh(avatar, bones, localTransform, visibilityMask, renderPart); + + UpdateMeshMaterial(visibilityMask, mesh); + bool isActive = this.gameObject.activeSelf; + + if( mesh != null ) + { + bool changedMaterial = CAPI.ovrAvatarSkinnedMeshRender_MaterialStateChanged(renderPart); + if (changedMaterial || (!previouslyActive && isActive)) + { + ovrAvatarMaterialState materialState = CAPI.ovrAvatarSkinnedMeshRender_GetMaterialState(renderPart); + component.UpdateAvatarMaterial(mesh.sharedMaterial, materialState); + } + } + previouslyActive = isActive; + } + + private void UpdateMeshMaterial(ovrAvatarVisibilityFlags visibilityMask, SkinnedMeshRenderer rootMesh) + { + Shader shader = (visibilityMask & ovrAvatarVisibilityFlags.SelfOccluding) != 0 ? surfaceSelfOccluding : surface; + if (rootMesh.sharedMaterial == null || rootMesh.sharedMaterial.shader != shader) + { + rootMesh.sharedMaterial = CreateAvatarMaterial(gameObject.name + "_material", shader); + } + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderComponent.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderComponent.cs.meta new file mode 100644 index 0000000..6c85ed5 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderComponent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 4efdf8bc42b8b8843aff4ca38233f362 +timeCreated: 1479156282 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSComponent.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSComponent.cs new file mode 100644 index 0000000..811d028 --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSComponent.cs @@ -0,0 +1,30 @@ +using UnityEngine; +using System.Collections; +using System; +using Oculus.Avatar; + +public class OvrAvatarSkinnedMeshRenderPBSComponent : OvrAvatarRenderComponent { + + internal void Initialize(ovrAvatarRenderPart_SkinnedMeshRenderPBS skinnedMeshRenderPBS, Shader shader, int thirdPersonLayer, int firstPersonLayer, int sortOrder) + { + if (shader == null) + { + shader = Shader.Find("OvrAvatar/AvatarSurfaceShaderPBS"); + } + mesh = CreateSkinnedMesh(skinnedMeshRenderPBS.meshAssetID, skinnedMeshRenderPBS.visibilityMask, thirdPersonLayer, firstPersonLayer, sortOrder); + mesh.sharedMaterial = CreateAvatarMaterial(gameObject.name + "_material", shader); + bones = mesh.bones; + } + + internal void UpdateSkinnedMeshRenderPBS(OvrAvatar avatar, IntPtr renderPart, Material mat) + { + ovrAvatarVisibilityFlags visibilityMask = CAPI.ovrAvatarSkinnedMeshRenderPBS_GetVisibilityMask(renderPart); + ovrAvatarTransform localTransform = CAPI.ovrAvatarSkinnedMeshRenderPBS_GetTransform(renderPart); + UpdateSkinnedMesh(avatar, bones, localTransform, visibilityMask, renderPart); + + UInt64 albedoTextureID = CAPI.ovrAvatarSkinnedMeshRenderPBS_GetAlbedoTextureAssetID(renderPart); + UInt64 surfaceTextureID = CAPI.ovrAvatarSkinnedMeshRenderPBS_GetSurfaceTextureAssetID(renderPart); + mat.SetTexture("_Albedo", OvrAvatarComponent.GetLoadedTexture(albedoTextureID)); + mat.SetTexture("_Surface", OvrAvatarComponent.GetLoadedTexture(surfaceTextureID)); + } +} diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSComponent.cs.meta b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSComponent.cs.meta new file mode 100644 index 0000000..b5e75ef --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSComponent.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 69cc01a6441317c4c8a6e24d979cc1b0 +timeCreated: 1479158964 +licenseType: Store +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSV2Component.cs b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSV2Component.cs new file mode 100644 index 0000000..91f50fa --- /dev/null +++ b/Assets/Oculus/Avatar/Scripts/OvrAvatarSkinnedMeshRenderPBSV2Component.cs @@ -0,0 +1,189 @@ +using UnityEngine; +using System.Collections; +using System; +using System.Security.Policy; +using Oculus.Avatar; + +public class OvrAvatarSkinnedMeshPBSV2RenderComponent : OvrAvatarRenderComponent +{ + public OvrAvatarMaterialManager AvatarMaterialManager; + bool PreviouslyActive = false; + bool IsCombinedMaterial = false; + + internal void Initialize( + IntPtr renderPart, + ovrAvatarRenderPart_SkinnedMeshRenderPBS_V2 skinnedMeshRender, + OvrAvatarMaterialManager materialManager, +