From 7c8c419c6e9d0a7ebc0353e2e75edabebfad642d Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Wed, 10 Sep 2025 11:32:19 -0700 Subject: [PATCH] Fix issues after compiling --- Assets/Scripts/CustomColorObject.cs | 39 ++++++++++++++--------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/Assets/Scripts/CustomColorObject.cs b/Assets/Scripts/CustomColorObject.cs index 79c2e6a..a158bba 100644 --- a/Assets/Scripts/CustomColorObject.cs +++ b/Assets/Scripts/CustomColorObject.cs @@ -32,7 +32,6 @@ public class CustomColorObject : MonoBehaviour public void SetColor() { - dynamic obj = null; JArray color = null; Color colorType = Color.white; Color currentColor = Color.white; @@ -43,7 +42,7 @@ public class CustomColorObject : MonoBehaviour color = BazookaManager.Instance.GetColorSettingBackground(); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = ApplyModifiers(colorType); - obj = gameObject.GetComponent(); + var obj = gameObject.GetComponent(); currentColor = obj.backgroundColor; currentColor.r = colorType.r; currentColor.g = colorType.g; @@ -65,67 +64,67 @@ public class CustomColorObject : MonoBehaviour color = BazookaManager.Instance.GetColorSettingMenuBackground(); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = ApplyModifiers(colorType); - obj = gameObject.GetComponent(); - currentColor = obj.color; + var obj2 = gameObject.GetComponent(); + currentColor = obj2.color; currentColor.r = colorType.r; currentColor.g = colorType.g; currentColor.b = colorType.b; - obj.color = currentColor; + obj2.color = currentColor; break; case ColorObjectType.MenuBackgroundColorText: color = BazookaManager.Instance.GetColorSettingMenuBackground(); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = ApplyModifiers(colorType); - obj = gameObject.GetComponent(); - currentColor = obj.color; + var obj3 = gameObject.GetComponent(); + currentColor = obj3.color; currentColor.r = colorType.r; currentColor.g = colorType.g; currentColor.b = colorType.b; - obj.color = currentColor; + obj3.color = currentColor; break; case ColorObjectType.ButtonColor: color = BazookaManager.Instance.GetColorSettingButton(); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = ApplyModifiers(colorType); - obj = gameObject.GetComponent(); - currentColor = obj.color; + obj2 = gameObject.GetComponent(); + currentColor = obj2.color; currentColor.r = colorType.r; currentColor.g = colorType.g; currentColor.b = colorType.b; - obj.color = currentColor; + obj2.color = currentColor; break; case ColorObjectType.ButtonColorText: color = BazookaManager.Instance.GetColorSettingButton(); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = ApplyModifiers(colorType); - obj = gameObject.GetComponent(); - currentColor = obj.color; + obj3 = gameObject.GetComponent(); + currentColor = obj3.color; currentColor.r = colorType.r; currentColor.g = colorType.g; currentColor.b = colorType.b; - obj.color = currentColor; + obj3.color = currentColor; break; case ColorObjectType.TextColor: color = BazookaManager.Instance.GetColorSettingText(); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = ApplyModifiers(colorType); - obj = gameObject.GetComponent(); - currentColor = obj.color; + obj3 = gameObject.GetComponent(); + currentColor = obj3.color; currentColor.r = colorType.r; currentColor.g = colorType.g; currentColor.b = colorType.b; - obj.color = currentColor; + obj3.color = currentColor; break; case ColorObjectType.TextColorImage: color = BazookaManager.Instance.GetColorSettingText(); colorType = new((int)color[0] / 255f, (int)color[1] / 255f, (int)color[2] / 255f); colorType = ApplyModifiers(colorType); - obj = gameObject.GetComponent(); - currentColor = obj.color; + obj2 = gameObject.GetComponent(); + currentColor = obj2.color; currentColor.r = colorType.r; currentColor.g = colorType.g; currentColor.b = colorType.b; - obj.color = currentColor; + obj2.color = currentColor; break; } }