Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 114 additions & 16 deletions Assets/Gothic-Core/Scenes/MainMenu.unity
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ MeshRenderer:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 775636288}
m_Enabled: 1
m_Enabled: 0
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
Expand All @@ -300,6 +300,8 @@ MeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
Expand All @@ -321,9 +323,11 @@ MeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &775636291
MeshFilter:
Expand Down Expand Up @@ -388,7 +392,7 @@ Transform:
m_GameObject: {fileID: 783007466}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -15.407947, y: 2.073237, z: -29.998268}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
Expand Down Expand Up @@ -467,6 +471,8 @@ MeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
Expand All @@ -488,9 +494,11 @@ MeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &791865609
MeshFilter:
Expand Down Expand Up @@ -565,17 +573,23 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 3
m_UsePipelineSettings: 1
m_AdditionalLightsShadowResolutionTier: 2
m_LightLayerMask: 1
m_RenderingLayers: 1
m_CustomShadowLayers: 0
m_ShadowLayerMask: 1
m_ShadowRenderingLayers: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
m_SoftShadowQuality: 0
m_RenderingLayersMask:
serializedVersion: 0
m_Bits: 1
m_ShadowRenderingLayersMask:
serializedVersion: 0
m_Bits: 1
m_Version: 4
m_LightLayerMask: 1
m_ShadowLayerMask: 1
m_RenderingLayers: 1
m_ShadowRenderingLayers: 1
--- !u!108 &1308095012
Light:
m_ObjectHideFlags: 0
Expand All @@ -584,14 +598,14 @@ Light:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1308095009}
m_Enabled: 1
serializedVersion: 11
serializedVersion: 12
m_Type: 1
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_InnerSpotAngle: 21.80208
m_CookieSize: 10
m_CookieSize2D: {x: 10, y: 10}
m_Shadows:
m_Type: 0
m_Resolution: -1
Expand Down Expand Up @@ -667,13 +681,13 @@ RectTransform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2031667426}
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0.02}
m_LocalScale: {x: -40, y: 8, z: 32}
m_LocalRotation: {x: 0, y: 0.7071068, z: 0.7071068, w: 0}
m_LocalPosition: {x: 0, y: 0, z: 10}
m_LocalScale: {x: 2, y: 1, z: 2}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 783007468}
m_LocalEulerAnglesHint: {x: -90, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: -90, y: 180, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
Expand Down Expand Up @@ -721,6 +735,8 @@ MeshRenderer:
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials: []
Expand All @@ -741,9 +757,11 @@ MeshRenderer:
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &2031667430
MeshFilter:
Expand All @@ -761,10 +779,38 @@ PrefabInstance:
serializedVersion: 3
m_TransformParent: {fileID: 505140342}
m_Modifications:
- target: {fileID: 514510020229674838, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 819469628458212509, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 1099075632631060353, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 1395391690268023265, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 1684002802907956876, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 1879303798920566507, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_Name
value: Tutorials
objectReference: {fileID: 0}
- target: {fileID: 1894576811620697740, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 1988018937390540162, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 22.9
objectReference: {fileID: 0}
- target: {fileID: 2283093842980008316, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_LocalPosition.x
value: 0
Expand Down Expand Up @@ -805,6 +851,58 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3406562529197016604, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 3521149265392391147, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 22.35
objectReference: {fileID: 0}
- target: {fileID: 4641005291164401446, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 6503434739734083609, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 6916374624597502023, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 36.75
objectReference: {fileID: 0}
- target: {fileID: 6924097052499452501, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 7063008752886569165, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 7255685370734901281, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 7407273248831804694, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 22.35
objectReference: {fileID: 0}
- target: {fileID: 8256774338473347927, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 8591534907977924294, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 9011431278706922558, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
- target: {fileID: 9118953017428058395, guid: a0af29d97abd24d4c8382b6da4017660, type: 3}
propertyPath: m_fontSize
value: 44.75
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
Expand All @@ -828,19 +926,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7389606469834037353, guid: 962bda2b335a56f48a6f7159a9e824d8, type: 3}
propertyPath: m_LocalScale.x
value: 0.7
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7389606469834037353, guid: 962bda2b335a56f48a6f7159a9e824d8, type: 3}
propertyPath: m_LocalScale.y
value: 0.7
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7389606469834037353, guid: 962bda2b335a56f48a6f7159a9e824d8, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7389606469834037353, guid: 962bda2b335a56f48a6f7159a9e824d8, type: 3}
propertyPath: m_LocalPosition.y
value: 1.6
value: 1.5
objectReference: {fileID: 0}
- target: {fileID: 7389606469834037353, guid: 962bda2b335a56f48a6f7159a9e824d8, type: 3}
propertyPath: m_LocalPosition.z
Expand Down
4 changes: 2 additions & 2 deletions Assets/Gothic-Core/Scripts/Domain/Audio/MusicDomain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ private void PlayInternal(MusicThemeInstance theme)
// DMusic crashes for some unfinished small themes (<3kB). Therefore, skipping them now with a warning until fixed.
// Issue report: https://github.com/GothicKit/dmusic-cs/issues/1

if (_resourceCacheService.Vfs.Find(theme.File)?.Buffer.Bytes.Length < 3000)
if (_resourceCacheService.Vfs.Find(theme.File)?.Buffer.Bytes.Length < 1000)
{
Logger.LogWarning($"Music theme >{theme.File}< might be broken with less than 3kB size. Safety skip", LogCat.Audio);
Logger.LogWarning($"Music theme >{theme.File}< might be broken with less than 1kB size. Safety skip", LogCat.Audio);
return;
}

Expand Down
5 changes: 1 addition & 4 deletions Assets/Gothic-Core/Scripts/Services/UI/FontService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@ public TMP_SpriteAsset TryGetFont(string fontName)
var y = font.Glyphs[i].topLeft.Y * fontTexture.height;
var w = font.Glyphs[i].width;
var h = font.Height;
var newSprite = Sprite.Create(fontTexture, new Rect(x, y, w, h),
new Vector2(font.Glyphs[i].topLeft.X, font.Glyphs[i].bottomRight.Y));

var spriteGlyph = new TMP_SpriteGlyph
{
Expand All @@ -79,11 +77,10 @@ public TMP_SpriteAsset TryGetFont(string fontName)
horizontalAdvance = w
},
index = (uint)i,
sprite = newSprite,
sprite = null,
scale = -1
};


// Convert the glyph index (treated as a codepage-byte) to its Unicode equivalent
var unicodeChars = _gameStateService.Encoding.GetChars(new[]{(byte)i});
var unicodeValue = (uint)unicodeChars[0]; // Return the Unicode character's code point
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ MonoBehaviour:
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
Expand Down Expand Up @@ -239,6 +240,7 @@ MonoBehaviour:
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_characterHorizontalScale: 1
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
Expand Down Expand Up @@ -444,6 +446,7 @@ GameObject:
- component: {fileID: 7369722077890996068}
- component: {fileID: 390066666418957288}
- component: {fileID: 5615940322375626677}
- component: {fileID: 1602513700271543697}
m_Layer: 5
m_Name: IntroduceChapter
m_TagString: Untagged
Expand Down Expand Up @@ -495,6 +498,7 @@ AudioSource:
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 0}
m_Resource: {fileID: 0}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Expand Down Expand Up @@ -580,3 +584,16 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &1602513700271543697
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7339275886835513150}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 20620ae30fdd0164c9bb5bdc717d3ada, type: 3}
m_Name:
m_EditorClassIdentifier: Reflex::Reflex.Components.GameObjectSelfInjector
_injectionStrategy: 2