Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fc3f54f

Browse files
committed
feat: live2D를 위한 메니저
1 parent 4349a5d commit fc3f54f

14 files changed

+482
-0
lines changed

‎Assets/App/Scenes/Live2d Sence.unity‎

Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
%YAML 1.1
2+
%TAG !u! tag:unity3d.com,2011:
3+
--- !u!29 &1
4+
OcclusionCullingSettings:
5+
m_ObjectHideFlags: 0
6+
serializedVersion: 2
7+
m_OcclusionBakeSettings:
8+
smallestOccluder: 5
9+
smallestHole: 0.25
10+
backfaceThreshold: 100
11+
m_SceneGUID: 00000000000000000000000000000000
12+
m_OcclusionCullingData: {fileID: 0}
13+
--- !u!104 &2
14+
RenderSettings:
15+
m_ObjectHideFlags: 0
16+
serializedVersion: 10
17+
m_Fog: 0
18+
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
19+
m_FogMode: 3
20+
m_FogDensity: 0.01
21+
m_LinearFogStart: 0
22+
m_LinearFogEnd: 300
23+
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
24+
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
25+
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
26+
m_AmbientIntensity: 1
27+
m_AmbientMode: 3
28+
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
29+
m_SkyboxMaterial: {fileID: 0}
30+
m_HaloStrength: 0.5
31+
m_FlareStrength: 1
32+
m_FlareFadeSpeed: 3
33+
m_HaloTexture: {fileID: 0}
34+
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
35+
m_DefaultReflectionMode: 0
36+
m_DefaultReflectionResolution: 128
37+
m_ReflectionBounces: 1
38+
m_ReflectionIntensity: 1
39+
m_CustomReflection: {fileID: 0}
40+
m_Sun: {fileID: 0}
41+
m_UseRadianceAmbientProbe: 0
42+
--- !u!157 &3
43+
LightmapSettings:
44+
m_ObjectHideFlags: 0
45+
serializedVersion: 13
46+
m_BakeOnSceneLoad: 0
47+
m_GISettings:
48+
serializedVersion: 2
49+
m_BounceScale: 1
50+
m_IndirectOutputScale: 1
51+
m_AlbedoBoost: 1
52+
m_EnvironmentLightingMode: 0
53+
m_EnableBakedLightmaps: 0
54+
m_EnableRealtimeLightmaps: 0
55+
m_LightmapEditorSettings:
56+
serializedVersion: 12
57+
m_Resolution: 2
58+
m_BakeResolution: 40
59+
m_AtlasSize: 1024
60+
m_AO: 0
61+
m_AOMaxDistance: 1
62+
m_CompAOExponent: 1
63+
m_CompAOExponentDirect: 0
64+
m_ExtractAmbientOcclusion: 0
65+
m_Padding: 2
66+
m_LightmapParameters: {fileID: 0}
67+
m_LightmapsBakeMode: 1
68+
m_TextureCompression: 1
69+
m_ReflectionCompression: 2
70+
m_MixedBakeMode: 2
71+
m_BakeBackend: 1
72+
m_PVRSampling: 1
73+
m_PVRDirectSampleCount: 32
74+
m_PVRSampleCount: 512
75+
m_PVRBounces: 2
76+
m_PVREnvironmentSampleCount: 256
77+
m_PVREnvironmentReferencePointCount: 2048
78+
m_PVRFilteringMode: 1
79+
m_PVRDenoiserTypeDirect: 1
80+
m_PVRDenoiserTypeIndirect: 1
81+
m_PVRDenoiserTypeAO: 1
82+
m_PVRFilterTypeDirect: 0
83+
m_PVRFilterTypeIndirect: 0
84+
m_PVRFilterTypeAO: 0
85+
m_PVREnvironmentMIS: 1
86+
m_PVRCulling: 1
87+
m_PVRFilteringGaussRadiusDirect: 1
88+
m_PVRFilteringGaussRadiusIndirect: 1
89+
m_PVRFilteringGaussRadiusAO: 1
90+
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
91+
m_PVRFilteringAtrousPositionSigmaIndirect: 2
92+
m_PVRFilteringAtrousPositionSigmaAO: 1
93+
m_ExportTrainingData: 0
94+
m_TrainingDataDestination: TrainingData
95+
m_LightProbeSampleCountMultiplier: 4
96+
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
97+
m_LightingSettings: {fileID: 0}
98+
--- !u!196 &4
99+
NavMeshSettings:
100+
serializedVersion: 2
101+
m_ObjectHideFlags: 0
102+
m_BuildSettings:
103+
serializedVersion: 3
104+
agentTypeID: 0
105+
agentRadius: 0.5
106+
agentHeight: 2
107+
agentSlope: 45
108+
agentClimb: 0.4
109+
ledgeDropHeight: 0
110+
maxJumpAcrossDistance: 0
111+
minRegionArea: 2
112+
manualCellSize: 0
113+
cellSize: 0.16666667
114+
manualTileSize: 0
115+
tileSize: 256
116+
buildHeightMesh: 0
117+
maxJobWorkers: 0
118+
preserveTilesOutsideBounds: 0
119+
debug:
120+
m_Flags: 0
121+
m_NavMeshData: {fileID: 0}
122+
--- !u!1 &893152814
123+
GameObject:
124+
m_ObjectHideFlags: 0
125+
m_CorrespondingSourceObject: {fileID: 0}
126+
m_PrefabInstance: {fileID: 0}
127+
m_PrefabAsset: {fileID: 0}
128+
serializedVersion: 6
129+
m_Component:
130+
- component: {fileID: 893152817}
131+
- component: {fileID: 893152816}
132+
- component: {fileID: 893152815}
133+
- component: {fileID: 893152818}
134+
m_Layer: 0
135+
m_Name: Main Camera
136+
m_TagString: MainCamera
137+
m_Icon: {fileID: 0}
138+
m_NavMeshLayer: 0
139+
m_StaticEditorFlags: 0
140+
m_IsActive: 1
141+
--- !u!81 &893152815
142+
AudioListener:
143+
m_ObjectHideFlags: 0
144+
m_CorrespondingSourceObject: {fileID: 0}
145+
m_PrefabInstance: {fileID: 0}
146+
m_PrefabAsset: {fileID: 0}
147+
m_GameObject: {fileID: 893152814}
148+
m_Enabled: 1
149+
--- !u!20 &893152816
150+
Camera:
151+
m_ObjectHideFlags: 0
152+
m_CorrespondingSourceObject: {fileID: 0}
153+
m_PrefabInstance: {fileID: 0}
154+
m_PrefabAsset: {fileID: 0}
155+
m_GameObject: {fileID: 893152814}
156+
m_Enabled: 1
157+
serializedVersion: 2
158+
m_ClearFlags: 1
159+
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
160+
m_projectionMatrixMode: 1
161+
m_GateFitMode: 2
162+
m_FOVAxisMode: 0
163+
m_Iso: 200
164+
m_ShutterSpeed: 0.005
165+
m_Aperture: 16
166+
m_FocusDistance: 10
167+
m_FocalLength: 50
168+
m_BladeCount: 5
169+
m_Curvature: {x: 2, y: 11}
170+
m_BarrelClipping: 0.25
171+
m_Anamorphism: 0
172+
m_SensorSize: {x: 36, y: 24}
173+
m_LensShift: {x: 0, y: 0}
174+
m_NormalizedViewPortRect:
175+
serializedVersion: 2
176+
x: 0
177+
y: 0
178+
width: 1
179+
height: 1
180+
near clip plane: 0.3
181+
far clip plane: 1000
182+
field of view: 60
183+
orthographic: 1
184+
orthographic size: 5
185+
m_Depth: -1
186+
m_CullingMask:
187+
serializedVersion: 2
188+
m_Bits: 4294967295
189+
m_RenderingPath: -1
190+
m_TargetTexture: {fileID: 0}
191+
m_TargetDisplay: 0
192+
m_TargetEye: 3
193+
m_HDR: 1
194+
m_AllowMSAA: 1
195+
m_AllowDynamicResolution: 0
196+
m_ForceIntoRT: 0
197+
m_OcclusionCulling: 1
198+
m_StereoConvergence: 10
199+
m_StereoSeparation: 0.022
200+
--- !u!4 &893152817
201+
Transform:
202+
m_ObjectHideFlags: 0
203+
m_CorrespondingSourceObject: {fileID: 0}
204+
m_PrefabInstance: {fileID: 0}
205+
m_PrefabAsset: {fileID: 0}
206+
m_GameObject: {fileID: 893152814}
207+
serializedVersion: 2
208+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
209+
m_LocalPosition: {x: 0, y: 0, z: -10}
210+
m_LocalScale: {x: 1, y: 1, z: 1}
211+
m_ConstrainProportionsScale: 0
212+
m_Children: []
213+
m_Father: {fileID: 0}
214+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
215+
--- !u!114 &893152818
216+
MonoBehaviour:
217+
m_ObjectHideFlags: 0
218+
m_CorrespondingSourceObject: {fileID: 0}
219+
m_PrefabInstance: {fileID: 0}
220+
m_PrefabAsset: {fileID: 0}
221+
m_GameObject: {fileID: 893152814}
222+
m_Enabled: 1
223+
m_EditorHideFlags: 0
224+
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
225+
m_Name:
226+
m_EditorClassIdentifier:
227+
m_RenderShadows: 1
228+
m_RequiresDepthTextureOption: 2
229+
m_RequiresOpaqueTextureOption: 2
230+
m_CameraType: 0
231+
m_Cameras: []
232+
m_RendererIndex: -1
233+
m_VolumeLayerMask:
234+
serializedVersion: 2
235+
m_Bits: 1
236+
m_VolumeTrigger: {fileID: 0}
237+
m_VolumeFrameworkUpdateModeOption: 2
238+
m_RenderPostProcessing: 0
239+
m_Antialiasing: 0
240+
m_AntialiasingQuality: 2
241+
m_StopNaN: 0
242+
m_Dithering: 0
243+
m_ClearDepth: 1
244+
m_AllowXRRendering: 1
245+
m_AllowHDROutput: 1
246+
m_UseScreenCoordOverride: 0
247+
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
248+
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
249+
m_RequiresDepthTexture: 0
250+
m_RequiresColorTexture: 0
251+
m_Version: 2
252+
m_TaaSettings:
253+
m_Quality: 3
254+
m_FrameInfluence: 0.1
255+
m_JitterScale: 1
256+
m_MipBias: 0
257+
m_VarianceClampScale: 0.9
258+
m_ContrastAdaptiveSharpening: 0
259+
--- !u!1660057539 &9223372036854775807
260+
SceneRoots:
261+
m_ObjectHideFlags: 0
262+
m_Roots:
263+
- {fileID: 893152817}

‎Assets/App/Scenes/Live2d Sence.unity.meta‎

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
using UnityEngine;
2+
3+
namespace ProjectVG.Domain.Character.Service
4+
{
5+
public interface ILive2DModelApplier
6+
{
7+
/** 활성 모델과 구성에 대해 LookAt, LipSync, 썸네일 등 시각 설정을 적용한다. */
8+
void Apply(GameObject activeModel, ModelConfig modelConfig);
9+
}
10+
}
11+
12+

‎Assets/Domain/Character/Script/ILive2DModelApplier.cs.meta‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
using UnityEngine;
2+
using Cysharp.Threading.Tasks;
3+
4+
namespace ProjectVG.Domain.Character.Service
5+
{
6+
public interface ILive2DModelManager
7+
{
8+
/** Live2D 모델 관리를 위한 초기 설정을 수행한다. */
9+
void Initialize(ProjectVG.Domain.Character.Live2D.Model.Live2DModelRegistry modelRegistry, ProjectVG.Domain.Character.Live2D.Model.Live2DCharacterConfig defaultCharacterConfig);
10+
11+
/** 지정한 캐릭터 모델을 비동기 로드한다. */
12+
UniTask<GameObject> LoadModelAsync(string characterId);
13+
14+
/** 현재 활성 모델을 언로드한다. */
15+
void UnloadActiveModel();
16+
17+
/** 지정한 캐릭터 ID의 모델을 활성 모델로 전환한다. */
18+
void SetActiveModel(string characterId);
19+
20+
/** 현재 활성 모델 GameObject를 반환한다. */
21+
GameObject GetActiveModel();
22+
23+
/** 지정한 캐릭터 ID의 모델이 로드되어 있는지 반환한다. */
24+
bool HasModel(string characterId);
25+
26+
/** 지정한 캐릭터 ID의 모델을 사전 로드한다. */
27+
UniTask PreloadModelAsync(string characterId);
28+
29+
/** 활성 모델의 가시성을 설정한다. */
30+
void SetVisibility(bool isVisible);
31+
32+
/** 활성 모델에 캐릭터별 ModelConfig를 적용한다. */
33+
void ApplyModelConfig(ModelConfig modelConfig);
34+
}
35+
}
36+
37+

‎Assets/Domain/Character/Script/ILive2DModelManager.cs.meta‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
5+
namespace ProjectVG.Domain.Character.Live2D.Model
6+
{
7+
[CreateAssetMenu(fileName = "Live2DCharacterConfig", menuName = "ProjectVG/Live2D/CharacterConfig", order = 100)]
8+
public class Live2DCharacterConfig : ScriptableObject
9+
{
10+
[Serializable]
11+
public class EmotionMapping
12+
{
13+
public string emotionKey;
14+
public string expressionName;
15+
public float defaultIntensity = 0.5f;
16+
public int defaultDurationMs = 2000;
17+
}
18+
19+
[Serializable]
20+
public class ActionMapping
21+
{
22+
public string actionKey;
23+
public string motionGroup;
24+
public string motionName;
25+
}
26+
27+
public string characterId;
28+
public GameObject characterPrefab;
29+
public ModelConfig modelConfig;
30+
public List<EmotionMapping> emotionMappings = new List<EmotionMapping>();
31+
public List<ActionMapping> actionMappings = new List<ActionMapping>();
32+
}
33+
}
34+
35+

‎Assets/Domain/Character/Script/Live2DCharacterConfig.cs.meta‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using UnityEngine;
2+
3+
namespace ProjectVG.Domain.Character.Service
4+
{
5+
public class Live2DModelApplier : MonoBehaviour, ILive2DModelApplier
6+
{
7+
[SerializeField] private bool _autoApplyOnEnable = true;
8+
9+
public void Apply(GameObject activeModel, ModelConfig modelConfig)
10+
{
11+
}
12+
}
13+
}
14+
15+

‎Assets/Domain/Character/Script/Live2DModelApplier.cs.meta‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /