From 3ae91c8fd8fe381404600a9140d7ebd307c4f19f Mon Sep 17 00:00:00 2001 From: Kuvrot Date: Mon, 11 Nov 2024 22:26:20 -0600 Subject: [PATCH] improve performance --- Assets/Scenes/MainMenu.unity | 237 +++++++++++++++++- Assets/Scenes/SampleScene.unity | 3 +- Assets/Scripts/GameManager.cs | 4 +- Assets/Scripts/MainMenu/StoreManager.cs | 5 + Assets/Scripts/ShipController.cs | 10 + .../Post-process Volume Profile.asset | 20 +- 6 files changed, 265 insertions(+), 14 deletions(-) diff --git a/Assets/Scenes/MainMenu.unity b/Assets/Scenes/MainMenu.unity index bf3c68b..598f229 100644 --- a/Assets/Scenes/MainMenu.unity +++ b/Assets/Scenes/MainMenu.unity @@ -656,6 +656,104 @@ RectTransform: m_AnchoredPosition: {x: -3.06, y: 0} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} +--- !u!1 &127075905 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 127075906} + - component: {fileID: 127075909} + - component: {fileID: 127075908} + - component: {fileID: 127075907} + m_Layer: 5 + m_Name: Text (Legacy) + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &127075906 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127075905} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: [] + m_Father: {fileID: 1525686212} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 1, y: 1} + m_AnchoredPosition: {x: 0, y: 0.00010681152} + m_SizeDelta: {x: 0, y: 0.00033569} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &127075907 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127075905} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 405d7f7281b0ec7408f975cdacc4c67a, type: 3} + m_Name: + m_EditorClassIdentifier: + text: + - "ATR\xC1S" + - BACK +--- !u!114 &127075908 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127075905} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 0.98031634, b: 0.7311321, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_FontData: + m_Font: {fileID: 12800000, guid: 2a7ec5614a7894f4580a211199858666, type: 3} + m_FontSize: 64 + m_FontStyle: 0 + m_BestFit: 0 + m_MinSize: 0 + m_MaxSize: 78 + m_Alignment: 4 + m_AlignByGeometry: 0 + m_RichText: 1 + m_HorizontalOverflow: 0 + m_VerticalOverflow: 0 + m_LineSpacing: 1 + m_Text: '++ + +' +--- !u!222 &127075909 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 127075905} + m_CullTransparentMesh: 1 --- !u!1 &194628136 GameObject: m_ObjectHideFlags: 0 @@ -4743,7 +4841,7 @@ MonoBehaviour: screens: - {fileID: 2090491307} - {fileID: 465510086} - phoneMode: 1 + _phoneMode: 0 playerMoney: 0 playerMoneyUI: {fileID: 224877960} deletePlayerPrefs: 0 @@ -6331,6 +6429,140 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0, y: 0} +--- !u!1 &1525686211 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 1525686212} + - component: {fileID: 1525686215} + - component: {fileID: 1525686214} + - component: {fileID: 1525686213} + m_Layer: 5 + m_Name: cheat + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &1525686212 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525686211} + m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 1, y: 1, z: 1} + m_ConstrainProportionsScale: 0 + m_Children: + - {fileID: 127075906} + m_Father: {fileID: 2090491308} + m_RootOrder: 2 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0.5, y: 0.5} + m_AnchorMax: {x: 0.5, y: 0.5} + m_AnchoredPosition: {x: 897.4009, y: -465} + m_SizeDelta: {x: 123.9604, y: 162.4061} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1525686213 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525686211} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Navigation: + m_Mode: 3 + m_WrapAround: 0 + m_SelectOnUp: {fileID: 0} + m_SelectOnDown: {fileID: 0} + m_SelectOnLeft: {fileID: 0} + m_SelectOnRight: {fileID: 0} + m_Transition: 1 + m_Colors: + m_NormalColor: {r: 0, g: 0, b: 0, a: 0.3137255} + m_HighlightedColor: {r: 0, g: 0, b: 0, a: 0.627451} + m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} + m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} + m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} + m_ColorMultiplier: 1 + m_FadeDuration: 0.1 + m_SpriteState: + m_HighlightedSprite: {fileID: 0} + m_PressedSprite: {fileID: 0} + m_SelectedSprite: {fileID: 0} + m_DisabledSprite: {fileID: 0} + m_AnimationTriggers: + m_NormalTrigger: Normal + m_HighlightedTrigger: Highlighted + m_PressedTrigger: Pressed + m_SelectedTrigger: Selected + m_DisabledTrigger: Disabled + m_Interactable: 1 + m_TargetGraphic: {fileID: 1525686214} + m_OnClick: + m_PersistentCalls: + m_Calls: + - m_Target: {fileID: 1110828868} + m_TargetAssemblyTypeName: StoreManager, Assembly-CSharp + m_MethodName: MoneyCheat + m_Mode: 1 + m_Arguments: + m_ObjectArgument: {fileID: 0} + m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine + m_IntArgument: 0 + m_FloatArgument: 0 + m_StringArgument: + m_BoolArgument: 0 + m_CallState: 2 +--- !u!114 &1525686214 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525686211} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 0, g: 0, b: 0, a: 1} + m_RaycastTarget: 1 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} + m_Type: 2 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 0.09 +--- !u!222 &1525686215 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1525686211} + m_CullTransparentMesh: 1 --- !u!1 &1570743170 GameObject: m_ObjectHideFlags: 0 @@ -8264,7 +8496,7 @@ MonoBehaviour: m_EditorClassIdentifier: fullScreen: {fileID: 0} screens: [] - phoneMode: 0 + _phoneMode: 0 playerMoney: 0 playerMoneyUI: {fileID: 0} deletePlayerPrefs: 0 @@ -8366,6 +8598,7 @@ RectTransform: m_Children: - {fileID: 645568555} - {fileID: 827174996} + - {fileID: 1525686212} m_Father: {fileID: 1498507669} m_RootOrder: 5 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 9b21049..8fa9fc8 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -1864,6 +1864,7 @@ MonoBehaviour: Clock: 0 pauseScreen: {fileID: 935035506} pauseButton: {fileID: 1223928076} + phoneMode: 0 --- !u!4 &632780357 Transform: m_ObjectHideFlags: 0 @@ -3176,7 +3177,7 @@ MonoBehaviour: m_PrefabInstance: {fileID: 0} m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 963194225} - m_Enabled: 0 + m_Enabled: 1 m_EditorHideFlags: 0 m_Script: {fileID: 11500000, guid: 8b9a305e18de0c04dbd257a21cd47087, type: 3} m_Name: diff --git a/Assets/Scripts/GameManager.cs b/Assets/Scripts/GameManager.cs index d6fe08b..9928765 100644 --- a/Assets/Scripts/GameManager.cs +++ b/Assets/Scripts/GameManager.cs @@ -40,6 +40,8 @@ public class GameManager : MonoBehaviour public GameObject pauseScreen; public GameObject pauseButton; + public bool phoneMode = false; + // Start is called before the first frame update void Awake() { @@ -51,7 +53,7 @@ void Awake() table = Table.table; fixedTable = Table.fixedTable; - if (MenuManager.phoneMode) + if (phoneMode) { pauseButton.SetActive(true); } diff --git a/Assets/Scripts/MainMenu/StoreManager.cs b/Assets/Scripts/MainMenu/StoreManager.cs index 988af7d..d7ba9c1 100644 --- a/Assets/Scripts/MainMenu/StoreManager.cs +++ b/Assets/Scripts/MainMenu/StoreManager.cs @@ -148,4 +148,9 @@ public void Select() PlayerPrefs.SetInt("SelectedShip" , selectedShip); ChangeShip(); } + + public void MoneyCheat() + { + menuManager.playerMoney += 2000; + } } diff --git a/Assets/Scripts/ShipController.cs b/Assets/Scripts/ShipController.cs index 4dae932..137c025 100644 --- a/Assets/Scripts/ShipController.cs +++ b/Assets/Scripts/ShipController.cs @@ -1,6 +1,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; +using UnityEngine.Rendering.PostProcessing; public class ShipController : MonoBehaviour { @@ -42,6 +43,15 @@ void Start() shipViewModels[shipIndex].SetActive(true); + if (QualitySettings.GetQualityLevel() == 5) + { + GetComponent().enabled = true; + } + else + { + GetComponent().enabled = false; + } + } // Update is called once per frame diff --git a/Assets/Ultimate 10 Plus Shaders/Scenes/Review_Profiles/Post-process Volume Profile.asset b/Assets/Ultimate 10 Plus Shaders/Scenes/Review_Profiles/Post-process Volume Profile.asset index c678853..6f56fc6 100644 --- a/Assets/Ultimate 10 Plus Shaders/Scenes/Review_Profiles/Post-process Volume Profile.asset +++ b/Assets/Ultimate 10 Plus Shaders/Scenes/Review_Profiles/Post-process Volume Profile.asset @@ -62,13 +62,13 @@ MonoBehaviour: active: 1 enabled: overrideState: 1 - value: 1 + value: 0 mode: overrideState: 0 value: 1 intensity: overrideState: 1 - value: 0.31 + value: 0.76 color: overrideState: 0 value: {r: 0, g: 0, b: 0, a: 1} @@ -121,7 +121,7 @@ MonoBehaviour: defaultState: 1 tonemapper: overrideState: 1 - value: 2 + value: 1 toneCurveToeStrength: overrideState: 0 value: 0 @@ -152,7 +152,7 @@ MonoBehaviour: value: 0 tint: overrideState: 0 - value: 0 + value: -62 colorFilter: overrideState: 0 value: {r: 1, g: 1, b: 1, a: 1} @@ -161,16 +161,16 @@ MonoBehaviour: value: 0 saturation: overrideState: 0 - value: 0 + value: -3 brightness: overrideState: 0 value: 0 postExposure: overrideState: 0 - value: 0 + value: 1.84 contrast: - overrideState: 0 - value: 0 + overrideState: 1 + value: 4 mixerRedOutRedIn: overrideState: 0 value: 100 @@ -202,8 +202,8 @@ MonoBehaviour: overrideState: 0 value: {x: 1, y: 1, z: 1, w: 0} gamma: - overrideState: 0 - value: {x: 1, y: 1, z: 1, w: 0} + overrideState: 1 + value: {x: 1, y: 0.98401797, z: 0.95506585, w: 0} gain: overrideState: 0 value: {x: 1, y: 1, z: 1, w: 0}