단츄 아이스크림 무대연출 업데이트

This commit is contained in:
DESKTOP-S4BOTN2\user 2025-06-21 20:00:35 +09:00
parent e6de89c08f
commit e62ada31c1
31 changed files with 92689 additions and 17 deletions

8
Assets/@OneStar.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 568c7747ec0de284588ba2f68f36a2e3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7e3c4b8229c87a349938310ab3fe8376
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e15a91f446e90a341b76edfbb948a89b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,43 @@
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
using UnityEngine.Video;
[CustomPropertyDrawer(typeof(VideoPlayerClip))]
public class VideoPlayerClipDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUI.BeginProperty(position, label, property);
var videoClipProp = property.FindPropertyRelative("videoClip");
var speedProp = property.FindPropertyRelative("playbackSpeed");
float lineHeight = EditorGUIUtility.singleLineHeight;
float spacing = EditorGUIUtility.standardVerticalSpacing;
Rect rect = new Rect(position.x, position.y, position.width, lineHeight);
EditorGUI.PropertyField(rect, videoClipProp);
rect.y += lineHeight + spacing;
if (videoClipProp.objectReferenceValue != null)
{
VideoClip clip = videoClipProp.objectReferenceValue as VideoClip;
EditorGUI.LabelField(rect, $"Duration: {clip.length:F2}s | FPS: {clip.frameRate:F1} | Frames: {clip.frameCount}");
rect.y += lineHeight + spacing;
}
EditorGUI.PropertyField(rect, speedProp);
EditorGUI.EndProperty();
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
var videoClipProp = property.FindPropertyRelative("videoClip");
int lines = videoClipProp.objectReferenceValue != null ? 3 : 2;
return EditorGUIUtility.singleLineHeight * lines + EditorGUIUtility.standardVerticalSpacing * (lines - 1);
}
}
#endif

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9135a3eafac81824a8853b2e6fb25356
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,134 @@
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Video;
[System.Serializable]
public class VideoPlayerBehaviour : PlayableBehaviour
{
public VideoClip videoClip;
public float playbackSpeed = 1f;
private VideoPlayer m_VideoPlayer;
private PlayableDirector m_Director;
private bool m_VideoSetup = false;
private bool m_WasTimelinePlaying = false;
private double m_LastSyncTime = -1;
private int m_SyncCooldownFrames = 0;
private const int SYNC_COOLDOWN_DURATION = 5;
public override void OnPlayableCreate(Playable playable)
{
if (m_Director == null)
{
m_Director = Object.FindObjectOfType<PlayableDirector>();
}
m_VideoSetup = false;
m_WasTimelinePlaying = false;
m_LastSyncTime = -1;
m_SyncCooldownFrames = 0;
}
public override void ProcessFrame(Playable playable, FrameData info, object playerData)
{
if (playerData == null) return;
m_VideoPlayer = playerData as VideoPlayer;
if (m_VideoPlayer == null) return;
if (m_SyncCooldownFrames > 0)
{
m_SyncCooldownFrames--;
}
if (!m_VideoSetup && videoClip != null)
{
m_VideoPlayer.clip = videoClip;
m_VideoSetup = true;
}
if (info.weight > 0.5f)
{
bool isTimelinePlaying = m_Director != null && m_Director.state == PlayState.Playing;
double normalizedTime = playable.GetTime() / playable.GetDuration();
double targetTime = normalizedTime * videoClip.length;
if (isTimelinePlaying != m_WasTimelinePlaying)
{
Debug.Log($"Timeline state changed: {m_WasTimelinePlaying} -> {isTimelinePlaying}");
if (isTimelinePlaying)
{
Debug.Log($"Starting playback at time: {targetTime:F3} (Timeline: {playable.GetTime():F3})");
m_VideoPlayer.time = targetTime;
m_VideoPlayer.playbackSpeed = playbackSpeed;
m_LastSyncTime = targetTime;
m_SyncCooldownFrames = SYNC_COOLDOWN_DURATION;
if (!m_VideoPlayer.isPlaying)
{
m_VideoPlayer.Play();
}
}
else
{
Debug.Log($"Pausing at time: {m_VideoPlayer.time:F3}");
if (m_VideoPlayer.isPlaying)
{
m_VideoPlayer.Pause();
}
}
m_WasTimelinePlaying = isTimelinePlaying;
}
if (isTimelinePlaying)
{
if (m_SyncCooldownFrames <= 0)
{
double timeDiff = Mathf.Abs((float)(m_VideoPlayer.time - targetTime));
if (timeDiff > 0.3)
{
Debug.Log($"Large drift detected - Re-syncing: Video={m_VideoPlayer.time:F3}, Target={targetTime:F3}, Diff={timeDiff:F3}");
if (m_VideoPlayer.isPrepared)
{
m_VideoPlayer.time = targetTime;
m_LastSyncTime = targetTime;
m_SyncCooldownFrames = SYNC_COOLDOWN_DURATION;
}
}
}
}
else
{
if (m_SyncCooldownFrames <= 0)
{
double timeDiff = Mathf.Abs((float)(m_VideoPlayer.time - targetTime));
if (timeDiff > 0.033)
{
if (m_VideoPlayer.isPrepared)
{
m_VideoPlayer.time = targetTime;
m_LastSyncTime = targetTime;
m_SyncCooldownFrames = 2;
}
}
}
}
}
}
public override void OnBehaviourPause(Playable playable, FrameData info)
{
Debug.Log("Clip ended - stopping video");
if (m_VideoPlayer != null)
{
m_VideoPlayer.Pause();
}
m_WasTimelinePlaying = false;
m_LastSyncTime = -1;
m_SyncCooldownFrames = 0;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: ebf2669d506cd394392a48014e7fed13
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,40 @@
using System;
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Timeline;
using UnityEngine.Video;
[Serializable]
public class VideoPlayerClip : PlayableAsset, ITimelineClipAsset
{
[Header("Video Settings")]
public VideoClip videoClip;
[Header("Playback Settings")]
public float playbackSpeed = 1f;
public ClipCaps clipCaps => ClipCaps.None;
public override Playable CreatePlayable(PlayableGraph graph, GameObject owner)
{
var playable = ScriptPlayable<VideoPlayerBehaviour>.Create(graph);
var behaviour = playable.GetBehaviour();
behaviour.videoClip = videoClip;
behaviour.playbackSpeed = playbackSpeed;
return playable;
}
public override double duration
{
get
{
if (videoClip != null)
{
return (double)videoClip.length;
}
return 1.0;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8a85e6b7f1bfb9046bbe6101fda89b79
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,31 @@
using UnityEngine;
using UnityEngine.Playables;
using UnityEngine.Video;
public class VideoPlayerMixerBehaviour : PlayableBehaviour
{
private VideoPlayer m_VideoPlayer;
public override void ProcessFrame(Playable playable, FrameData info, object playerData)
{
m_VideoPlayer = playerData as VideoPlayer;
if (m_VideoPlayer == null) return;
int inputCount = playable.GetInputCount();
float maxWeight = 0f;
int dominantInput = -1;
for (int i = 0; i < inputCount; i++)
{
float weight = playable.GetInputWeight(i);
if (weight > maxWeight)
{
maxWeight = weight;
dominantInput = i;
}
}
// TODO
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: be9b327f01308f64f8d6c8c4b1907c83
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
using UnityEngine;
using UnityEngine.Timeline;
using UnityEngine.Video;
using UnityEngine.Playables;
[TrackColor(0.2f, 0.8f, 1f)]
[TrackClipType(typeof(VideoPlayerClip))]
[TrackBindingType(typeof(VideoPlayer))]
public class VideoPlayerTrack : TrackAsset
{
public override Playable CreateTrackMixer(PlayableGraph graph, GameObject go, int inputCount)
{
return ScriptPlayable<VideoPlayerMixerBehaviour>.Create(graph, inputCount);
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 697ba35aed5d4bd42bbb06a1856aefa1
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -120,8 +120,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 0.27450982, g: 0.27450982, b: 0.27450982, a: 1}
- _Color: {r: 0.2745098, g: 0.2745098, b: 0.2745098, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -133,8 +133,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 0.27450982, g: 0.27450982, b: 0.27450982, a: 1}
- _Color: {r: 0.2745098, g: 0.2745098, b: 0.2745098, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -133,8 +133,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 0.2735849, g: 0.2735849, b: 0.2735849, a: 1}
- _Color: {r: 0.27358484, g: 0.27358484, b: 0.27358484, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -120,8 +120,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 0.27450982, g: 0.27450982, b: 0.27450982, a: 1}
- _Color: {r: 0.2745098, g: 0.2745098, b: 0.2745098, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -120,8 +120,8 @@ Material:
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _BaseColor: {r: 0.27450982, g: 0.27450982, b: 0.27450982, a: 1}
- _Color: {r: 0.2745098, g: 0.2745098, b: 0.2745098, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []

View File

@ -28,7 +28,7 @@ Material:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Texture: {fileID: 8400000, guid: 722cc2b66e839e14e850fcad71307cdd, type: 2}
m_Scale: {x: 1, y: 0.61}
m_Offset: {x: 0, y: 0.37}
- _BaseTex:
@ -64,7 +64,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Texture: {fileID: 8400000, guid: 722cc2b66e839e14e850fcad71307cdd, type: 2}
m_Scale: {x: 1, y: 0.61}
m_Offset: {x: 0, y: 0.37}
- _MetallicGlossMap:

View File

@ -43,7 +43,7 @@ Material:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 2800000, guid: c6027bfc46d65cb439ac5ad148c0e1dd, type: 3}
m_Texture: {fileID: 8400000, guid: b8ce85e5956914445b05a31bb051e265, type: 2}
m_Scale: {x: 0.27, y: 1}
m_Offset: {x: 0.55, y: 0}
- _BaseTex:
@ -79,7 +79,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: c6027bfc46d65cb439ac5ad148c0e1dd, type: 3}
m_Texture: {fileID: 8400000, guid: b8ce85e5956914445b05a31bb051e265, type: 2}
m_Scale: {x: 0.27, y: 1}
m_Offset: {x: 0.55, y: 0}
- _MetallicGlossMap:

View File

@ -136,7 +136,7 @@ Material:
m_Colors:
- _BaseColor: {r: 0.44339618, g: 0.44339618, b: 0.44339618, a: 0.76862746}
- _Color: {r: 0.44339615, g: 0.44339615, b: 0.44339615, a: 0.76862746}
- _EmissionColor: {r: 24.074974, g: 9.549292, b: 25.688938, a: 1}
- _EmissionColor: {r: 34.29675, g: 34.29675, b: 34.29675, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4be5879f598e57d4cb96570fff9a8234
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: T_MainScreen
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_IsAlphaChannelOptional: 0
serializedVersion: 6
m_Width: 1920
m_Height: 1080
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 94
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_UseDynamicScaleExplicit: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 722cc2b66e839e14e850fcad71307cdd
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,39 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!84 &8400000
RenderTexture:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: T_SideScreen
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_IsAlphaChannelOptional: 0
serializedVersion: 6
m_Width: 1920
m_Height: 1080
m_AntiAliasing: 1
m_MipCount: -1
m_DepthStencilFormat: 94
m_ColorFormat: 8
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_UseDynamicScale: 0
m_UseDynamicScaleExplicit: 0
m_BindMS: 0
m_EnableCompatibleFormat: 1
m_EnableRandomWrite: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 0
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_ShadowSamplingMode: 2

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b8ce85e5956914445b05a31bb051e265
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 8400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 614fcbbd6417c3c40a0d067c01c15e2a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,65 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7be4795c8c580b944a593bb34e551d24, type: 3}
m_Name: StageLightManeuverSettings
m_EditorClassIdentifier:
exportProfilePath: Assets/StageLightManeuver/Profiles/<Scene>/<ClipName>
lightFixtureProfileExportPath: Assets/StageLightManeuver/Profiles/FixtureProfiles/<LightName>
propertyOrders:
- key: ClockProperty
value: -999
- key: StageLightOrderProperty
value: -998
- key: LightProperty
value: 0
- key: LightIntensityProperty
value: 1
- key: LightColorProperty
value: 2
- key: LightArrayProperty
value: 3
- key: ManualLightArrayProperty
value: 4
- key: ManualColorArrayProperty
value: 5
- key: MaterialColorProperty
value: 6
- key: MaterialTextureProperty
value: 7
- key: SyncLightMaterialProperty
value: 8
- key: DecalProperty
value: 9
- key: XTransformProperty
value: 10
- key: YTransformProperty
value: 11
- key: ZTransformProperty
value: 12
- key: RotationProperty
value: 13
- key: PanProperty
value: 14
- key: TiltProperty
value: 15
- key: ManualPanTiltProperty
value: 16
- key: LookAtProperty
value: 17
- key: SmoothLookAtProperty
value: 18
- key: EnvironmentProperty
value: 19
- key: ReflectionProbeProperty
value: 20
- key: SlmAdditionalProperty
value: 21

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 33ad11829de0c5248ab72d41318e8728
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant: