Skip to content

Commit

Permalink
quick starting game bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adbreeker committed Dec 9, 2023
1 parent 6c00aae commit 7c82628
Show file tree
Hide file tree
Showing 5 changed files with 141 additions and 30 deletions.
49 changes: 27 additions & 22 deletions Assets/Project/Scenes/Levels/0/Intro.unity
Original file line number Diff line number Diff line change
Expand Up @@ -200,26 +200,6 @@ PrefabInstance:
- {fileID: 2920437737176594091, guid: a894a8c977dbe674ead86bca5374a3e1, type: 3}
- {fileID: 6894981729460985595, guid: a894a8c977dbe674ead86bca5374a3e1, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: a894a8c977dbe674ead86bca5374a3e1, type: 3}
--- !u!1 &134769943 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4871858993183020671, guid: a894a8c977dbe674ead86bca5374a3e1, type: 3}
m_PrefabInstance: {fileID: 134769942}
m_PrefabAsset: {fileID: 0}
--- !u!114 &134769944
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 134769943}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3dfdadbf211095841845f301c3f4f6ad, type: 3}
m_Name:
m_EditorClassIdentifier:
port: 25001
startReceiving: 1
data:
--- !u!1 &640403738
GameObject:
m_ObjectHideFlags: 0
Expand All @@ -230,6 +210,7 @@ GameObject:
m_Component:
- component: {fileID: 640403740}
- component: {fileID: 640403739}
- component: {fileID: 640403741}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
Expand Down Expand Up @@ -309,10 +290,31 @@ Transform:
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!114 &640403741
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 640403738}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Version: 1
m_UsePipelineSettings: 1
m_AdditionalLightsShadowResolutionTier: 2
m_LightLayerMask: 1
m_CustomShadowLayers: 0
m_ShadowLayerMask: 1
m_LightCookieSize: {x: 1, y: 1}
m_LightCookieOffset: {x: 0, y: 0}
--- !u!1 &1012641036
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -392,20 +394,22 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1239661045
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/RoundedCorners
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
m_ShaderKeywords:
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
Expand All @@ -419,6 +423,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
Expand Down
112 changes: 110 additions & 2 deletions Assets/Project/Scenes/Levels/1/Level_1_Chapter_3.unity
Original file line number Diff line number Diff line change
Expand Up @@ -13940,6 +13940,42 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 979762953}
m_Mesh: {fileID: 4300002, guid: 4fe4fc7683c898747998c195978256cc, type: 3}
--- !u!21 &990715301
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/RoundedCorners
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _WidthHeightRadius: {r: 400, g: 20, b: 20, a: 0}
m_BuildTextureStacks: []
--- !u!1 &991607406
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -18913,7 +18949,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1524300115307844135, guid: 707efb95329b314459e0abfeb2373969, type: 3}
propertyPath: chapter
value: Level_1_Chapter_1
value: Menu
objectReference: {fileID: 0}
- target: {fileID: 3093160356685686888, guid: 707efb95329b314459e0abfeb2373969, type: 3}
propertyPath: passageOpen
Expand Down Expand Up @@ -19320,7 +19356,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1418560482}
m_LocalRotation: {x: 0.000000021855694, y: 0, z: -0, w: 1}
m_LocalPosition: {x: 0.00000023841858, y: -2.2286207e-12, z: -0.000066280365}
m_LocalPosition: {x: 0.00000023841858, y: -2.260687e-12, z: -0.00006723404}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
Expand Down Expand Up @@ -21494,6 +21530,42 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4fc787d1eb080ed458cfb813f50f44c4, type: 3}
--- !u!21 &1530059897
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/RoundedCorners
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _WidthHeightRadius: {r: 400, g: 20, b: 20, a: 0}
m_BuildTextureStacks: []
--- !u!1 &1530686053
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -29786,6 +29858,42 @@ Transform:
m_CorrespondingSourceObject: {fileID: 7163503310749008636, guid: 89a5340cdb4a9a84c8b8e0987d9b05ce, type: 3}
m_PrefabInstance: {fileID: 2051524628}
m_PrefabAsset: {fileID: 0}
--- !u!21 &2051632506
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UI/RoundedCorners/RoundedCorners
m_Shader: {fileID: 4800000, guid: 0bd2ec5d73751e34a814274a454bec41, type: 3}
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UseUIAlphaClip: 0
m_Colors:
- _WidthHeightRadius: {r: 410, g: 30, b: 30, a: 0}
m_BuildTextureStacks: []
--- !u!1001 &2053296541
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public void Awake() //start receiving on awake
receiveThread = new Thread(new ThreadStart(ReceiveData));
receiveThread.IsBackground = true;
receiveThread.Start();
Debug.Log(gameObject.name);
}

public void OnDestroy() //close client on destroy
Expand Down
3 changes: 1 addition & 2 deletions Assets/Project/Scripts/UI/MainMenu/ChosenSaveMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ void KeysListener()
{
ProgressSaving.saveName = saveName;
closing = true;
if (!String.IsNullOrWhiteSpace(FindObjectOfType<UDPReceive>().data)) FindObjectOfType<FadeInFadeOut>().ChangeScene(ProgressSaving.GetSaveByName(ProgressSaving.saveName).gameStateSave.currentLvl);
else FindObjectOfType<FadeInFadeOut>().ChangeScene("Loading_Screen");
FindObjectOfType<FadeInFadeOut>().ChangeScene("Loading_Screen");
}
else if (pointedOptionMenu == 1)
{
Expand Down
6 changes: 2 additions & 4 deletions Assets/Project/Scripts/UI/MainMenu/NewGameMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ void KeysListener()
ProgressSaving.CreateNewSave(ProgressSaving.saveName);

//There we need to check if mediapipeProcess is loaded
if (!String.IsNullOrWhiteSpace(FindObjectOfType<UDPReceive>().data)) FindObjectOfType<FadeInFadeOut>().ChangeScene(ProgressSaving.GetSaveByName(ProgressSaving.saveName).gameStateSave.currentLvl);
else FindObjectOfType<FadeInFadeOut>().ChangeScene("Loading_Screen");
FindObjectOfType<FadeInFadeOut>().ChangeScene("Loading_Screen");
}
else
{
Expand All @@ -131,8 +130,7 @@ void KeysListener()
ProgressSaving.CreateNewSave(ProgressSaving.saveName);

//There we need to check if mediapipeProcess is loaded
if (!String.IsNullOrWhiteSpace(FindObjectOfType<UDPReceive>().data)) FindObjectOfType<FadeInFadeOut>().ChangeScene(ProgressSaving.GetSaveByName(ProgressSaving.saveName).gameStateSave.currentLvl);
else FindObjectOfType<FadeInFadeOut>().ChangeScene("Loading_Screen");
FindObjectOfType<FadeInFadeOut>().ChangeScene("Loading_Screen");
}
}
else if (pointedOptionMenu == 1)
Expand Down

0 comments on commit 7c82628

Please sign in to comment.