From e9e2fbc3c156fd8823e8a86d7ebaab72c0092275 Mon Sep 17 00:00:00 2001 From: Pasha Bibko <156938226+PashaBibko@users.noreply.github.com> Date: Thu, 16 Apr 2026 15:58:07 +0100 Subject: [PATCH] Made the lines have a material --- Assets/Materials.meta | 8 ++ Assets/Materials/UI-BrownMat.mat | 137 ++++++++++++++++++++ Assets/Materials/UI-BrownMat.mat.meta | 8 ++ Assets/Scenes/UpgradesScene.unity | 164 ++++++------------------ Assets/Scripts/UI/BasicUpgradeButton.cs | 6 +- 5 files changed, 192 insertions(+), 131 deletions(-) create mode 100644 Assets/Materials.meta create mode 100644 Assets/Materials/UI-BrownMat.mat create mode 100644 Assets/Materials/UI-BrownMat.mat.meta diff --git a/Assets/Materials.meta b/Assets/Materials.meta new file mode 100644 index 0000000..22ba2ac --- /dev/null +++ b/Assets/Materials.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 6d95f465fa573e84d9b93f54bfad2c5f +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Materials/UI-BrownMat.mat b/Assets/Materials/UI-BrownMat.mat new file mode 100644 index 0000000..7200ff8 --- /dev/null +++ b/Assets/Materials/UI-BrownMat.mat @@ -0,0 +1,137 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: UI-BrownMat + m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} + m_Parent: {fileID: 0} + m_ModifiedSerializedProperties: 0 + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: + RenderType: Opaque + disabledShaderPasses: + - MOTIONVECTORS + m_LockedProperties: + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BaseMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _SpecGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_Lightmaps: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_LightmapsInd: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - unity_ShadowMasks: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _AddPrecomputedVelocity: 0 + - _AlphaClip: 0 + - _AlphaToMask: 0 + - _Blend: 0 + - _BlendModePreserveSpecular: 1 + - _BumpScale: 1 + - _ClearCoatMask: 0 + - _ClearCoatSmoothness: 0 + - _Cull: 2 + - _Cutoff: 0.5 + - _DetailAlbedoMapScale: 1 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _DstBlendAlpha: 0 + - _EnvironmentReflections: 1 + - _GlossMapScale: 0 + - _Glossiness: 0 + - _GlossyReflections: 0 + - _Metallic: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.005 + - _QueueOffset: 0 + - _ReceiveShadows: 1 + - _Smoothness: 0.5 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _SrcBlendAlpha: 1 + - _Surface: 0 + - _WorkflowMode: 1 + - _XRMotionVectorsPass: 1 + - _ZWrite: 1 + m_Colors: + - _BaseColor: {r: 0.30980393, g: 0.19607843, b: 0.10980392, a: 1} + - _Color: {r: 0.3098039, g: 0.19607839, b: 0.10980389, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + - _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} + m_BuildTextureStacks: [] + m_AllowLocking: 1 +--- !u!114 &5015546045329492367 +MonoBehaviour: + m_ObjectHideFlags: 11 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} + m_Name: + m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion + version: 10 diff --git a/Assets/Materials/UI-BrownMat.mat.meta b/Assets/Materials/UI-BrownMat.mat.meta new file mode 100644 index 0000000..2a7f2c0 --- /dev/null +++ b/Assets/Materials/UI-BrownMat.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: eb8c84c9b7bce8f4ab2641ccf50d239c +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/Scenes/UpgradesScene.unity b/Assets/Scenes/UpgradesScene.unity index aad3a1b..174f2de 100644 --- a/Assets/Scenes/UpgradesScene.unity +++ b/Assets/Scenes/UpgradesScene.unity @@ -312,133 +312,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 153563567} m_CullTransparentMesh: 1 ---- !u!1 &198458137 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 198458139} - - component: {fileID: 198458138} - - component: {fileID: 198458140} - m_Layer: 0 - m_Name: Directional Light - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!108 &198458138 -Light: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 198458137} - m_Enabled: 1 - serializedVersion: 12 - m_Type: 1 - m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1} - m_Intensity: 1 - m_Range: 10 - m_SpotAngle: 30 - m_InnerSpotAngle: 21.80208 - m_CookieSize2D: {x: 0.5, y: 0.5} - m_Shadows: - m_Type: 2 - m_Resolution: -1 - m_CustomResolution: -1 - m_Strength: 1 - m_Bias: 0.05 - m_NormalBias: 0.4 - m_NearPlane: 0.2 - m_CullingMatrixOverride: - e00: 1 - e01: 0 - e02: 0 - e03: 0 - e10: 0 - e11: 1 - e12: 0 - e13: 0 - e20: 0 - e21: 0 - e22: 1 - e23: 0 - e30: 0 - e31: 0 - e32: 0 - e33: 1 - m_UseCullingMatrixOverride: 0 - m_Cookie: {fileID: 0} - m_DrawHalo: 0 - m_Flare: {fileID: 0} - m_RenderMode: 0 - m_CullingMask: - serializedVersion: 2 - m_Bits: 4294967295 - m_RenderingLayerMask: 1 - m_Lightmapping: 4 - m_LightShadowCasterMode: 0 - m_AreaSize: {x: 1, y: 1} - m_BounceIntensity: 1 - m_ColorTemperature: 6570 - m_UseColorTemperature: 0 - m_BoundingSphereOverride: {x: 0, y: 0, z: 0, w: 0} - m_UseBoundingSphereOverride: 0 - m_UseViewFrustumForShadowCasterCull: 1 - m_ForceVisible: 0 - m_ShadowRadius: 0 - m_ShadowAngle: 0 - m_LightUnit: 1 - m_LuxAtDistance: 1 - m_EnableSpotReflector: 1 ---- !u!4 &198458139 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 198458137} - serializedVersion: 2 - 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_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} ---- !u!114 &198458140 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 198458137} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 474bcb49853aa07438625e644c072ee6, type: 3} - m_Name: - m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalLightData - m_UsePipelineSettings: 1 - m_AdditionalLightsShadowResolutionTier: 2 - m_CustomShadowLayers: 0 - 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!1 &201229658 GameObject: m_ObjectHideFlags: 0 @@ -656,6 +529,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 306312747} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &218329187 GameObject: m_ObjectHideFlags: 0 @@ -793,6 +667,7 @@ MonoBehaviour: Upgrade: 3 UpgradeCost: 0 RequiredUpgrades: [] + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &239945577 GameObject: m_ObjectHideFlags: 0 @@ -931,6 +806,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1215656306} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &242722018 GameObject: m_ObjectHideFlags: 0 @@ -1148,6 +1024,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 531797809} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &282988157 GameObject: m_ObjectHideFlags: 0 @@ -1286,6 +1163,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 766041999} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &291432704 GameObject: m_ObjectHideFlags: 0 @@ -1503,6 +1381,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 946556767} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &321845189 GameObject: m_ObjectHideFlags: 0 @@ -1799,6 +1678,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1077588040} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &406796504 GameObject: m_ObjectHideFlags: 0 @@ -2095,6 +1975,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 766041999} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &475841621 GameObject: m_ObjectHideFlags: 0 @@ -2370,6 +2251,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 531797809} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &531797804 GameObject: m_ObjectHideFlags: 0 @@ -2508,6 +2390,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1805700036} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &556201452 GameObject: m_ObjectHideFlags: 0 @@ -2804,6 +2687,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1342376329} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &571790755 GameObject: m_ObjectHideFlags: 0 @@ -3258,6 +3142,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1077588040} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &697576762 GameObject: m_ObjectHideFlags: 0 @@ -3399,6 +3284,7 @@ MonoBehaviour: - {fileID: 282988162} - {fileID: 1721077925} - {fileID: 566818527} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &765138794 GameObject: m_ObjectHideFlags: 0 @@ -3615,6 +3501,7 @@ MonoBehaviour: Upgrade: 4 UpgradeCost: 0 RequiredUpgrades: [] + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &772192184 GameObject: m_ObjectHideFlags: 0 @@ -3754,6 +3641,7 @@ MonoBehaviour: RequiredUpgrades: - {fileID: 239945582} - {fileID: 471231064} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &853095383 GameObject: m_ObjectHideFlags: 0 @@ -4436,6 +4324,7 @@ MonoBehaviour: Upgrade: 0 UpgradeCost: 0 RequiredUpgrades: [] + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &949599745 GameObject: m_ObjectHideFlags: 0 @@ -4733,6 +4622,7 @@ MonoBehaviour: RequiredUpgrades: - {fileID: 528476489} - {fileID: 471231064} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1021226829 GameObject: m_ObjectHideFlags: 0 @@ -4871,6 +4761,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1812298575} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1077588035 GameObject: m_ObjectHideFlags: 0 @@ -5008,6 +4899,7 @@ MonoBehaviour: Upgrade: 0 UpgradeCost: 0 RequiredUpgrades: [] + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1215656301 GameObject: m_ObjectHideFlags: 0 @@ -5146,6 +5038,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1486581294} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1228767730 GameObject: m_ObjectHideFlags: 0 @@ -5838,6 +5731,7 @@ MonoBehaviour: Upgrade: 2 UpgradeCost: 0 RequiredUpgrades: [] + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1394817801 GameObject: m_ObjectHideFlags: 0 @@ -5976,6 +5870,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 683605715} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1449025482 GameObject: m_ObjectHideFlags: 0 @@ -6114,6 +6009,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 218329192} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1454648453 GameObject: m_ObjectHideFlags: 0 @@ -6409,6 +6305,7 @@ MonoBehaviour: Upgrade: 1 UpgradeCost: 0 RequiredUpgrades: [] + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1512838241 GameObject: m_ObjectHideFlags: 0 @@ -6682,6 +6579,7 @@ MonoBehaviour: RequiredUpgrades: - {fileID: 1992771926} - {fileID: 1449025487} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1552666740 GameObject: m_ObjectHideFlags: 0 @@ -6820,6 +6718,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 218329192} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1596265122 GameObject: m_ObjectHideFlags: 0 @@ -7367,6 +7266,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 2128693475} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1729499770 GameObject: m_ObjectHideFlags: 0 @@ -7507,6 +7407,7 @@ MonoBehaviour: - {fileID: 406517119} - {fileID: 216535976} - {fileID: 1835680349} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1778644664 GameObject: m_ObjectHideFlags: 0 @@ -7645,6 +7546,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1215656306} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1805700031 GameObject: m_ObjectHideFlags: 0 @@ -7782,6 +7684,7 @@ MonoBehaviour: Upgrade: 6 UpgradeCost: 0 RequiredUpgrades: [] + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1812298570 GameObject: m_ObjectHideFlags: 0 @@ -7920,6 +7823,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1342376329} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1835457753 GameObject: m_ObjectHideFlags: 0 @@ -8058,6 +7962,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1812298575} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1835680344 GameObject: m_ObjectHideFlags: 0 @@ -8196,6 +8101,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1836886870} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1836886865 GameObject: m_ObjectHideFlags: 0 @@ -8334,6 +8240,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 1486581294} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &1966181549 GameObject: m_ObjectHideFlags: 0 @@ -8547,6 +8454,7 @@ MonoBehaviour: UpgradeCost: 0 RequiredUpgrades: - {fileID: 946556767} + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &2097716080 GameObject: m_ObjectHideFlags: 0 @@ -8871,6 +8779,7 @@ MonoBehaviour: Upgrade: 5 UpgradeCost: 0 RequiredUpgrades: [] + LineMaterial: {fileID: 2100000, guid: eb8c84c9b7bce8f4ab2641ccf50d239c, type: 2} --- !u!1 &2129197832 GameObject: m_ObjectHideFlags: 0 @@ -9034,6 +8943,5 @@ SceneRoots: m_ObjectHideFlags: 0 m_Roots: - {fileID: 475841624} - - {fileID: 198458139} - {fileID: 1601651585} - {fileID: 1630531059} diff --git a/Assets/Scripts/UI/BasicUpgradeButton.cs b/Assets/Scripts/UI/BasicUpgradeButton.cs index 9f5da69..447cb0b 100644 --- a/Assets/Scripts/UI/BasicUpgradeButton.cs +++ b/Assets/Scripts/UI/BasicUpgradeButton.cs @@ -23,6 +23,7 @@ namespace Fruitomation.UI [Header("References")] [SerializeField] private BasicUpgradeButton[] RequiredUpgrades; + [SerializeField] private Material LineMaterial; private (LineRenderer, BasicUpgradeButton)[] UpgradeLines; @@ -53,11 +54,10 @@ namespace Fruitomation.UI rt.anchoredPosition = new Vector2(); LineRenderer lr = go.AddComponent(); + lr.material = LineMaterial; lr.positionCount = 2; - lines.Add((lr, required)); - lr.SetPosition(0, transform.position); - lr.SetPosition(1, required.transform.position); + lines.Add((lr, required)); } UpgradeLines = lines.ToArray(); }