1
0
mirror of synced 2024-11-23 22:30:56 +01:00

fix button color issue

This commit is contained in:
xpeng 2022-10-07 17:52:07 +02:00
parent 390c807f6c
commit 97e2812c19
2 changed files with 3 additions and 3 deletions

View File

@ -23,12 +23,14 @@ public class PanelButton : MonoBehaviour
private int _insideColliderCount = 0;
private Renderer cr;
private Color orgColor;
//public GameObject camera; // just generating warnings lmao
public AudioSource audioSrc;
void Start()
{
cr = GetComponent<Renderer>();
orgColor = cr.material.color;
if (isToggle)
{
@ -90,6 +92,6 @@ public class PanelButton : MonoBehaviour
keybd_event(System.Convert.ToByte(key), (byte)MapVirtualKey((uint)key, 0), 2, UIntPtr.Zero);
keybd_event(System.Convert.ToByte(key2), (byte)MapVirtualKey((uint)key2, 0), 2, UIntPtr.Zero);
if (!isToggle)
cr.material.color = Color.gray;
cr.material.color = orgColor;
}
}

View File

@ -137,8 +137,6 @@ PlayerSettings:
bundleVersion: 0.1.1
preloadedAssets:
- {fileID: 11400000, guid: 74eeb7429f216ca45a7093c586513e98, type: 2}
- {fileID: -6348321304186183749, guid: 6460523340b221f4ea5611d2c011a26c, type: 2}
- {fileID: -6265376527240436808, guid: 5e2dc0db42cc5b3459a781fecb0b76f9, type: 2}
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1