diff --git a/Assets/OctoCore/Data/settings.asset b/Assets/OctoCore/Data/settings.asset index dce02313..c2a341a6 100644 --- a/Assets/OctoCore/Data/settings.asset +++ b/Assets/OctoCore/Data/settings.asset @@ -201,6 +201,9 @@ MonoBehaviour: FadeInDuration: 0.5 FadeOutDuration: 0.5 FadeColor: {r: 0, g: 0, b: 0, a: 1} + HoldClosedDuration: 0.1 + DefaultTransitionClip: {fileID: 0} + DefaultTransitionMaterial: {fileID: 0} Ui: ReferenceSize: {x: 1920, y: 1080} IconsBackground: diff --git a/Assets/OctoCore/Prefabs/OctoCore.prefab b/Assets/OctoCore/Prefabs/OctoCore.prefab index 94e3c4b1..2444f5e3 100644 --- a/Assets/OctoCore/Prefabs/OctoCore.prefab +++ b/Assets/OctoCore/Prefabs/OctoCore.prefab @@ -1,5 +1,65 @@ %YAML 1.1 %TAG !u! tag:unity3d.com,2011: +--- !u!1 &600955581827141548 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2821496700537645326} + - component: {fileID: 7652636108407719995} + m_Layer: 0 + m_Name: Eyes + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &2821496700537645326 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 600955581827141548} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 3245798801699784922} + - {fileID: 8809334315617690044} + - {fileID: 82148688982910463} + - {fileID: 3074494267237045658} + m_Father: {fileID: 7468471552496634669} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 100, y: 100} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &7652636108407719995 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 600955581827141548} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6a2c4b14bcd9d8a4aa612f357af4125b, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::OctoCore.Transitions.OctoEyelidBlink + _topEyelid: {fileID: 9039139682927643722} + _bottomEyelid: {fileID: 3143605408306270335} + _videoDisplay: {fileID: 6100246771685396905} + _videoPlayer: {fileID: 7930903583049695117} + _skipOnDrop: 1 + _logVideoDebug: 0 + _openOffset: 1600 + _closedOffset: 400 --- !u!1 &602187900178246440 GameObject: m_ObjectHideFlags: 0 @@ -11,6 +71,7 @@ GameObject: - component: {fileID: 5059971830852439863} - component: {fileID: 7803859280562976481} - component: {fileID: 4945088319875554548} + - component: {fileID: 1117654802469837955} m_Layer: 0 m_Name: PerfText m_TagString: Untagged @@ -30,11 +91,11 @@ RectTransform: m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 7599382703483058391} + m_Father: {fileID: 7468471552496634669} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 80, y: 1065} + m_AnchoredPosition: {x: 104, y: -46} m_SizeDelta: {x: 160, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &7803859280562976481 @@ -81,6 +142,25 @@ MonoBehaviour: m_Text: 'FPS ' +--- !u!114 &1117654802469837955 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 602187900178246440} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 508ae74360f7e5249b100f7873b182f1, type: 3} + m_Name: + m_EditorClassIdentifier: Assembly-CSharp::PerformanceOverlay + _displayText: {fileID: 4945088319875554548} + _smoothing: 0.05 + _updateInterval: 0.1 + _greenFps: 59 + _yellowFps: 50 + _orangeFps: 40 + _redOrangeFps: 30 --- !u!1 &2045586710493933313 GameObject: m_ObjectHideFlags: 0 @@ -113,7 +193,8 @@ RectTransform: m_ConstrainProportionsScale: 0 m_Children: - {fileID: 1658671424626357336} - - {fileID: 7599382703483058391} + - {fileID: 2821496700537645326} + - {fileID: 5059971830852439863} m_Father: {fileID: 2859689488225106521} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -321,7 +402,7 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &3570901159858801060 +--- !u!1 &2863700951379057923 GameObject: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} @@ -329,50 +410,70 @@ GameObject: m_PrefabAsset: {fileID: 0} serializedVersion: 6 m_Component: - - component: {fileID: 7599382703483058391} - - component: {fileID: 8902340240933746356} + - component: {fileID: 3074494267237045658} + - component: {fileID: 7930903583049695117} m_Layer: 0 - m_Name: PerfManager + m_Name: VideoPlayer m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 - m_StaticEditorFlags: 2147483647 + m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!4 &7599382703483058391 -Transform: +--- !u!224 &3074494267237045658 +RectTransform: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3570901159858801060} - serializedVersion: 2 + m_GameObject: {fileID: 2863700951379057923} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -960, y: -540, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 5059971830852439863} - m_Father: {fileID: 7468471552496634669} + m_Children: [] + m_Father: {fileID: 2821496700537645326} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &8902340240933746356 -MonoBehaviour: + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 2460, y: 1340} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!328 &7930903583049695117 +VideoPlayer: m_ObjectHideFlags: 0 m_CorrespondingSourceObject: {fileID: 0} m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3570901159858801060} + m_GameObject: {fileID: 2863700951379057923} m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 508ae74360f7e5249b100f7873b182f1, type: 3} - m_Name: - m_EditorClassIdentifier: Assembly-CSharp::PerformanceOverlay - _displayText: {fileID: 4945088319875554548} - _smoothing: 0.05 - _updateInterval: 0.1 - _greenFps: 59 - _yellowFps: 50 - _orangeFps: 40 - _redOrangeFps: 30 + m_VideoClip: {fileID: 32900000, guid: b0bcfa0c7d8546f41bbf6c37042457ef, type: 3} + m_TargetCameraAlpha: 1 + m_TargetCamera3DLayout: 0 + m_TargetCamera: {fileID: 0} + m_TargetTexture: {fileID: 8400000, guid: 754ac0a644a2b7e479d1bb8fa29f7a62, type: 2} + m_TimeReference: 0 + m_TargetMaterialRenderer: {fileID: 0} + m_TargetMaterialProperty: + m_RenderMode: 2 + m_AspectRatio: 2 + m_DataSource: 0 + m_TimeUpdateMode: 2 + m_PlaybackSpeed: 1 + m_AudioOutputMode: 2 + m_TargetAudioSources: + - {fileID: 0} + m_DirectAudioVolumes: + - 1 + m_Url: + m_EnabledAudioTracks: 01 + m_DirectAudioMutes: 01 + m_ControlledAudioTrackCount: 1 + m_PlayOnAwake: 0 + m_SkipOnDrop: 1 + m_Looping: 0 + m_WaitForFirstFrame: 1 + m_FrameReadyEventEnabled: 0 + m_VideoShaders: [] --- !u!1 &3633920094445882790 GameObject: m_ObjectHideFlags: 0 @@ -960,6 +1061,153 @@ MonoBehaviour: m_FillOrigin: 0 m_UseSpriteMesh: 0 m_PixelsPerUnitMultiplier: 1 +--- !u!1 &5940485663069302428 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 8809334315617690044} + - component: {fileID: 750046673874731942} + - component: {fileID: 3143605408306270335} + m_Layer: 0 + m_Name: Image (1) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &8809334315617690044 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5940485663069302428} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2821496700537645326} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -55.815002, y: -1684.5} + m_SizeDelta: {x: 3553.7, y: 1669} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &750046673874731942 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5940485663069302428} + m_CullTransparentMesh: 1 +--- !u!114 &3143605408306270335 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5940485663069302428} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!1 &6028925716681800543 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 82148688982910463} + - component: {fileID: 3091763757972071168} + - component: {fileID: 6100246771685396905} + m_Layer: 0 + m_Name: HallucinationVideo + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &82148688982910463 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6028925716681800543} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2821496700537645326} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0} + m_SizeDelta: {x: 2460, y: 1340} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &3091763757972071168 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6028925716681800543} + m_CullTransparentMesh: 1 +--- !u!114 &6100246771685396905 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6028925716681800543} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage + m_Material: {fileID: 2100000, guid: ee02f227a2ef9c146a9e3df7f47442ce, type: 2} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Texture: {fileID: 8400000, guid: 754ac0a644a2b7e479d1bb8fa29f7a62, type: 2} + m_UVRect: + serializedVersion: 2 + x: 0 + y: 0 + width: 1 + height: 1 --- !u!1 &6140949764210152115 GameObject: m_ObjectHideFlags: 0 @@ -1134,6 +1382,81 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} +--- !u!1 &6666784783989853239 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 3245798801699784922} + - component: {fileID: 6786659044299547127} + - component: {fileID: 9039139682927643722} + m_Layer: 0 + m_Name: Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &3245798801699784922 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6666784783989853239} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 2821496700537645326} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: -55.805496, y: 1599.5} + m_SizeDelta: {x: 3553.6875, y: 1499} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!222 &6786659044299547127 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6666784783989853239} + m_CullTransparentMesh: 1 +--- !u!114 &9039139682927643722 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 6666784783989853239} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 0} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 --- !u!1 &8589544845245727413 GameObject: m_ObjectHideFlags: 0 diff --git a/Assets/_Content/Data/OctoCore/Scenes/scene_BodiesInWater.asset b/Assets/_Content/Data/OctoCore/Scenes/scene_BodiesInWater.asset index 2ee2e45c..c2926c8d 100644 --- a/Assets/_Content/Data/OctoCore/Scenes/scene_BodiesInWater.asset +++ b/Assets/_Content/Data/OctoCore/Scenes/scene_BodiesInWater.asset @@ -15,3 +15,5 @@ MonoBehaviour: Id: scene_BodiesInWater SceneName: BodiesInWater UseFadeTransition: 1 + TransitionClip: {fileID: 0} + TransitionMaterial: {fileID: 0} diff --git a/Assets/_Content/Data/OctoCore/Scenes/scene_HouseOfLeaves.asset b/Assets/_Content/Data/OctoCore/Scenes/scene_HouseOfLeaves.asset index 063ca8b4..69701e7a 100644 --- a/Assets/_Content/Data/OctoCore/Scenes/scene_HouseOfLeaves.asset +++ b/Assets/_Content/Data/OctoCore/Scenes/scene_HouseOfLeaves.asset @@ -15,3 +15,5 @@ MonoBehaviour: Id: scene_HouseOfLeaves SceneName: HouseOfLeaves UseFadeTransition: 1 + TransitionClip: {fileID: 0} + TransitionMaterial: {fileID: 0} diff --git a/Assets/_Content/Data/OctoCore/Scenes/scene_Omnissiah.asset b/Assets/_Content/Data/OctoCore/Scenes/scene_Omnissiah.asset index b68f14d6..8d0437d3 100644 --- a/Assets/_Content/Data/OctoCore/Scenes/scene_Omnissiah.asset +++ b/Assets/_Content/Data/OctoCore/Scenes/scene_Omnissiah.asset @@ -15,3 +15,5 @@ MonoBehaviour: Id: scene_Omnissiah SceneName: Omnissiah UseFadeTransition: 1 + TransitionClip: {fileID: 0} + TransitionMaterial: {fileID: 0} diff --git a/Assets/_Content/Data/OctoCore/Scenes/scene_Samyaza.asset b/Assets/_Content/Data/OctoCore/Scenes/scene_Samyaza.asset index 0f28a23f..5dbb4010 100644 --- a/Assets/_Content/Data/OctoCore/Scenes/scene_Samyaza.asset +++ b/Assets/_Content/Data/OctoCore/Scenes/scene_Samyaza.asset @@ -15,3 +15,5 @@ MonoBehaviour: Id: scene_Samyaza SceneName: Samyaza UseFadeTransition: 1 + TransitionClip: {fileID: 0} + TransitionMaterial: {fileID: 0} diff --git a/Assets/_Content/Data/OctoCore/Scenes/scene_Scarecrow.asset b/Assets/_Content/Data/OctoCore/Scenes/scene_Scarecrow.asset index 71120ed7..fa395a08 100644 --- a/Assets/_Content/Data/OctoCore/Scenes/scene_Scarecrow.asset +++ b/Assets/_Content/Data/OctoCore/Scenes/scene_Scarecrow.asset @@ -15,3 +15,5 @@ MonoBehaviour: Id: scene_Scarecrow SceneName: Scarecrow UseFadeTransition: 1 + TransitionClip: {fileID: 0} + TransitionMaterial: {fileID: 0} diff --git a/Assets/_Content/Data/OctoCore/Scenes/scene_Theatre.asset b/Assets/_Content/Data/OctoCore/Scenes/scene_Theatre.asset index 244004db..42c6544c 100644 --- a/Assets/_Content/Data/OctoCore/Scenes/scene_Theatre.asset +++ b/Assets/_Content/Data/OctoCore/Scenes/scene_Theatre.asset @@ -15,3 +15,5 @@ MonoBehaviour: Id: scene_Theatre SceneName: Theatre UseFadeTransition: 1 + TransitionClip: {fileID: 0} + TransitionMaterial: {fileID: 0} diff --git a/Assets/_Content/Data/OctoCore/Scenes/scene_creditsScreen.asset b/Assets/_Content/Data/OctoCore/Scenes/scene_creditsScreen.asset index b3caf8bd..ef024c92 100644 --- a/Assets/_Content/Data/OctoCore/Scenes/scene_creditsScreen.asset +++ b/Assets/_Content/Data/OctoCore/Scenes/scene_creditsScreen.asset @@ -15,3 +15,5 @@ MonoBehaviour: Id: scene_creditsScreen SceneName: CreditsScreen UseFadeTransition: 1 + TransitionClip: {fileID: 0} + TransitionMaterial: {fileID: 0} diff --git a/Assets/_Content/Data/OctoCore/Scenes/scene_titleScreen.asset b/Assets/_Content/Data/OctoCore/Scenes/scene_titleScreen.asset index c548aa17..a4358742 100644 --- a/Assets/_Content/Data/OctoCore/Scenes/scene_titleScreen.asset +++ b/Assets/_Content/Data/OctoCore/Scenes/scene_titleScreen.asset @@ -15,3 +15,5 @@ MonoBehaviour: Id: scene_titleScreen SceneName: TitleScreen UseFadeTransition: 1 + TransitionClip: {fileID: 0} + TransitionMaterial: {fileID: 0} diff --git a/Assets/_Content/Scenes/BodiesInWater.unity b/Assets/_Content/Scenes/BodiesInWater.unity index d1259f9c..a6c001b6 100644 --- a/Assets/_Content/Scenes/BodiesInWater.unity +++ b/Assets/_Content/Scenes/BodiesInWater.unity @@ -6291,7 +6291,7 @@ MonoBehaviour: _tolerance: 0.5 _duration: 1 _execution: 1 - _delay: 200 + _delay: 20 _onTrigger: m_PersistentCalls: m_Calls: [] diff --git a/Assets/_Content/Scenes/Theatre.unity b/Assets/_Content/Scenes/Theatre.unity index 4bf639cd..ce2d63da 100644 --- a/Assets/_Content/Scenes/Theatre.unity +++ b/Assets/_Content/Scenes/Theatre.unity @@ -1109,43 +1109,6 @@ MonoBehaviour: glitchMinDuration: 0.02 glitchMaxDuration: 0.12 glitchObject: {fileID: 0} ---- !u!1 &28453595 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 28453596} - m_Layer: 0 - m_Name: Eyes - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &28453596 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 28453595} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1297401520} - - {fileID: 1463395675} - m_Father: {fileID: 8294780350178558349} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 100, y: 100} - m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &34574729 stripped GameObject: m_CorrespondingSourceObject: {fileID: 3721550979876651107, guid: 512704cfb7849d143b8f6232fdd650fb, type: 3} @@ -4290,78 +4253,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 118639217} m_Mesh: {fileID: -2567153892811238564, guid: 287bdd7f334d4b840b31f1522c5f1141, type: 3} ---- !u!1 &122053797 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 122053798} - - component: {fileID: 122053800} - - component: {fileID: 122053799} - m_Layer: 0 - m_Name: HallucinationVideo - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &122053798 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 122053797} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 3944854789548425406} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &122053799 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 122053797} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage - m_Material: {fileID: 2100000, guid: ee02f227a2ef9c146a9e3df7f47442ce, type: 2} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Texture: {fileID: 8400000, guid: 754ac0a644a2b7e479d1bb8fa29f7a62, type: 2} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &122053800 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 122053797} - m_CullTransparentMesh: 1 --- !u!1 &124904596 stripped GameObject: m_CorrespondingSourceObject: {fileID: 1479246028277970160, guid: e7bb097752ed1e649b2eed5ce64be3a7, type: 3} @@ -10303,78 +10194,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 3995662756956091243, guid: 18cb4a7d850530f4c998d021755435e5, type: 3} m_PrefabInstance: {fileID: 302580768} m_PrefabAsset: {fileID: 0} ---- !u!1 &302885700 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 302885701} - - component: {fileID: 302885702} - m_Layer: 0 - m_Name: VideoPlayer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &302885701 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 302885700} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 3944854789548425406} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!328 &302885702 -VideoPlayer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 302885700} - m_Enabled: 1 - m_VideoClip: {fileID: 32900000, guid: b0bcfa0c7d8546f41bbf6c37042457ef, type: 3} - m_TargetCameraAlpha: 1 - m_TargetCamera3DLayout: 0 - m_TargetCamera: {fileID: 0} - m_TargetTexture: {fileID: 8400000, guid: 754ac0a644a2b7e479d1bb8fa29f7a62, type: 2} - m_TimeReference: 0 - m_TargetMaterialRenderer: {fileID: 0} - m_TargetMaterialProperty: - m_RenderMode: 2 - m_AspectRatio: 2 - m_DataSource: 0 - m_TimeUpdateMode: 2 - m_PlaybackSpeed: 1 - m_AudioOutputMode: 2 - m_TargetAudioSources: - - {fileID: 0} - m_DirectAudioVolumes: - - 1 - m_Url: - m_EnabledAudioTracks: 01 - m_DirectAudioMutes: 01 - m_ControlledAudioTrackCount: 1 - m_PlayOnAwake: 0 - m_SkipOnDrop: 1 - m_Looping: 0 - m_WaitForFirstFrame: 1 - m_FrameReadyEventEnabled: 0 - m_VideoShaders: [] --- !u!1 &302891969 stripped GameObject: m_CorrespondingSourceObject: {fileID: 7057310858708119253, guid: 80a8c93010f76f44e83cf1ccc3190661, type: 3} @@ -15169,20 +14988,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 0} - _hallucinationVideo: {fileID: 0} - _topEyelid: {fileID: 0} - _bottomEyelid: {fileID: 0} + _clip: {fileID: 0} + _material: {fileID: 0} _closeDuration: 0.1 _holdClosed: 0.05 _openDuration: 0.15 _visibleHold: 0.5 _showVideoAtCloseProgress: 0.5 - _playbackSpeed: 1 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 600 - _closedOffset: 0 --- !u!1 &477778557 GameObject: m_ObjectHideFlags: 0 @@ -1228739,7 +1228551,6 @@ MonoBehaviour: idInternal: 0 valueGuidInternal: WwiseObjectReference: {fileID: 11400000, guid: cb7005361d4283844bb30f03e0a63a83, type: 2} - _bindRetryFrames: 120 --- !u!1001 &669525208 PrefabInstance: m_ObjectHideFlags: 0 @@ -1229335,20 +1229146,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 0} - _hallucinationVideo: {fileID: 0} - _topEyelid: {fileID: 0} - _bottomEyelid: {fileID: 0} + _clip: {fileID: 0} + _material: {fileID: 0} _closeDuration: 0.1 _holdClosed: 0.05 _openDuration: 0.15 _visibleHold: 0.5 _showVideoAtCloseProgress: 0.5 - _playbackSpeed: 1 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 600 - _closedOffset: 0 --- !u!4 &681655009 stripped Transform: m_CorrespondingSourceObject: {fileID: 992638687589661580, guid: 8a998c00fc583a54082d05343d747b99, type: 3} @@ -1246932,78 +1246736,6 @@ MonoBehaviour: gosToUpdate: [] isDirty: 0 _maxVertsInMesh: 65535 ---- !u!1 &737451177 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 737451178} - - component: {fileID: 737451179} - m_Layer: 0 - m_Name: VideoPlayer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &737451178 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 737451177} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4043674246273560190} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!328 &737451179 -VideoPlayer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 737451177} - m_Enabled: 1 - m_VideoClip: {fileID: 32900000, guid: 110592976a5654240b144bf3c05cf16e, type: 3} - m_TargetCameraAlpha: 1 - m_TargetCamera3DLayout: 0 - m_TargetCamera: {fileID: 0} - m_TargetTexture: {fileID: 8400000, guid: 725048bdfff10644eb1cae1916817e85, type: 2} - m_TimeReference: 0 - m_TargetMaterialRenderer: {fileID: 0} - m_TargetMaterialProperty: - m_RenderMode: 2 - m_AspectRatio: 2 - m_DataSource: 0 - m_TimeUpdateMode: 2 - m_PlaybackSpeed: 1 - m_AudioOutputMode: 2 - m_TargetAudioSources: - - {fileID: 0} - m_DirectAudioVolumes: - - 1 - m_Url: - m_EnabledAudioTracks: 01 - m_DirectAudioMutes: 01 - m_ControlledAudioTrackCount: 1 - m_PlayOnAwake: 0 - m_SkipOnDrop: 1 - m_Looping: 0 - m_WaitForFirstFrame: 1 - m_FrameReadyEventEnabled: 0 - m_VideoShaders: [] --- !u!1 &738361744 GameObject: m_ObjectHideFlags: 0 @@ -1250934,20 +1250666,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 0} - _hallucinationVideo: {fileID: 0} - _topEyelid: {fileID: 0} - _bottomEyelid: {fileID: 0} + _clip: {fileID: 0} + _material: {fileID: 0} _closeDuration: 0.1 _holdClosed: 0.05 _openDuration: 0.15 _visibleHold: 0.5 _showVideoAtCloseProgress: 0.5 - _playbackSpeed: 1 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 600 - _closedOffset: 0 --- !u!1 &825450534 GameObject: m_ObjectHideFlags: 0 @@ -1793652,78 +1793377,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1262312020} m_Mesh: {fileID: -218078870997673771, guid: 287bdd7f334d4b840b31f1522c5f1141, type: 3} ---- !u!1 &1265595687 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1265595688} - - component: {fileID: 1265595689} - m_Layer: 0 - m_Name: VideoPlayer - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1265595688 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1265595687} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 5953892496422445155} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!328 &1265595689 -VideoPlayer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1265595687} - m_Enabled: 1 - m_VideoClip: {fileID: 32900000, guid: ba3c91ef4865d7c4aa179bac9d7a1e69, type: 3} - m_TargetCameraAlpha: 1 - m_TargetCamera3DLayout: 0 - m_TargetCamera: {fileID: 0} - m_TargetTexture: {fileID: 8400000, guid: 5e7d07b5b87049e439bc686fef1c54f0, type: 2} - m_TimeReference: 0 - m_TargetMaterialRenderer: {fileID: 0} - m_TargetMaterialProperty: - m_RenderMode: 2 - m_AspectRatio: 2 - m_DataSource: 0 - m_TimeUpdateMode: 2 - m_PlaybackSpeed: 1 - m_AudioOutputMode: 2 - m_TargetAudioSources: - - {fileID: 0} - m_DirectAudioVolumes: - - 1 - m_Url: - m_EnabledAudioTracks: 01 - m_DirectAudioMutes: 01 - m_ControlledAudioTrackCount: 1 - m_PlayOnAwake: 0 - m_SkipOnDrop: 1 - m_Looping: 0 - m_WaitForFirstFrame: 1 - m_FrameReadyEventEnabled: 0 - m_VideoShaders: [] --- !u!1 &1270400833 GameObject: m_ObjectHideFlags: 0 @@ -1794233,20 +1793886,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 0} - _hallucinationVideo: {fileID: 0} - _topEyelid: {fileID: 0} - _bottomEyelid: {fileID: 0} + _clip: {fileID: 0} + _material: {fileID: 0} _closeDuration: 0.1 _holdClosed: 0.05 _openDuration: 0.15 _visibleHold: 0.5 _showVideoAtCloseProgress: 0.5 - _playbackSpeed: 1 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 600 - _closedOffset: 0 --- !u!1 &1277811577 stripped GameObject: m_CorrespondingSourceObject: {fileID: 472138041468068150, guid: 8a998c00fc583a54082d05343d747b99, type: 3} @@ -1794783,81 +1794429,6 @@ PrefabInstance: insertIndex: -1 addedObject: {fileID: 639170807} m_SourcePrefab: {fileID: 100100000, guid: 8a998c00fc583a54082d05343d747b99, type: 3} ---- !u!1 &1297401519 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1297401520} - - component: {fileID: 1297401522} - - component: {fileID: 1297401521} - m_Layer: 0 - m_Name: Image - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1297401520 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297401519} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 28453596} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 1} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: -55.805496, y: 1599.5} - m_SizeDelta: {x: 3553.6875, y: 1499} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1297401521 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297401519} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1297401522 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1297401519} - m_CullTransparentMesh: 1 --- !u!1 &1297954687 GameObject: m_ObjectHideFlags: 0 @@ -1801024,81 +1800595,6 @@ Transform: m_CorrespondingSourceObject: {fileID: 4229867573999893934, guid: d77f266a781cf58469c9872b9724fa29, type: 3} m_PrefabInstance: {fileID: 1463114954} m_PrefabAsset: {fileID: 0} ---- !u!1 &1463395674 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1463395675} - - component: {fileID: 1463395677} - - component: {fileID: 1463395676} - m_Layer: 0 - m_Name: Image (1) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1463395675 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463395674} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 28453596} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 0} - m_AnchoredPosition: {x: -55.815002, y: -1684.5} - m_SizeDelta: {x: 3553.7, y: 1669} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1463395676 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463395674} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image - m_Material: {fileID: 0} - m_Color: {r: 0, g: 0, b: 0, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!222 &1463395677 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1463395674} - m_CullTransparentMesh: 1 --- !u!1 &1466363513 GameObject: m_ObjectHideFlags: 0 @@ -3398091,78 +3397587,6 @@ MeshCollider: m_Convex: 0 m_CookingOptions: 30 m_Mesh: {fileID: 915128379217107458, guid: 759b2f9a05b12e9458fd68a55f4a0712, type: 3} ---- !u!1 &1520656447 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1520656448} - - component: {fileID: 1520656450} - - component: {fileID: 1520656449} - m_Layer: 0 - m_Name: HallucinationVideo - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1520656448 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1520656447} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 4043674246273560190} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1520656449 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1520656447} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage - m_Material: {fileID: 2100000, guid: c2467417522efbe448119480d4daff9f, type: 2} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Texture: {fileID: 8400000, guid: 725048bdfff10644eb1cae1916817e85, type: 2} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &1520656450 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1520656447} - m_CullTransparentMesh: 1 --- !u!1 &1520851693 GameObject: m_ObjectHideFlags: 0 @@ -3477346,20 +3476770,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 0} - _hallucinationVideo: {fileID: 0} - _topEyelid: {fileID: 0} - _bottomEyelid: {fileID: 0} + _clip: {fileID: 0} + _material: {fileID: 0} _closeDuration: 0.1 _holdClosed: 0.05 _openDuration: 0.15 _visibleHold: 0.5 _showVideoAtCloseProgress: 0.5 - _playbackSpeed: 1 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 600 - _closedOffset: 0 --- !u!114 &1710639304 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3484000,20 +3483417,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 0} - _hallucinationVideo: {fileID: 0} - _topEyelid: {fileID: 0} - _bottomEyelid: {fileID: 0} + _clip: {fileID: 0} + _material: {fileID: 0} _closeDuration: 0.1 _holdClosed: 0.05 _openDuration: 0.15 _visibleHold: 0.5 _showVideoAtCloseProgress: 0.5 - _playbackSpeed: 1 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 600 - _closedOffset: 0 --- !u!1 &1918993959 GameObject: m_ObjectHideFlags: 0 @@ -3484310,78 +3483720,6 @@ MeshFilter: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1925387916} m_Mesh: {fileID: -1705675968266740125, guid: 287bdd7f334d4b840b31f1522c5f1141, type: 3} ---- !u!1 &1927290004 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1927290005} - - component: {fileID: 1927290007} - - component: {fileID: 1927290006} - m_Layer: 0 - m_Name: HallucinationVideo - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &1927290005 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1927290004} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 5953892496422445155} - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!114 &1927290006 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1927290004} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.RawImage - m_Material: {fileID: 2100000, guid: e8cd122788852424cbc5436633400b2e, type: 2} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Texture: {fileID: 8400000, guid: 5e7d07b5b87049e439bc686fef1c54f0, type: 2} - m_UVRect: - serializedVersion: 2 - x: 0 - y: 0 - width: 1 - height: 1 ---- !u!222 &1927290007 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1927290004} - m_CullTransparentMesh: 1 --- !u!1 &1930360966 stripped GameObject: m_CorrespondingSourceObject: {fileID: 503235882488055851, guid: 80a8c93010f76f44e83cf1ccc3190661, type: 3} @@ -3502835,7 +3502173,6 @@ GameObject: - component: {fileID: 5953892496422445155} - component: {fileID: 6813584513378022210} - component: {fileID: 857898985108119217} - - component: {fileID: 4841448913657607015} m_Layer: 0 m_Name: HallucinationFlashB m_TagString: Untagged @@ -3503784,20 +3503121,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 302885702} - _hallucinationVideo: {fileID: 122053799} - _topEyelid: {fileID: 1297401521} - _bottomEyelid: {fileID: 1463395676} + _clip: {fileID: 32900000, guid: b0bcfa0c7d8546f41bbf6c37042457ef, type: 3} + _material: {fileID: 0} _closeDuration: 0.06 _holdClosed: 0.1 _openDuration: 0.1 _visibleHold: 1 _showVideoAtCloseProgress: 1 - _playbackSpeed: 1.5 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 2500 - _closedOffset: 100 --- !u!1 &3474206300861930777 GameObject: m_ObjectHideFlags: 0 @@ -3505376,9 +3504706,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 302885701} - - {fileID: 122053798} + m_Children: [] m_Father: {fileID: 8294780350178558349} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -3505712,9 +3505040,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 737451178} - - {fileID: 1520656448} + m_Children: [] m_Father: {fileID: 8294780350178558349} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -3508557,36 +3507883,6 @@ MeshRenderer: m_SortingOrder: 0 m_MaskInteraction: 0 m_AdditionalVertexStreams: {fileID: 0} ---- !u!114 &4647244026515023095 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 8160826245474059574} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image - m_Material: {fileID: 0} - m_Color: {r: 0.50980395, g: 0.3606034, b: 0, a: 0} - m_RaycastTarget: 0 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 --- !u!33 &4647356257150210242 MeshFilter: m_ObjectHideFlags: 0 @@ -3509310,36 +3508606,6 @@ GameObject: m_NavMeshLayer: 0 m_StaticEditorFlags: 0 m_IsActive: 1 ---- !u!114 &4841448913657607015 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 3240856531550482140} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Image - m_Material: {fileID: 0} - m_Color: {r: 0.43093073, g: 0, b: 0.509434, a: 0} - m_RaycastTarget: 0 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 0} - m_Type: 0 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 --- !u!33 &4846535479662421169 MeshFilter: m_ObjectHideFlags: 0 @@ -3513461,9 +3512727,7 @@ RectTransform: m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 1265595688} - - {fileID: 1927290005} + m_Children: [] m_Father: {fileID: 8294780350178558349} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -3514579,20 +3513843,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 737451179} - _hallucinationVideo: {fileID: 1520656449} - _topEyelid: {fileID: 1297401521} - _bottomEyelid: {fileID: 1463395676} + _clip: {fileID: 0} + _material: {fileID: 0} _closeDuration: 0.06 _holdClosed: 0.1 _openDuration: 0.1 _visibleHold: 0.8 _showVideoAtCloseProgress: 1 - _playbackSpeed: 1.5 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 2500 - _closedOffset: 100 --- !u!1 &6309718822811934455 GameObject: m_ObjectHideFlags: 0 @@ -3515842,20 +3515099,13 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 3aa8c513a3632aa4aa3b8ca2da6ca926, type: 3} m_Name: m_EditorClassIdentifier: Assembly-CSharp::Unheimlich.Features.Hallucination.HallucinationFlash - _videoPlayer: {fileID: 1265595689} - _hallucinationVideo: {fileID: 1927290006} - _topEyelid: {fileID: 1297401521} - _bottomEyelid: {fileID: 1463395676} + _clip: {fileID: 0} + _material: {fileID: 0} _closeDuration: 0.06 _holdClosed: 0.1 _openDuration: 0.1 _visibleHold: 1.5 _showVideoAtCloseProgress: 1 - _playbackSpeed: 1.5 - _skipOnDrop: 1 - _logVideoDebug: 0 - _openOffset: 2500 - _closedOffset: 100 --- !u!33 &6816362058036913435 MeshFilter: m_ObjectHideFlags: 0 @@ -3522737,7 +3521987,6 @@ GameObject: - component: {fileID: 3944854789548425406} - component: {fileID: 3473725938941227729} - component: {fileID: 8140630728792379927} - - component: {fileID: 4647244026515023095} m_Layer: 0 m_Name: HallucinationFlashC m_TagString: Untagged @@ -3523413,7 +3522662,6 @@ RectTransform: - {fileID: 4043674246273560190} - {fileID: 5953892496422445155} - {fileID: 3944854789548425406} - - {fileID: 28453596} m_Father: {fileID: 8886833518752126914} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} diff --git a/Assets/_Content/Scripts/Features/Hallucination/Runtime/HallucinationFlash.cs b/Assets/_Content/Scripts/Features/Hallucination/Runtime/HallucinationFlash.cs index 70f16dbf..09a42439 100644 --- a/Assets/_Content/Scripts/Features/Hallucination/Runtime/HallucinationFlash.cs +++ b/Assets/_Content/Scripts/Features/Hallucination/Runtime/HallucinationFlash.cs @@ -1,171 +1,56 @@ -using System.Collections; using UnityEngine; -using UnityEngine.UI; using UnityEngine.Video; +using OctoCore.Transitions; +using Unheimlich.Transitions; namespace Unheimlich.Features.Hallucination { /// - /// Plays a short hallucination video using an eye blink transition on the HUD canvas. - /// Movement is handled via LeanTween. - /// Call Play() to trigger the hallucination. + /// Scene-local trigger for a double-blink hallucination sequence. Delegates all + /// visual work to the persistent OctoEyelidBlink singleton. /// public class HallucinationFlash : MonoBehaviour { - [Header("Target")] - [SerializeField] private VideoPlayer _videoPlayer; - [SerializeField] private RawImage _hallucinationVideo; - [SerializeField] private Image _topEyelid; - [SerializeField] private Image _bottomEyelid; + [SerializeField] private VideoClip _clip; + [SerializeField] private Material _material; [Header("Timings")] [SerializeField, Min(0f)] private float _closeDuration = 0.1f; - [SerializeField, Min(0f)] private float _holdClosed = 0.05f; - [SerializeField, Min(0f)] private float _openDuration = 0.15f; - [SerializeField, Min(0f)] private float _visibleHold = 0.5f; - - [Header("Video Timing")] + [SerializeField, Min(0f)] private float _holdClosed = 0.05f; + [SerializeField, Min(0f)] private float _openDuration = 0.15f; + [SerializeField, Min(0f)] private float _visibleHold = 0.5f; [SerializeField, Range(0f, 1f)] private float _showVideoAtCloseProgress = 0.25f; - [Header("Video Playback")] - [SerializeField, Min(0f)] private float _playbackSpeed = 1f; - [SerializeField] private bool _skipOnDrop = true; - [SerializeField] private bool _logVideoDebug = false; - - [Header("Positions")] - [SerializeField] private float _openOffset = 600f; - [SerializeField] private float _closedOffset = 0f; - - private int _topTweenId = -1; - private int _bottomTweenId = -1; - private int _delayTweenId = -1; - private int _videoTweenId = -1; - - private bool _isWarmedUp; - private bool _playWhenReady; - private bool _videoShown; - - private void Awake() - { - SetHallucinationVisible(false); - SetEyelidsOpen(); - - ConfigureVideoPlayer(); - } - - private void Start() - { - StartCoroutine(WarmUpVideo()); - } - + /// Triggers the hallucination sequence. No-op if the singleton is missing or busy. public void Play() { - if (!_isWarmedUp) + OctoEyelidBlink blink = OctoEyelidBlink.Instance; + + if (blink == null) { - _playWhenReady = true; + Debug.LogWarning("[HallucinationFlash] OctoEyelidBlink singleton not found in scene."); return; } - PlayPreparedSequence(); - } - - private void ConfigureVideoPlayer() - { - if (_videoPlayer == null) + if (blink.IsBusy) return; - _videoPlayer.playOnAwake = false; - _videoPlayer.isLooping = false; - _videoPlayer.waitForFirstFrame = true; - _videoPlayer.skipOnDrop = _skipOnDrop; - _videoPlayer.playbackSpeed = _playbackSpeed; + blink.SetClip(_clip, _material); - if (_logVideoDebug) + blink.CloseEyes(_closeDuration, () => { - Debug.Log( - "[HallucinationFlash] ConfigureVideoPlayer" - + " | speed=" + _videoPlayer.playbackSpeed - + " | canSetSpeed=" + _videoPlayer.canSetPlaybackSpeed - + " | skipOnDrop=" + _videoPlayer.skipOnDrop - + " | updateMode=" + _videoPlayer.timeUpdateMode - ); - } - } - - private IEnumerator WarmUpVideo() - { - if (_videoPlayer == null) - yield break; - - SetHallucinationVisible(false); - - ConfigureVideoPlayer(); - - _videoPlayer.Prepare(); - - while (!_videoPlayer.isPrepared) - yield return null; - - ConfigureVideoPlayer(); - - // Play once while hidden to force Unity to decode the first frames. - _videoPlayer.Play(); - - while (!_videoPlayer.isPlaying) - yield return null; - - // Wait a few frames so the RenderTexture actually receives video data. - yield return null; - yield return null; - yield return null; - - _videoPlayer.Pause(); - _videoPlayer.time = 0.0; - ConfigureVideoPlayer(); - - // Wait one frame after seeking back to the beginning. - yield return null; - - _isWarmedUp = true; - - if (!_playWhenReady) - yield break; - - _playWhenReady = false; - PlayPreparedSequence(); - } - - private void PlayPreparedSequence() - { - CancelCurrent(); - - ResetVideoToStart(); - SetHallucinationVisible(false); - SetEyelidsOpen(); - - _videoShown = false; - - CloseEyes(() => - { - if (!_videoShown) - ShowVideo(); - - HoldClosed(() => + blink.Hold(_holdClosed, () => { - OpenEyes(() => + blink.OpenEyes(_openDuration, () => { - HoldVisible(() => + blink.Hold(_visibleHold, () => { - CloseEyes(() => + blink.CloseEyes(_closeDuration, () => { - HideVideo(); - - HoldClosed(() => + blink.HideVideo(); + blink.Hold(_holdClosed, () => { - OpenEyes(() => - { - ClearTweenIds(); - }); + blink.OpenEyes(_openDuration, null); }); }); }); @@ -173,201 +58,7 @@ namespace Unheimlich.Features.Hallucination }); }); - ShowVideoDuringClose(); - } - - private void CloseEyes(System.Action onComplete) - { - RectTransform top = _topEyelid.rectTransform; - RectTransform bottom = _bottomEyelid.rectTransform; - - _topTweenId = LeanTween.moveY(top, _closedOffset, _closeDuration) - .setEase(LeanTweenType.easeOutQuad) - .setOnComplete(() => - { - _topTweenId = -1; - onComplete?.Invoke(); - }) - .id; - - _bottomTweenId = LeanTween.moveY(bottom, -_closedOffset, _closeDuration) - .setEase(LeanTweenType.easeOutQuad) - .setOnComplete(() => - { - _bottomTweenId = -1; - }) - .id; - } - - private void OpenEyes(System.Action onComplete) - { - RectTransform top = _topEyelid.rectTransform; - RectTransform bottom = _bottomEyelid.rectTransform; - - _topTweenId = LeanTween.moveY(top, _openOffset, _openDuration) - .setEase(LeanTweenType.easeInQuad) - .setOnComplete(() => - { - _topTweenId = -1; - onComplete?.Invoke(); - }) - .id; - - _bottomTweenId = LeanTween.moveY(bottom, -_openOffset, _openDuration) - .setEase(LeanTweenType.easeInQuad) - .setOnComplete(() => - { - _bottomTweenId = -1; - }) - .id; - } - - private void ShowVideoDuringClose() - { - float delay = _closeDuration * _showVideoAtCloseProgress; - - _videoTweenId = LeanTween.delayedCall(gameObject, delay, () => - { - _videoTweenId = -1; - ShowVideo(); - }).id; - } - - private void ShowVideo() - { - if (_videoShown) - return; - - _videoShown = true; - - SetHallucinationVisible(true); - PlayVideo(); - } - - private void HideVideo() - { - PauseVideoAtStart(); - SetHallucinationVisible(false); - } - - private void HoldClosed(System.Action onComplete) - { - _delayTweenId = LeanTween.delayedCall(gameObject, _holdClosed, () => - { - _delayTweenId = -1; - onComplete?.Invoke(); - }).id; - } - - private void HoldVisible(System.Action onComplete) - { - _delayTweenId = LeanTween.delayedCall(gameObject, _visibleHold, () => - { - _delayTweenId = -1; - onComplete?.Invoke(); - }).id; - } - - private void PlayVideo() - { - if (_videoPlayer == null) - return; - - ConfigureVideoPlayer(); - - // Do not Stop() here. Stop() can reintroduce decoding latency. - _videoPlayer.Play(); - - if (_logVideoDebug) - { - Debug.Log( - "[HallucinationFlash] PlayVideo" - + " | speed=" + _videoPlayer.playbackSpeed - + " | canSetSpeed=" + _videoPlayer.canSetPlaybackSpeed - + " | time=" + _videoPlayer.time - + " | frame=" + _videoPlayer.frame - ); - } - } - - private void ResetVideoToStart() - { - if (_videoPlayer == null) - return; - - _videoPlayer.Pause(); - _videoPlayer.time = 0.0; - - ConfigureVideoPlayer(); - } - - private void PauseVideoAtStart() - { - if (_videoPlayer == null) - return; - - _videoPlayer.Pause(); - _videoPlayer.time = 0.0; - - ConfigureVideoPlayer(); - } - - private void SetHallucinationVisible(bool visible) - { - if (_hallucinationVideo == null) - return; - - _hallucinationVideo.enabled = visible; - } - - private void SetEyelidsOpen() - { - if (_topEyelid == null || _bottomEyelid == null) - return; - - RectTransform top = _topEyelid.rectTransform; - RectTransform bottom = _bottomEyelid.rectTransform; - - top.anchoredPosition = new Vector2(top.anchoredPosition.x, _openOffset); - bottom.anchoredPosition = new Vector2(bottom.anchoredPosition.x, -_openOffset); - } - - private void CancelCurrent() - { - _playWhenReady = false; - _videoShown = false; - - if (_topTweenId != -1) - { - LeanTween.cancel(_topTweenId); - _topTweenId = -1; - } - - if (_bottomTweenId != -1) - { - LeanTween.cancel(_bottomTweenId); - _bottomTweenId = -1; - } - - if (_delayTweenId != -1) - { - LeanTween.cancel(_delayTweenId); - _delayTweenId = -1; - } - - if (_videoTweenId != -1) - { - LeanTween.cancel(_videoTweenId); - _videoTweenId = -1; - } - } - - private void ClearTweenIds() - { - _topTweenId = -1; - _bottomTweenId = -1; - _delayTweenId = -1; - _videoTweenId = -1; + blink.ShowVideoAfterDelay(_closeDuration * _showVideoAtCloseProgress); } } } \ No newline at end of file diff --git a/Assets/_Content/Scripts/Features/Hallucination/Runtime/OctoEyelidBlink.cs b/Assets/_Content/Scripts/Features/Hallucination/Runtime/OctoEyelidBlink.cs new file mode 100644 index 00000000..ef93dfcd --- /dev/null +++ b/Assets/_Content/Scripts/Features/Hallucination/Runtime/OctoEyelidBlink.cs @@ -0,0 +1,296 @@ +using System; +using System.Collections; +using UnityEngine; +using UnityEngine.UI; +using UnityEngine.Video; +using OctoCore.Transitions; +using Unheimlich.Core; + +namespace Unheimlich.Transitions +{ + /// + /// Persistent singleton engine for "eyelid blink" transitions (eyelids + optional video overlay). + /// Lives outside the OctoCore package (this project already references LeanTween here), and + /// implements IOctoSceneTransition so OctoNavigation can drive it without the package ever + /// depending on LeanTween or this concrete type. Registers itself with OctoTransitionProvider + /// once ready so the package can find it at runtime. + /// + public class OctoEyelidBlink : Singleton, IOctoSceneTransition + { + [Header("Eyelids")] + [SerializeField] private Image _topEyelid; + [SerializeField] private Image _bottomEyelid; + + [Header("Video")] + [Tooltip("RawImage displaying the shared RenderTexture. Its material is swapped per call.")] + [SerializeField] private RawImage _videoDisplay; + [SerializeField] private VideoPlayer _videoPlayer; + [SerializeField] private bool _skipOnDrop = true; + [SerializeField] private bool _logVideoDebug = false; + + [Header("Positions")] + [SerializeField] private float _openOffset = 600f; + [SerializeField] private float _closedOffset = 0f; + + /// True while a blink sequence is currently animating. + public bool IsBusy { get; private set; } + + private int _topTweenId = -1; + private int _bottomTweenId = -1; + private int _delayTweenId = -1; + private int _videoTweenId = -1; + + private bool _isWarmedUp; + private bool _videoShown; + private VideoClip _pendingClip; + private Material _defaultMaterial; + + private bool HasVideo => _videoPlayer != null && _videoDisplay != null && _videoPlayer.clip != null; + + protected override void OnAwake() + { + OctoTransitionProvider.Current = this; + + // Only call DontDestroyOnLoad on a root object. If this component already lives + // under the persistent Octo prefab, the parent handles persistence and this is a no-op. + if (transform.parent == null) + DontDestroyOnLoad(gameObject); + + if (_videoDisplay != null) + _defaultMaterial = _videoDisplay.material; + + SetEyelidsOpen(); + SetVideoVisible(false); + ConfigureVideoPlayer(); + } + + // Re-registers with the transition provider whenever Instance is restored + // (e.g. after a SubsystemRegistration reset with Domain Reload disabled). + protected override void OnEnabled() + { + OctoTransitionProvider.Current = this; + } + + protected override void OnDestroyInstance() + { + if (OctoTransitionProvider.Current == (IOctoSceneTransition)this) + OctoTransitionProvider.Current = null; + } + + // ---------- IOctoSceneTransition ---------- + + /// + /// Assigns the video clip and optional material to use during the next CloseEyes() call + /// and starts warming the clip up. Pass a null clip to perform a plain blink with no video. + /// A null material falls back to the RawImage's default material. + /// + public void SetClip(VideoClip clip, Material material) + { + if (_videoDisplay != null) + _videoDisplay.material = material != null ? material : _defaultMaterial; + + if (_videoPlayer == null) + return; + + _isWarmedUp = false; + _pendingClip = clip; + _videoPlayer.clip = clip; + + if (clip != null) + StartCoroutine(WarmUpVideo()); + } + + /// Closes the eyelids over the given duration and invokes the callback on completion. + public void CloseEyes(float duration, Action onComplete) + { + IsBusy = true; + CancelCurrent(); + ResetVideoToStart(); + _videoShown = false; + + RectTransform top = _topEyelid.rectTransform; + RectTransform bottom = _bottomEyelid.rectTransform; + + _topTweenId = LeanTween.moveY(top, _closedOffset, duration) + .setEase(LeanTweenType.easeOutQuad) + .setOnComplete(() => + { + _topTweenId = -1; + onComplete?.Invoke(); + }) + .id; + + _bottomTweenId = LeanTween.moveY(bottom, -_closedOffset, duration) + .setEase(LeanTweenType.easeOutQuad) + .setOnComplete(() => _bottomTweenId = -1) + .id; + } + + /// Opens the eyelids over the given duration and invokes the callback on completion. + public void OpenEyes(float duration, Action onComplete) + { + RectTransform top = _topEyelid.rectTransform; + RectTransform bottom = _bottomEyelid.rectTransform; + + _topTweenId = LeanTween.moveY(top, _openOffset, duration) + .setEase(LeanTweenType.easeInQuad) + .setOnComplete(() => + { + _topTweenId = -1; + onComplete?.Invoke(); + }) + .id; + + _bottomTweenId = LeanTween.moveY(bottom, -_openOffset, duration) + .setEase(LeanTweenType.easeInQuad) + .setOnComplete(() => + { + _bottomTweenId = -1; + IsBusy = false; + }) + .id; + } + + /// Stops playback, resets the video to its first frame, and hides the overlay. + public void HideVideo() + { + if (!HasVideo) + return; + + _videoPlayer.Pause(); + _videoPlayer.time = 0.0; + SetVideoVisible(false); + _videoShown = false; + } + + /// Reveals and plays the video overlay after the given delay, once warm-up has completed. + public void ShowVideoAfterDelay(float delay) + { + if (!HasVideo) + return; + + _videoTweenId = LeanTween.delayedCall(gameObject, delay, () => + { + _videoTweenId = -1; + ShowVideo(); + }).id; + } + + // ---------- Extra API (not part of the interface, used by HallucinationFlash directly) ---------- + + /// Waits for the given duration before invoking the callback. + public void Hold(float duration, Action onComplete) + { + _delayTweenId = LeanTween.delayedCall(gameObject, duration, () => + { + _delayTweenId = -1; + onComplete?.Invoke(); + }).id; + } + + // ---------- Video internals ---------- + + private void ConfigureVideoPlayer() + { + if (_videoPlayer == null) + return; + + _videoPlayer.playOnAwake = false; + _videoPlayer.isLooping = false; + _videoPlayer.waitForFirstFrame = true; + _videoPlayer.skipOnDrop = _skipOnDrop; + } + + /// + /// Prepares and briefly plays the assigned clip while hidden, forcing Unity to + /// decode the first frames ahead of time. Prevents a blank/garbage frame from + /// being visible the first time the video is actually shown. + /// + private IEnumerator WarmUpVideo() + { + if (!HasVideo) + yield break; + + SetVideoVisible(false); + ConfigureVideoPlayer(); + _videoPlayer.Prepare(); + + while (!_videoPlayer.isPrepared) + yield return null; + + _videoPlayer.Play(); + while (!_videoPlayer.isPlaying) + yield return null; + + // Wait a few frames so the RenderTexture actually receives video data. + yield return null; + yield return null; + yield return null; + + _videoPlayer.Pause(); + _videoPlayer.time = 0.0; + + // Wait one additional frame after seeking back to the start. + yield return null; + + _isWarmedUp = true; + + if (_logVideoDebug) + Debug.Log($"[OctoEyelidBlink] Warm-up complete for clip: {_pendingClip?.name}"); + } + + private void ShowVideo() + { + if (!HasVideo || _videoShown) + return; + + // Safety check: if warm-up hasn't completed yet (e.g. clip assigned too late), + // skip showing the video rather than risk a corrupted first frame. The eyelid + // blink itself remains unaffected. + if (!_isWarmedUp) + { + if (_logVideoDebug) + Debug.LogWarning("[OctoEyelidBlink] Video not warmed up in time, skipping display."); + + return; + } + + _videoShown = true; + SetVideoVisible(true); + _videoPlayer.Play(); + } + + private void ResetVideoToStart() + { + if (!HasVideo) + return; + + _videoPlayer.Pause(); + _videoPlayer.time = 0.0; + } + + private void SetVideoVisible(bool visible) + { + if (_videoDisplay != null) + _videoDisplay.enabled = visible; + } + + // ---------- Eyelid internals ---------- + + private void SetEyelidsOpen() + { + _topEyelid.rectTransform.anchoredPosition = + new Vector2(_topEyelid.rectTransform.anchoredPosition.x, _openOffset); + _bottomEyelid.rectTransform.anchoredPosition = + new Vector2(_bottomEyelid.rectTransform.anchoredPosition.x, -_openOffset); + } + + private void CancelCurrent() + { + if (_topTweenId != -1) { LeanTween.cancel(_topTweenId); _topTweenId = -1; } + if (_bottomTweenId != -1) { LeanTween.cancel(_bottomTweenId); _bottomTweenId = -1; } + if (_delayTweenId != -1) { LeanTween.cancel(_delayTweenId); _delayTweenId = -1; } + if (_videoTweenId != -1) { LeanTween.cancel(_videoTweenId); _videoTweenId = -1; } + } + } +} \ No newline at end of file diff --git a/Assets/_Content/Scripts/Features/Hallucination/Runtime/OctoEyelidBlink.cs.meta b/Assets/_Content/Scripts/Features/Hallucination/Runtime/OctoEyelidBlink.cs.meta new file mode 100644 index 00000000..7196f59e --- /dev/null +++ b/Assets/_Content/Scripts/Features/Hallucination/Runtime/OctoEyelidBlink.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 6a2c4b14bcd9d8a4aa612f357af4125b \ No newline at end of file diff --git a/Packages/OctoCore/Runtime/Scripts/Navigation/Data/OctoSceneData.cs b/Packages/OctoCore/Runtime/Scripts/Navigation/Data/OctoSceneData.cs index 1d259427..16a01d05 100644 --- a/Packages/OctoCore/Runtime/Scripts/Navigation/Data/OctoSceneData.cs +++ b/Packages/OctoCore/Runtime/Scripts/Navigation/Data/OctoSceneData.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityEngine.Video; namespace OctoCore.Navigation.Data { @@ -27,6 +28,21 @@ namespace OctoCore.Navigation.Data [Tooltip("Enable fade transition")] public bool UseFadeTransition = true; + /// + /// Video clip played on the eyelid overlay while transitioning into this scene. + /// Optional — leave empty for a plain blink with no video. + /// + [Tooltip("Video clip played during the transition into this scene (optional)")] + public VideoClip TransitionClip; + + /// + /// Material applied to the eyelid overlay's RawImage while this scene's transition + /// clip is playing (e.g. a sketch/bleed shader). Falls back to the overlay's default + /// material if left empty. + /// + [Tooltip("Material applied to the video overlay for this scene's transition (optional)")] + public Material TransitionMaterial; + #if UNITY_EDITOR void OnValidate() { @@ -35,4 +51,4 @@ namespace OctoCore.Navigation.Data } #endif } -} +} \ No newline at end of file diff --git a/Packages/OctoCore/Runtime/Scripts/Navigation/Data/OctoTeleporterData.cs b/Packages/OctoCore/Runtime/Scripts/Navigation/Data/OctoTeleporterData.cs index 0c9de7d6..16c4652b 100644 --- a/Packages/OctoCore/Runtime/Scripts/Navigation/Data/OctoTeleporterData.cs +++ b/Packages/OctoCore/Runtime/Scripts/Navigation/Data/OctoTeleporterData.cs @@ -1,4 +1,5 @@ using UnityEngine; +using UnityEngine.Video; namespace OctoCore.Navigation.Data { @@ -29,9 +30,29 @@ namespace OctoCore.Navigation.Data /// /// Enable fade transition during teleport. + /// Disabled by default: teleporters already have their own stencil/mask visual + /// effect, so the eyelid blink transition is redundant unless explicitly enabled + /// for a specific teleporter that needs it. /// - [Tooltip("Enable fade transition")] - public bool UseFadeTransition = true; + [Tooltip("Enable eyelid blink transition (usually left off, teleporters already have their own stencil effect)")] + public bool UseFadeTransition = false; + + /// + /// Video clip played on the eyelid overlay while this teleport is in progress. + /// Only used if UseFadeTransition is enabled. Optional — leave empty for a plain + /// blink with no video. + /// + [Tooltip("Video clip played during this teleport, if UseFadeTransition is enabled (optional)")] + public VideoClip TransitionClip; + + /// + /// Material applied to the eyelid overlay's RawImage while this teleporter's + /// transition clip is playing (e.g. a sketch/bleed shader). Only used if + /// UseFadeTransition is enabled. Falls back to the overlay's default material + /// if left empty. + /// + [Tooltip("Material applied to the video overlay for this teleport, if UseFadeTransition is enabled (optional)")] + public Material TransitionMaterial; #if UNITY_EDITOR void OnValidate() @@ -41,4 +62,4 @@ namespace OctoCore.Navigation.Data } #endif } -} +} \ No newline at end of file diff --git a/Packages/OctoCore/Runtime/Scripts/Navigation/IOctoSceneTransition.cs b/Packages/OctoCore/Runtime/Scripts/Navigation/IOctoSceneTransition.cs new file mode 100644 index 00000000..bb948720 --- /dev/null +++ b/Packages/OctoCore/Runtime/Scripts/Navigation/IOctoSceneTransition.cs @@ -0,0 +1,36 @@ +using System; +using UnityEngine; +using UnityEngine.Video; + +namespace OctoCore.Transitions +{ + /// + /// Contract for a scene-transition visual effect (eyelid blink, plain fade, etc.). + /// Lives inside the OctoCore package and has zero dependency on any concrete + /// implementation or third-party tweening library. OctoNavigation only ever + /// talks to this interface, never to a concrete type. + /// + public interface IOctoSceneTransition + { + /// True while a transition sequence is currently animating. + bool IsBusy { get; } + + /// + /// Assigns the visual content (clip/material) to use for the next CloseEyes() call. + /// Pass a null clip for a plain transition with no video overlay. + /// + void SetClip(VideoClip clip, Material material); + + /// Closes the transition over the given duration and invokes the callback on completion. + void CloseEyes(float duration, Action onComplete); + + /// Opens the transition over the given duration and invokes the callback on completion. + void OpenEyes(float duration, Action onComplete); + + /// Stops and hides any video overlay currently playing. + void HideVideo(); + + /// Reveals the video overlay after the given delay, if a clip is assigned. + void ShowVideoAfterDelay(float delay); + } +} diff --git a/Packages/OctoCore/Runtime/Scripts/Navigation/IOctoSceneTransition.cs.meta b/Packages/OctoCore/Runtime/Scripts/Navigation/IOctoSceneTransition.cs.meta new file mode 100644 index 00000000..656702bf --- /dev/null +++ b/Packages/OctoCore/Runtime/Scripts/Navigation/IOctoSceneTransition.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: 602c52bb0cc632440a621c93bbd9d5ad \ No newline at end of file diff --git a/Packages/OctoCore/Runtime/Scripts/Navigation/OctoNavigation.cs b/Packages/OctoCore/Runtime/Scripts/Navigation/OctoNavigation.cs index 18c8ea07..c4f989b5 100644 --- a/Packages/OctoCore/Runtime/Scripts/Navigation/OctoNavigation.cs +++ b/Packages/OctoCore/Runtime/Scripts/Navigation/OctoNavigation.cs @@ -3,6 +3,7 @@ using System.Collections; using UnityEngine; using UnityEngine.SceneManagement; using OctoCore.Navigation.Data; +using OctoCore.Transitions; #if OCTO_ADDRESSABLES using UnityEngine.AddressableAssets; @@ -50,7 +51,6 @@ namespace OctoCore.Navigation public Action OnTeleportCompleted; private Coroutine _loadingCoroutine; - private OctoSceneFade _fadeCanvas; private bool _setPlayerRotation; public void Init(OctoSettings settings) @@ -66,8 +66,11 @@ namespace OctoCore.Navigation } } - // Create fade canvas - CreateFadeCanvas(); + // The concrete transition effect (eyelid blink, plain fade, etc.) lives outside + // this package and registers itself with OctoTransitionProvider at runtime. + // Nothing to instantiate here. + if (OctoTransitionProvider.Current == null) + Debug.LogWarning("[OctoNavigation] No IOctoSceneTransition registered with OctoTransitionProvider. Scene transitions will have no visual effect."); if (OctoEvents.Instance) OctoEvents.Instance.SetScenesInitialized(); @@ -136,18 +139,63 @@ namespace OctoCore.Navigation } } + /// + /// Resolves the video clip to use for a transition: the scene/teleporter's own + /// clip if assigned, otherwise the global default from FadeSettings. + /// + private UnityEngine.Video.VideoClip ResolveClip(UnityEngine.Video.VideoClip specific, OctoSettings.ScenesSettings.FadeTransitionSettings fadeSettings) + { + return specific != null ? specific : fadeSettings.DefaultTransitionClip; + } + + /// + /// Resolves the material to use for a transition: the scene/teleporter's own + /// material if assigned, otherwise the global default from FadeSettings. + /// + private Material ResolveMaterial(Material specific, OctoSettings.ScenesSettings.FadeTransitionSettings fadeSettings) + { + return specific != null ? specific : fadeSettings.DefaultTransitionMaterial; + } + + /// + /// Waits for IOctoSceneTransition.CloseEyes() to complete. Bridges the callback-based + /// transition API with this class's coroutine-based flow. + /// + private IEnumerator CloseEyesRoutine(IOctoSceneTransition transition, float duration) + { + bool done = false; + transition.CloseEyes(duration, () => done = true); + while (!done) + yield return null; + } + + /// + /// Waits for IOctoSceneTransition.OpenEyes() to complete. Bridges the callback-based + /// transition API with this class's coroutine-based flow. + /// + private IEnumerator OpenEyesRoutine(IOctoSceneTransition transition, float duration) + { + bool done = false; + transition.OpenEyes(duration, () => done = true); + while (!done) + yield return null; + } + private IEnumerator LoadSceneCoroutine(OctoSceneData sceneData) { OnSceneLoadStarted?.Invoke(sceneData); // Get global fade settings OctoSettings.ScenesSettings.FadeTransitionSettings fadeSettings = OctoCore.Instance.Settings.Scenes.FadeSettings; + IOctoSceneTransition transition = OctoTransitionProvider.Current; // Fade out - if (sceneData.UseFadeTransition && _fadeCanvas) + if (sceneData.UseFadeTransition && transition != null) { - _fadeCanvas.FadeOut(fadeSettings.FadeOutDuration, fadeSettings.FadeColor); - yield return new WaitForSeconds(fadeSettings.FadeOutDuration); + transition.SetClip(ResolveClip(sceneData.TransitionClip, fadeSettings), ResolveMaterial(sceneData.TransitionMaterial, fadeSettings)); + yield return CloseEyesRoutine(transition, fadeSettings.FadeOutDuration); + transition.ShowVideoAfterDelay(0f); + yield return new WaitForSeconds(fadeSettings.HoldClosedDuration); } // Check if using Addressables @@ -165,10 +213,10 @@ namespace OctoCore.Navigation } // Fade in - if (sceneData.UseFadeTransition && _fadeCanvas) + if (sceneData.UseFadeTransition && transition != null) { - _fadeCanvas.FadeIn(fadeSettings.FadeInDuration); - yield return new WaitForSeconds(fadeSettings.FadeInDuration); + yield return OpenEyesRoutine(transition, fadeSettings.FadeInDuration); + transition.HideVideo(); } OnSceneLoadCompleted?.Invoke(sceneData); @@ -200,12 +248,15 @@ namespace OctoCore.Navigation { // Get global fade settings OctoSettings.ScenesSettings.FadeTransitionSettings fadeSettings = OctoCore.Instance.Settings.Scenes.FadeSettings; + IOctoSceneTransition transition = OctoTransitionProvider.Current; // Fade out - if (teleporter.UseFadeTransition && _fadeCanvas) + if (teleporter.UseFadeTransition && transition != null) { - _fadeCanvas.FadeOut(fadeSettings.FadeOutDuration, fadeSettings.FadeColor); - yield return new WaitForSeconds(fadeSettings.FadeOutDuration); + transition.SetClip(ResolveClip(teleporter.TransitionClip, fadeSettings), ResolveMaterial(teleporter.TransitionMaterial, fadeSettings)); + yield return CloseEyesRoutine(transition, fadeSettings.FadeOutDuration); + transition.ShowVideoAfterDelay(0f); + yield return new WaitForSeconds(fadeSettings.HoldClosedDuration); } // Find target teleporter @@ -222,10 +273,10 @@ namespace OctoCore.Navigation } // Fade in - if (teleporter.UseFadeTransition && _fadeCanvas) + if (teleporter.UseFadeTransition && transition != null) { - _fadeCanvas.FadeIn(fadeSettings.FadeInDuration); - yield return new WaitForSeconds(fadeSettings.FadeInDuration); + yield return OpenEyesRoutine(transition, fadeSettings.FadeInDuration); + transition.HideVideo(); } OnTeleportCompleted?.Invoke(null, teleporter); @@ -235,12 +286,15 @@ namespace OctoCore.Navigation { // Get global fade settings OctoSettings.ScenesSettings.FadeTransitionSettings fadeSettings = OctoCore.Instance.Settings.Scenes.FadeSettings; + IOctoSceneTransition transition = OctoTransitionProvider.Current; // Fade out - if (teleporter.UseFadeTransition && _fadeCanvas) + if (teleporter.UseFadeTransition && transition != null) { - _fadeCanvas.FadeOut(fadeSettings.FadeOutDuration, fadeSettings.FadeColor); - yield return new WaitForSeconds(fadeSettings.FadeOutDuration); + transition.SetClip(ResolveClip(teleporter.TransitionClip, fadeSettings), ResolveMaterial(teleporter.TransitionMaterial, fadeSettings)); + yield return CloseEyesRoutine(transition, fadeSettings.FadeOutDuration); + transition.ShowVideoAfterDelay(0f); + yield return new WaitForSeconds(fadeSettings.HoldClosedDuration); } // Store pending teleporter @@ -296,12 +350,13 @@ namespace OctoCore.Navigation // Get global fade settings OctoSettings.ScenesSettings.FadeTransitionSettings fadeSettings = OctoCore.Instance.Settings.Scenes.FadeSettings; + IOctoSceneTransition transition = OctoTransitionProvider.Current; // Fade in - if (_fadeCanvas) + if (transition != null) { - _fadeCanvas.FadeIn(fadeSettings.FadeInDuration); - yield return new WaitForSeconds(fadeSettings.FadeInDuration); + yield return OpenEyesRoutine(transition, fadeSettings.FadeInDuration); + transition.HideVideo(); } OnTeleportCompleted?.Invoke(null, teleporter.TeleporterData); @@ -321,13 +376,5 @@ namespace OctoCore.Navigation OctoTeleporterProxy.Instance.Teleport(teleporter.transform.position); } } - - private void CreateFadeCanvas() - { - GameObject fadeObj = new GameObject("OctoSceneFade"); - GameObject.DontDestroyOnLoad(fadeObj); - _fadeCanvas = fadeObj.AddComponent(); - _fadeCanvas.Initialize(); - } } } \ No newline at end of file diff --git a/Packages/OctoCore/Runtime/Scripts/Navigation/OctoTransitionProvider.cs b/Packages/OctoCore/Runtime/Scripts/Navigation/OctoTransitionProvider.cs new file mode 100644 index 00000000..d209514f --- /dev/null +++ b/Packages/OctoCore/Runtime/Scripts/Navigation/OctoTransitionProvider.cs @@ -0,0 +1,18 @@ +namespace OctoCore.Transitions +{ + /// + /// Holds the currently active IOctoSceneTransition implementation. + /// The concrete implementation (e.g. an eyelid-blink component living outside the + /// OctoCore package, using LeanTween or any other tweening library) registers itself + /// here at runtime. OctoNavigation reads Current instead of referencing any concrete + /// type directly, keeping the package free of external dependencies. + /// + public static class OctoTransitionProvider + { + /// + /// The active transition implementation, or null if none has registered yet. + /// Callers in OctoCore must null-check before use. + /// + public static IOctoSceneTransition Current { get; set; } + } +} diff --git a/Packages/OctoCore/Runtime/Scripts/Navigation/OctoTransitionProvider.cs.meta b/Packages/OctoCore/Runtime/Scripts/Navigation/OctoTransitionProvider.cs.meta new file mode 100644 index 00000000..c9913216 --- /dev/null +++ b/Packages/OctoCore/Runtime/Scripts/Navigation/OctoTransitionProvider.cs.meta @@ -0,0 +1,2 @@ +fileFormatVersion: 2 +guid: d238165ccb7dd4745895e54eb945e2d8 \ No newline at end of file diff --git a/Packages/OctoCore/Runtime/Scripts/OctoSettings.cs b/Packages/OctoCore/Runtime/Scripts/OctoSettings.cs index fb6e0c5e..06a016f4 100644 --- a/Packages/OctoCore/Runtime/Scripts/OctoSettings.cs +++ b/Packages/OctoCore/Runtime/Scripts/OctoSettings.cs @@ -225,12 +225,14 @@ namespace OctoCore { /// /// Fade in duration in seconds. + /// Also used as the eyelid opening duration for blink transitions. /// [Tooltip("Fade in duration")] public float FadeInDuration = 0.5f; /// /// Fade out duration in seconds. + /// Also used as the eyelid closing duration for blink transitions. /// [Tooltip("Fade out duration")] public float FadeOutDuration = 0.5f; @@ -240,6 +242,27 @@ namespace OctoCore /// [Tooltip("Fade color")] public Color FadeColor = Color.black; + + /// + /// Time to hold the eyelids fully closed before reopening, on top of + /// whatever time the scene load or teleport itself takes. + /// + [Tooltip("Time to hold the eyelids fully closed before reopening")] + public float HoldClosedDuration = 0.1f; + + /// + /// Fallback video clip used when a scene or teleporter doesn't specify + /// its own TransitionClip. Leave empty for a plain blink by default. + /// + [Tooltip("Fallback video clip used when a scene/teleporter has none assigned")] + public UnityEngine.Video.VideoClip DefaultTransitionClip; + + /// + /// Fallback material applied to the video overlay when a scene or + /// teleporter doesn't specify its own TransitionMaterial. + /// + [Tooltip("Fallback material used when a scene/teleporter has none assigned")] + public Material DefaultTransitionMaterial; } ///