From cc85781ec894a425dc2476ae2924a47cf3a47e70 Mon Sep 17 00:00:00 2001 From: MaZiFAU <63099053+MaZiFAU@users.noreply.github.com> Date: Fri, 30 Jun 2023 17:07:28 +0200 Subject: [PATCH] Minor refactor/ general Houskeeping --- .../Prefabs/UI/Facts/Factscreen.prefab | 2 +- Assets/Scripts/GenerateDemoFiles.cs | 5 +- .../InteractionEngine/Gadgets/AngleTool.cs | 2 - .../Gadgets/GadgetBehaviour.cs | 2 +- .../Scripts/InteractionEngine/Gadgets/Tape.cs | 5 +- .../Gadgets/TestMiddlePoint.cs | 3 +- .../Scripts/InteractionEngine/ShinyThings.cs | 3 +- .../Scripts/InteractionEngine/ToolModeText.cs | 8 ++- .../Scripts/InteractionEngine/WorldCursor.cs | 67 +++++++------------ .../InteractionEngine/WorldFactInteraction.cs | 5 +- Assets/Scripts/Loading/Loader.cs | 11 +-- .../Scripts/MeshGenerator/CircleGenerator.cs | 1 - .../Scripts/MeshGenerator/TorusGenerator.cs | 3 - Assets/Scripts/Restart.cs | 12 +--- Assets/Scripts/SoundManager.cs | 17 ++--- Assets/Scripts/StartServer.cs | 3 +- Assets/Scripts/UI/DiscreteBarSlider.cs | 6 -- .../UI/FactExplorer/OpenFactExplorer.cs | 11 ++- Assets/Scripts/UI/InGame/PopupBehavior.cs | 12 ++-- Assets/Scripts/UI/InGame/ScalingCollider.cs | 21 ++---- Assets/Scripts/UI/MainMenue/MenueLoader.cs | 15 +---- .../Extensions/IEnumeratorExtensions.cs | 2 - .../Utility/Extensions/RendererExtensions.cs | 2 +- UserSettings/EditorUserSettings.asset | 4 +- 24 files changed, 77 insertions(+), 145 deletions(-) diff --git a/Assets/Resources/Prefabs/UI/Facts/Factscreen.prefab b/Assets/Resources/Prefabs/UI/Facts/Factscreen.prefab index 65d73c56..6d5da8be 100644 --- a/Assets/Resources/Prefabs/UI/Facts/Factscreen.prefab +++ b/Assets/Resources/Prefabs/UI/Facts/Factscreen.prefab @@ -493,7 +493,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: -33139.805} + m_AnchoredPosition: {x: 0, y: -33793.79} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 1} --- !u!114 &8823539307371861913 diff --git a/Assets/Scripts/GenerateDemoFiles.cs b/Assets/Scripts/GenerateDemoFiles.cs index 0dd8024f..07330d68 100644 --- a/Assets/Scripts/GenerateDemoFiles.cs +++ b/Assets/Scripts/GenerateDemoFiles.cs @@ -226,7 +226,7 @@ public static void GenerateCanonBallStage() PointFact topB = new(tmpVec, Vector3.up, StageStatic.stage.solution); string topBURI = StageStatic.stage.solution.Add(topB, out _, true, null, null); - LineFact topology = new LineFact(topAURI, topBURI, StageStatic.stage.solution); + LineFact topology = new (topAURI, topBURI, StageStatic.stage.solution); string lineURI = StageStatic.stage.solution.Add(topology, out _, true, null, null); StageStatic.stage.solution.ExposedSolutionFacts.Add(lineURI); @@ -246,8 +246,7 @@ public static void GenerateCanonBallStage() out _, true, null, null); StageStatic.stage.solution.ExposedSolutionFacts.Add(attacheFactURI); - //TODO: - // ~attach funcs + ~cheat? + //TODO: ~attach funcs + ~cheat? //StageStatic.stage.solution.ValidationSet = // new List<SolutionOrganizer.SubSolution> { // new SolutionOrganizer.SubSolution(new HashSet<string> { target_Id }, null, null, new LineFactHightDirectionComparer()), diff --git a/Assets/Scripts/InteractionEngine/Gadgets/AngleTool.cs b/Assets/Scripts/InteractionEngine/Gadgets/AngleTool.cs index 79787d28..c94cde84 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/AngleTool.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/AngleTool.cs @@ -41,10 +41,8 @@ public override void _Hit(RaycastHit[] hit) } } - //Expect a LineFact here, where Line.Pid2 will be the Basis-Point of the angle protected override void _ActivateLineDrawing() { - //In AngleMode with 3 Points we want to draw nearly a rectangle so we add a startPoint and an Endpoint to this preview GadgetBehaviour.LineRenderer.positionCount = curveDrawingVertexCount + 2; GadgetBehaviour.LineRenderer.startWidth = 0.05f; diff --git a/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs b/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs index 327c53cf..4a214266 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/GadgetBehaviour.cs @@ -10,7 +10,7 @@ public class GadgetBehaviour : MonoBehaviour, ISerializationCallbackReceiver { // could be worked around of. But as long as not needed: this is better - public static GadgetBehaviour Singelton = null; + public static GadgetBehaviour Singelton { get; private set; } /// <summary>Which cursor to use</summary> /// <remarks>When not set in Inspector, will be searching for any <see cref="WorldCursor"/>.</remarks> diff --git a/Assets/Scripts/InteractionEngine/Gadgets/Tape.cs b/Assets/Scripts/InteractionEngine/Gadgets/Tape.cs index f249084c..ca80d54a 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/Tape.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/Tape.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; -using static CommunicationEvents; +using UnityEngine; public class Tape : Gadget { diff --git a/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs b/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs index 3c250bc7..9903f216 100644 --- a/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs +++ b/Assets/Scripts/InteractionEngine/Gadgets/TestMiddlePoint.cs @@ -1,10 +1,9 @@ -using Newtonsoft.Json; using UnityEngine; public class TestMiddlePoint : Gadget { /// \copydoc Gadget.s_type - [JsonProperty] + [Newtonsoft.Json.JsonProperty] protected static new string s_type = "MiddleTool"; //Cache for drawing Line diff --git a/Assets/Scripts/InteractionEngine/ShinyThings.cs b/Assets/Scripts/InteractionEngine/ShinyThings.cs index f9082be1..f3bbe29d 100644 --- a/Assets/Scripts/InteractionEngine/ShinyThings.cs +++ b/Assets/Scripts/InteractionEngine/ShinyThings.cs @@ -49,7 +49,8 @@ public void Start() public void Update() { - HighlightCurserHit(Cursor.Hit); + foreach(var hit in Cursor.Hits) + HighlightCurserHit(hit); } private void HighlightCurserHit(RaycastHit hit) diff --git a/Assets/Scripts/InteractionEngine/ToolModeText.cs b/Assets/Scripts/InteractionEngine/ToolModeText.cs index f1728cf3..5e6d92fd 100644 --- a/Assets/Scripts/InteractionEngine/ToolModeText.cs +++ b/Assets/Scripts/InteractionEngine/ToolModeText.cs @@ -2,15 +2,17 @@ public class ToolModeText : MonoBehaviour { - // Start is called before the first frame update - void Start() + private UnityEngine.UI.Text CachedTextField; + + private void Awake() { + CachedTextField = GetComponentInChildren<UnityEngine.UI.Text>(); CommunicationEvents.ToolModeChangedEvent.AddListener(OnToolModeChanged); } void OnToolModeChanged(int id) { //When ToolMode changes: Change Text of active gadget - gameObject.GetComponentInChildren<UnityEngine.UI.Text>().text = GadgetBehaviour.gadgets[id].UiName; + CachedTextField.text = GadgetBehaviour.gadgets[id].UiName; } } diff --git a/Assets/Scripts/InteractionEngine/WorldCursor.cs b/Assets/Scripts/InteractionEngine/WorldCursor.cs index a53f0a76..96eefbac 100644 --- a/Assets/Scripts/InteractionEngine/WorldCursor.cs +++ b/Assets/Scripts/InteractionEngine/WorldCursor.cs @@ -1,17 +1,9 @@ -using System; -using System.Globalization; -using System.Collections; +using System.Globalization; using System.Collections.Generic; using UnityEngine; -using UnityEngine.Events; using UnityEngine.EventSystems; -using static GadgetBehaviour; -using UnityEngine.InputSystem; using MoreLinq; using System.Linq; -//TODO check whether this can be deleted -//using System.Linq; -//using static GadgetManager; public class WorldCursor : MonoBehaviour { @@ -19,6 +11,8 @@ public class WorldCursor : MonoBehaviour // TODO experimentell for multiple hits public RaycastHit[] Hits; + public float CollisionDistance = 0.1f; + public string deactivateSnapKey; private Camera Cam; private int layerMask; @@ -48,7 +42,7 @@ public void setLayerMask(int layerMask) void Update() { - updateMaxRange(); + UpdateMaxRange(); Cam = Camera.main; //WARN: Should not called every Update; TODO: Cache in Start/Awake? Vector3 mousePos = UIconfig.InputManagerVersion switch @@ -78,7 +72,9 @@ void Update() if (Hits.Length == 0) return; // in case we dont hit anything, just return } - Hits = Hits.OrderBy(h => h.distance).ToArray(); + Hits = Hits + .OrderBy(h => h.distance) + .ToArray(); Fact[] facts = Hits .Select(h => @@ -89,14 +85,7 @@ void Update() int i = 0; for (; i < Hits.Length; i++) - { - // check whether we actually hit something - if (deactSnapKey || - (!Hits[i].collider.transform.CompareTag("SnapZone") - && !Hits[i].collider.transform.CompareTag("Selectable"))) - continue; - - + { // find first acceptable hit if (facts[i] is AbstractLineFact lineFact) { Hits[i].point = @@ -116,19 +105,22 @@ void Update() Hits[i].point = projPlane; } - else + else if (!deactSnapKey && + (Hits[i].collider.transform.CompareTag("SnapZone") + || Hits[i].collider.transform.CompareTag("Selectable"))) { Hits[i].point = Hits[i].collider.transform.position; Hits[i].normal = Vector3.up; } + else + continue; - // checking for 2 lines intersection point - if (Hits.Length <= i + 1 - || Mathf.Abs(Hits[i + 0].distance - Hits[i + 1].distance) > 0.1) - break; // we had at least 1 succesfull case - - // we probably have two objects intersecting + break; // we had at least 1 succesfull case + } + if (i + 1 < Hits.Length + && Hits[i + 1].distance - Hits[i + 0].distance < CollisionDistance) + { // we have two objects intersecting if (facts[i + 0] is RayFact rayFact1 && facts[i + 1] is RayFact rayFact2) { @@ -137,13 +129,10 @@ void Update() , rayFact1.Point1.Point, rayFact1.Dir)) { Hits[i].point = intersectionPoint; - break; } } //TODO: check for other types of intersection. Future Work - - break; // we had at least 1 succesfull case } int nr_hits = Hits.Length - i; @@ -153,16 +142,15 @@ void Update() nr_hits = 1; } Hits = Hits.Slice(i, nr_hits).ToArray(); - Hit = Hits[0]; - transform.up = Hit.normal; - transform.position = Hit.point + .01f * Hit.normal; + transform.up = Hits[0].normal; + transform.position = Hits[0].point + .01f * Hits[0].normal; if (Input.GetMouseButtonDown(0)) ClickHandler(); } - void updateMaxRange() + private void UpdateMaxRange() { switch (UIconfig.GameplayMode) { @@ -180,25 +168,20 @@ void updateMaxRange() } } - //Check if left Mouse-Button was pressed and handle it - void ClickHandler() + private void ClickHandler() { - //TODO edit for the multiple hits. Right now it only checks the first hit - - if (Hit.collider.transform.CompareTag("NPC1_text") + if (Hits[0].collider.transform.CompareTag("NPC1_text") && UIconfig.nextDialogPlease < 2) UIconfig.nextDialogPlease++; if (IsPointerOverUIObject() //Needed for Android. NOT JUST: EventSystem.current.IsPointerOverGameObject() - || Hit.transform.gameObject.layer == LayerMask.NameToLayer("Water") // not allowed to meassure on water - || Hit.collider.transform.CompareTag("NPC1_text")) // not allowed to meassure on textfields + || Hits[0].transform.gameObject.layer == LayerMask.NameToLayer("Water") // not allowed to meassure on water + || Hits[0].collider.transform.CompareTag("NPC1_text")) // not allowed to meassure on textfields return; - //if (Hit.transform.gameObject.layer == LayerMask.NameToLayer("TransparentFX")) return; // not allowed to meassure on TransparentFX CommunicationEvents.TriggerEvent.Invoke(Hits); return; - static bool IsPointerOverUIObject() { PointerEventData eventDataCurrentPosition = new(EventSystem.current) diff --git a/Assets/Scripts/InteractionEngine/WorldFactInteraction.cs b/Assets/Scripts/InteractionEngine/WorldFactInteraction.cs index 6026ae5e..70d9c5e9 100644 --- a/Assets/Scripts/InteractionEngine/WorldFactInteraction.cs +++ b/Assets/Scripts/InteractionEngine/WorldFactInteraction.cs @@ -1,8 +1,6 @@ -using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; -using UnityEngine.UI; /// <summary> /// This class handles displaying Fact tooltips, when hovering over a fact in the Gameworld @@ -15,11 +13,14 @@ public class WorldFactInteraction : MonoBehaviour private GameObject currentDisplay; private Transform lastHit = null; private bool canRun = false; + + private void Update() { // disable this script if HidingCanvas does not render canRun = HidingCanvas.GetComponent<Canvas>().enabled; } + void LateUpdate() { if (!canRun) diff --git a/Assets/Scripts/Loading/Loader.cs b/Assets/Scripts/Loading/Loader.cs index a780e754..840e7d64 100644 --- a/Assets/Scripts/Loading/Loader.cs +++ b/Assets/Scripts/Loading/Loader.cs @@ -1,9 +1,5 @@ -using System; -using System.Collections; -using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; -using static CommunicationEvents; public static class Loader { @@ -15,11 +11,8 @@ public static class Loader /// <summary> /// <c>return <see cref="loadingscene"/> == <see langword="null"/> ? 1f : <see cref="loadingscene"/>.progress;</c> /// </summary> - public static float progress { - get { - return loadingscene == null ? 1f : loadingscene.progress; - } - } + public static float progress + => loadingscene == null ? 1f : loadingscene.progress; /// <summary> /// <c>return <see cref="loadingscene"/> == null || <see cref="loadingscene"/>.isDone;</c> diff --git a/Assets/Scripts/MeshGenerator/CircleGenerator.cs b/Assets/Scripts/MeshGenerator/CircleGenerator.cs index db4ef9f4..c07a99c8 100644 --- a/Assets/Scripts/MeshGenerator/CircleGenerator.cs +++ b/Assets/Scripts/MeshGenerator/CircleGenerator.cs @@ -1,5 +1,4 @@ using System; -using System.Collections; using System.Collections.Generic; using UnityEngine; using System.Linq; diff --git a/Assets/Scripts/MeshGenerator/TorusGenerator.cs b/Assets/Scripts/MeshGenerator/TorusGenerator.cs index f93ed849..4ea8e96e 100644 --- a/Assets/Scripts/MeshGenerator/TorusGenerator.cs +++ b/Assets/Scripts/MeshGenerator/TorusGenerator.cs @@ -1,7 +1,4 @@ -using System.Collections; -using System.Collections.Generic; using UnityEngine; -using System.Linq; using System; public class TorusGenerator : ShapeGenerator diff --git a/Assets/Scripts/Restart.cs b/Assets/Scripts/Restart.cs index 975c4f22..a2fac0ef 100644 --- a/Assets/Scripts/Restart.cs +++ b/Assets/Scripts/Restart.cs @@ -1,18 +1,12 @@ using UnityEngine; using UnityEngine.SceneManagement; -using static UIconfig; -//using static Restart_script; public class Restart : MonoBehaviour { public static void LevelReset() { StageStatic.stage.ResetPlay(); - //UIconfig.CanvasOnOff_Array[2] = 0; - //UIconfig.GamePaused = false; - //Time.timeScale = 1; // UIconfig.Game_TimeScale; Loader.LoadStage(StageStatic.stage.name, !StageStatic.stage.use_install_folder, false); - //StageStatic.stage.factState.softreset(); } public static void LoadMainMenue() @@ -48,16 +42,14 @@ public static void StageFactState_modload() } - - public static void LoadStartScreen() { - StartServer.process.Kill(); // null reference exception if Server started manually + StartServer.process?.Kill(); SceneManager.LoadScene(0); } public static void OnApplicationQuit() { - StartServer.process.Kill(); // null reference exception if Server started manually + StartServer.process?.Kill(); } } diff --git a/Assets/Scripts/SoundManager.cs b/Assets/Scripts/SoundManager.cs index f1af5e0d..5837c5b0 100644 --- a/Assets/Scripts/SoundManager.cs +++ b/Assets/Scripts/SoundManager.cs @@ -5,21 +5,17 @@ public class SoundManager : MonoBehaviour { - public static SoundManager Instance; + public static SoundManager Instance { get; private set; } [SerializeField] Slider volumeSlider; public const float defaultVolume = 0.5f; - // Start is called before the first frame update + + void Start() { if (!PlayerPrefs.HasKey("soundVolume")) - { PlayerPrefs.SetFloat("soundVolume", defaultVolume); - Load(); - } - else - { - Load(); - } + + Load(); } public void Awake() @@ -39,8 +35,7 @@ public void Awake() private void OnDestroy() { - if (!gameObject.IsRoot()) - Instance = null; + Instance = null; } public void ChangeVolume() diff --git a/Assets/Scripts/StartServer.cs b/Assets/Scripts/StartServer.cs index 30d84a1a..e15c4426 100644 --- a/Assets/Scripts/StartServer.cs +++ b/Assets/Scripts/StartServer.cs @@ -65,7 +65,6 @@ IEnumerator ServerRoutine1() command = "\"" + command + "\""; UnityEngine.Debug.Log(command); ProcessStartInfo processInfo; - Process process; //processInfo = new ProcessStartInfo("cmd.exe", "/C " + command); bool cmd = true; @@ -78,7 +77,7 @@ IEnumerator ServerRoutine1() process = Process.Start(processInfo); } else - Process.Start("powershell.exe", command); + process = Process.Start("powershell.exe", command); // *** Read the streams *** // Warning: This approach can lead to deadlocks, see Edit #2 diff --git a/Assets/Scripts/UI/DiscreteBarSlider.cs b/Assets/Scripts/UI/DiscreteBarSlider.cs index 8672acde..9e016715 100644 --- a/Assets/Scripts/UI/DiscreteBarSlider.cs +++ b/Assets/Scripts/UI/DiscreteBarSlider.cs @@ -1,9 +1,6 @@ -using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; -using UnityEngine.EventSystems; -using UnityEngine.Serialization; public class DiscreteBarSlider : MonoBehaviour { @@ -29,10 +26,7 @@ void Start() void Update() { if (isDragged) - { - isDragged = false; return; - } int targ = GetTarget(); float pos = GetTargetRelativePosition(targ); diff --git a/Assets/Scripts/UI/FactExplorer/OpenFactExplorer.cs b/Assets/Scripts/UI/FactExplorer/OpenFactExplorer.cs index e80f7734..30b1db9a 100644 --- a/Assets/Scripts/UI/FactExplorer/OpenFactExplorer.cs +++ b/Assets/Scripts/UI/FactExplorer/OpenFactExplorer.cs @@ -13,6 +13,8 @@ public class OpenFactExplorer : MonoBehaviour, IPointerClickHandler private static Transform factExplorer; private float pressTime = 0f; private const float LONG_PRESS_DURATION = 0.5f; + + private DragHandling CachedDragHandling; #endregion Variables #region UnityMethods @@ -25,6 +27,11 @@ public void OnPointerClick(PointerEventData eventData) } } + private void Awake() + { + CachedDragHandling = GetComponent<DragHandling>(); + } + private void Update() { // open FactExplorer on press on fact longer than LONG_PRESS_DURATION @@ -35,14 +42,14 @@ private void Update() #region Implementation private void HandleTouches() { - if (Input.touchCount != 1 || transform.GetComponent<DragHandling>().dragged) + if (Input.touchCount != 1 || CachedDragHandling.dragged) { pressTime = 0; return; } var touch = Input.GetTouch(0); - if (!RectTransformUtility.RectangleContainsScreenPoint(transform.GetComponent<RectTransform>(), touch.position)) + if (!RectTransformUtility.RectangleContainsScreenPoint((RectTransform)transform, touch.position)) { pressTime = 0; return; diff --git a/Assets/Scripts/UI/InGame/PopupBehavior.cs b/Assets/Scripts/UI/InGame/PopupBehavior.cs index 94de23fb..a02a02ce 100644 --- a/Assets/Scripts/UI/InGame/PopupBehavior.cs +++ b/Assets/Scripts/UI/InGame/PopupBehavior.cs @@ -48,12 +48,12 @@ public void showPopUp() { canvas.SetActive(true); StartCoroutine(hideAfter5sec()); - } - - private IEnumerator hideAfter5sec() - { - yield return new WaitForSeconds(5); - hidePopUp(); + + IEnumerator hideAfter5sec() + { + yield return new WaitForSeconds(5); + hidePopUp(); + } } public void hidePopUp() diff --git a/Assets/Scripts/UI/InGame/ScalingCollider.cs b/Assets/Scripts/UI/InGame/ScalingCollider.cs index b314aee9..71a9f767 100644 --- a/Assets/Scripts/UI/InGame/ScalingCollider.cs +++ b/Assets/Scripts/UI/InGame/ScalingCollider.cs @@ -5,7 +5,6 @@ public class ScalingCollider : MonoBehaviour { - private double scale; public double ColliderRadius; public int Collidersize_ID; public bool use_ColliderRadius; @@ -19,21 +18,13 @@ void Start() private void scalingCollider() { - switch (Opsys) + var scale = Opsys switch { - case OperationSystem.Android: - scale = colliderScale_all * UIconfig.colliderScale_Mobile_default; - break; - - case OperationSystem.Windows: - scale = colliderScale_all * UIconfig.colliderScale_PC_default; - break; - - default: - scale = colliderScale_all * UIconfig.colliderScale_PC_default; - break; - } - + OperationSystem.Android + => colliderScale_all * UIconfig.colliderScale_Mobile_default, + OperationSystem.Windows or _ + => colliderScale_all * UIconfig.colliderScale_PC_default, + }; if (use_ColliderRadius) scale *= ColliderRadius; diff --git a/Assets/Scripts/UI/MainMenue/MenueLoader.cs b/Assets/Scripts/UI/MainMenue/MenueLoader.cs index 970a038b..2a661342 100644 --- a/Assets/Scripts/UI/MainMenue/MenueLoader.cs +++ b/Assets/Scripts/UI/MainMenue/MenueLoader.cs @@ -1,6 +1,3 @@ -using System.Collections; -using System.Collections.Generic; -using System.Linq; using UnityEngine; /// <summary> @@ -36,21 +33,11 @@ public void RevertMode() /// <param name="select">Page to switch to</param> public void SetMode(int select) { - Clear(); + gameObject.SetActiveAllChildren(false); mode_last = mode; mode = select; Pages.transform.GetChild(select).gameObject.SetActive(true); } - - /// <summary> - /// Deactivates all Pages. - /// </summary> - private void Clear() - { - for (int i = 0; i < Pages.transform.childCount; i++) - Pages.transform.GetChild(i).gameObject.SetActive(false); - } - } diff --git a/Assets/Scripts/Utility/Extensions/IEnumeratorExtensions.cs b/Assets/Scripts/Utility/Extensions/IEnumeratorExtensions.cs index 476c9f39..0ad9c67e 100644 --- a/Assets/Scripts/Utility/Extensions/IEnumeratorExtensions.cs +++ b/Assets/Scripts/Utility/Extensions/IEnumeratorExtensions.cs @@ -1,6 +1,4 @@ using System.Collections; -using System.Collections.Generic; -using UnityEngine; public static class IEnumeratorExtensions { diff --git a/Assets/Scripts/Utility/Extensions/RendererExtensions.cs b/Assets/Scripts/Utility/Extensions/RendererExtensions.cs index a5802005..bf978668 100644 --- a/Assets/Scripts/Utility/Extensions/RendererExtensions.cs +++ b/Assets/Scripts/Utility/Extensions/RendererExtensions.cs @@ -17,7 +17,7 @@ public static IEnumerator ProgrammMaterialChange(this Renderer renderer, IEnumer for (IEnumerator<float> lerper = MathfExtensions.LerpInTime(0, 1, lerp_time) ; lerper.MoveNext();) { - renderer.material.Lerp(last_material, new_material , lerper.Current); + renderer.material.Lerp(last_material, new_material, lerper.Current); yield return null; } } diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index dc93d912..ebc89c2c 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -30,10 +30,10 @@ EditorUserSettings: value: 00540c020302515f0b0f5f2711265c44171519797e7c7463787d4d63e1b8303c flags: 0 RecentlyUsedSceneGuid-8: - value: 0709560454055c0d0c5e5c2444740b4413154a72792d22627c714963e0b6373d + value: 57505505560608585a56557116730644404e4d7b7c7b7562787e4f66e4b1313e flags: 0 RecentlyUsedSceneGuid-9: - value: 57505505560608585a56557116730644404e4d7b7c7b7562787e4f66e4b1313e + value: 0709560454055c0d0c5e5c2444740b4413154a72792d22627c714963e0b6373d flags: 0 RecentlyUsedScenePath-0: value: 22424703114646680e0b0227036c681f041b1c39631c3435281e1221eee47a2decee22f0 -- GitLab