Add Idle Loop in SBB, change NamedDepthkitPlayer for handling looping videos

This commit is contained in:
Nadine Ganz 2025-03-07 14:27:58 +01:00
parent 52832e5b5a
commit dd45a2900f
8 changed files with 2253 additions and 43 deletions

View File

@ -39,7 +39,8 @@ Tree("10_SBB_Zugabteil_Intro") {
Composite(Selector) {
Composite(Sequence) {
BTC.NoStoriesVisited()
BTC.Show("Depthkit.VIDEOS.Exposition1Zugabte")
BTC.Show("Depthkit.VIDEOS.Exposition0Zugabte")
BTC.Run("Depthkit.VIDEOS.Exposition0Zugabte")
BTC.SynthesizeText("Wir begrüssen dich auf unserer Reise in die Sprache und Kultur der italienischsprachigen Schweiz.")
BTC.SpeechOutputEnded()
@ -68,6 +69,8 @@ Tree("10_SBB_Zugabteil_Intro") {
BTC.SpeechOutputEnded()
// --- Zugabteil - Exposition ---
BTC.Hide("Depthkit.VIDEOS.Exposition0Zugabte")
BTC.Show("Depthkit.VIDEOS.Exposition1Zugabte")
BTC.Run("Depthkit.VIDEOS.Exposition1Zugabte")
BTC.Hide("Depthkit.VIDEOS.Exposition1Zugabte")

View File

@ -108,6 +108,9 @@ Tree("32_Grotto_Story_B_Grotto_Intro") {
BTC.Run("Depthkit.VIDEOS.Telefonat5StoryBGr")
BTC.Hide("Depthkit.VIDEOS.Telefonat5StoryBGr")
BTC.Show("Depthkit.VIDEOS.IdleLoopNonnaGrott")
BTC.Run("Depthkit.VIDEOS.IdleLoopNonnaGrott")
BTC.AddPossbileSpeechIntent("Story_B_Grotto.Telefonat.6")
BTC.StartSpeechIntentRecognition()
@ -395,6 +398,8 @@ Tree("32_Grotto_Story_B_Grotto_Antwort_Nonna_Kueche") {
BTC.SynthesizeText("Sai cosa fare, Francensca, vero? C'è da cucinare il risotto. La ricetta la conosci e la trovi comunque lì. Allora, vi lascio, forse ci vediamo più tardi. Quanto sono contenta che aiutiate in cucina! Ciao!")
BTC.SpeechOutputEnded()
BTC.Hide("Depthkit.VIDEOS.IdleLoopNonnaGrott")
BTC.Show("Depthkit.VIDEOS.Outro2StoryBGrotto")
BTC.Run("Depthkit.VIDEOS.Outro2StoryBGrotto")
BTC.Hide("Depthkit.VIDEOS.Outro2StoryBGrotto")

View File

@ -0,0 +1,140 @@
fileFormatVersion: 2
guid: 4d62d383117e746d78b099b0645da7aa
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3143a23292cd240438e7f37cabf304e3
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: ae6b088a3ec6c482db7cfb51908bb45b
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -115,6 +115,13 @@ public class NamedDepthkitPlayer : ComponentHandler {
if (isLoaded && !depthkitClip.player.IsPlaying()) {
depthkitClip.player.Play();
}
if (mediaPlayer.Loop && depthkitClip.player.IsPlaying())
{
Task.SetSucceeded();
return;
}
//Debug.Log($"[BTC] NamedDepthkitPlayer.Running: Running: {depthkitClip.Player.IsPlaying()} {isLoaded} {isFinishedPlaying} {Time.frameCount} {depthkitClip.Player.GetCurrentTime()} {depthkitClip.Player.GetDuration()}");
// on desktop
if (isFinishedPlaying && isLoaded) {
@ -123,26 +130,8 @@ public class NamedDepthkitPlayer : ComponentHandler {
//GetComponent<RenderHeads.Media.AVProVideo.MediaPlayer>().Rewind(true);
mediaPlayer.CloseMedia();
Task.SetSucceeded();
return;
}
break;
case NodeState.Aborting:
// Debug.Log("Testing "+Time.frameCount);
// depthkitClip.Player.CreatePlayer();
// depthkitClip.Player.Load();
//depthkitClip.Player.Stop();
//if (GetComponent<RenderHeads.Media.AVProVideo.MediaPlayer>()) {
// GetComponent<RenderHeads.Media.AVProVideo.MediaPlayer>().Stop();
//}
depthkitClip.player.Stop();
mediaPlayer.CloseMedia();
// if (depthkitClip.Player.IsPlayerSetup()) {
// Debug.Log("stopping");
// depthkitClip.Player.Stop();
// }
// else {
// Debug.Log("not stopping");
// }
break;
}
}
@ -171,8 +160,11 @@ public class NamedDepthkitPlayer : ComponentHandler {
case NodeState.FirstRun:
if (mediaPlayer != null)
{
if (depthkitClip.player.IsPlaying())
{
depthkitClip.player.Stop();
}
mediaPlayer.CloseMedia();
Debug.Log("Closing media...");
}
gameObject.SetActive(false);

View File

@ -797,7 +797,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 42286430969128322, guid: 05809d10d681e4147b2f812505f2cb67, type: 3}
propertyPath: m_IsActive
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 99019791534316073, guid: 05809d10d681e4147b2f812505f2cb67, type: 3}
propertyPath: m_Materials.Array.data[0]
@ -3004,17 +3004,6 @@ Rigidbody:
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &279618484 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 2185744855848736044, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
m_PrefabInstance: {fileID: 1285877061}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab2a8bf28f111456caf08afcd0888bf5, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1001 &285859923
PrefabInstance:
m_ObjectHideFlags: 0
@ -3991,6 +3980,49 @@ MonoBehaviour:
roomId: VIDEOS
uniqueId:
--- !u!21 &332098044
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Shader Graphs/Depthkit Studio Photo Look Unlit
m_Shader: {fileID: -6465566751694194690, guid: 1f57a434f2e8d4e40979f248bac82f5c, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- DK_UNTEXTURED_FRAGMENT_INFER
- DK_USE_EDGEMASK
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _QueueControl: 0
- _QueueOffset: 0
m_Colors: []
m_BuildTextureStacks: []
--- !u!21 &388389038
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
@ -8975,17 +9007,151 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &1100519244 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 5173265794982869292, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
m_PrefabInstance: {fileID: 1285877061}
--- !u!1001 &1028004972
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1602828875}
m_Modifications:
- target: {fileID: 42286430969128322, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_Name
value: Depthkit.VIDEOS.Exposition0Zugabte
objectReference: {fileID: 0}
- target: {fileID: 42286430969128322, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_IsActive
value: 0
objectReference: {fileID: 0}
- target: {fileID: 99019791534316073, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 388389038}
- target: {fileID: 1668543161738679156, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: _loop
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1668543161738679156, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: _autoOpen
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1668543161738679156, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: _autoPlayOnStart
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalPosition.x
value: -0.842
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalPosition.y
value: 0.04
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalPosition.z
value: 0.291
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6530338441971284947, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: volumeViewpoint
value:
objectReference: {fileID: 1939442491}
- target: {fileID: 7805204480815110938, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
propertyPath: m_Mesh
value:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 42286430969128322, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
insertIndex: -1
addedObject: {fileID: 1028004977}
- targetCorrespondingSourceObject: {fileID: 42286430969128322, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
insertIndex: -1
addedObject: {fileID: 1028004976}
m_SourcePrefab: {fileID: 100100000, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
--- !u!4 &1028004973 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2577517210070414019, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
m_PrefabInstance: {fileID: 1028004972}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
--- !u!1 &1028004974 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 42286430969128322, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
m_PrefabInstance: {fileID: 1028004972}
m_PrefabAsset: {fileID: 0}
--- !u!114 &1028004975 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 8229741554201112100, guid: 3143a23292cd240438e7f37cabf304e3, type: 3}
m_PrefabInstance: {fileID: 1028004972}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1028004974}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: b4fa781ea55830e408ba83c0f9d07c4b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &1028004976
MonoBehaviour:
m_ObjectHideFlags: 2
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1028004974}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c1bbef39d5641469e876eef12e939c3a, type: 3}
m_Name:
m_EditorClassIdentifier:
showHelpText: 0
fadeInTime: 1.5
fadeOutTime: 1.5
depthkitClip: {fileID: 1028004975}
videoPath: Depthkit/SBB/Exposition.0.Zugabteil.mp4
--- !u!114 &1028004977
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1028004974}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ab2a8bf28f111456caf08afcd0888bf5, type: 3}
m_Name:
m_EditorClassIdentifier:
handlers:
- {fileID: 1028004976}
roomId: VIDEOS
uniqueId:
--- !u!114 &1113754320 stripped
MonoBehaviour:
m_CorrespondingSourceObject: {fileID: 1728074381097661315, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
@ -9635,7 +9801,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 603058458314117103, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_Name
value: GO.HANDMENU.SpeechOptions
value: GO.HANDMENU.SpeechOptions_57406
objectReference: {fileID: 0}
- target: {fileID: 612260542996305177, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_Name
@ -9759,7 +9925,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 8766490206476275678, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_Name
value: GO.HANDMENU.Home
value: GO.HANDMENU.Home_57218
objectReference: {fileID: 0}
- target: {fileID: 8782175979013437306, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
propertyPath: m_Name
@ -12372,6 +12538,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1028004973}
- {fileID: 79234119}
- {fileID: 74514820}
- {fileID: 1591353511}
@ -12777,6 +12944,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
namedObjects:
- {fileID: 1028004977}
- {fileID: 2185744855848736044, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
- {fileID: 5173265794982869292, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
- {fileID: 1728074381097661315, guid: 90dfe96f41d164a3081b56f73f4214e4, type: 3}
@ -12796,7 +12964,6 @@ MonoBehaviour:
- {fileID: 151452150}
- {fileID: 166870974}
- {fileID: 215796644}
- {fileID: 279618484}
- {fileID: 297001282}
- {fileID: 307812147}
- {fileID: 461261029}
@ -12809,7 +12976,6 @@ MonoBehaviour:
- {fileID: 795727761}
- {fileID: 831049117}
- {fileID: 1009454557}
- {fileID: 1100519244}
- {fileID: 1113754320}
- {fileID: 1148303046}
- {fileID: 1156450821}
@ -12858,7 +13024,7 @@ MonoBehaviour:
overrideLogStringDisplay: 0
overrideDebugInternalActive: 0
overrideDebugChangesActive: 0
instanceID: 290440
instanceID: 1780194
__behaviourTreeGenerator: {fileID: 0}
taskScripts:
- {fileID: 4900000, guid: e058cb28be8d744b98baf62e50716721, type: 3}