From c7c8f404f23426d37887f754ebfadf23edf4c525 Mon Sep 17 00:00:00 2001 From: xpeng <1216772231@qq.com> Date: Sat, 27 Aug 2022 02:28:53 +0200 Subject: [PATCH] fix hand transparency issue --- Assets/Scripts/Networks/NetworkPlayer.cs | 9 +++++---- Assets/StreamingAssets.meta | 8 -------- .../UnityServicesProjectConfiguration.json | 1 - .../UnityServicesProjectConfiguration.json.meta | 7 ------- 4 files changed, 5 insertions(+), 20 deletions(-) delete mode 100644 Assets/StreamingAssets.meta delete mode 100644 Assets/StreamingAssets/UnityServicesProjectConfiguration.json delete mode 100644 Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta diff --git a/Assets/Scripts/Networks/NetworkPlayer.cs b/Assets/Scripts/Networks/NetworkPlayer.cs index 4455ce3..7ebfbde 100644 --- a/Assets/Scripts/Networks/NetworkPlayer.cs +++ b/Assets/Scripts/Networks/NetworkPlayer.cs @@ -68,14 +68,15 @@ public class NetworkPlayer : NetworkBehaviour float LH, LS, LV; float RH, RS, RV; Color.RGBToHSV(LHandMat.color, out LH, out LS, out LV); Color.RGBToHSV(RHandMat.color, out RH, out RS, out RV); - LH += HandHueShift; RH += HandHueShift; - LHandMat.color = Color.HSVToRGB(LH, RS, RV); - RHandMat.color = Color.HSVToRGB(RH, RS, RV); + var LColor = Color.HSVToRGB(LH + HandHueShift, RS, RV); + var RColor = Color.HSVToRGB(RH + HandHueShift, RS, RV); + LColor.a = LHandMat.color.a; RColor.a = RHandMat.color.a; + LHandMat.color = LColor; + RHandMat.color = RColor; } } private void Start() { - if (IsHost) { transform.position = new Vector3(Player1Position.x, transform.position.y, transform.position.z + Player1Position.y); diff --git a/Assets/StreamingAssets.meta b/Assets/StreamingAssets.meta deleted file mode 100644 index 0371bca..0000000 --- a/Assets/StreamingAssets.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: cbf498d537c04dd4e9f2720eed7a1319 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/StreamingAssets/UnityServicesProjectConfiguration.json b/Assets/StreamingAssets/UnityServicesProjectConfiguration.json deleted file mode 100644 index c03aba6..0000000 --- a/Assets/StreamingAssets/UnityServicesProjectConfiguration.json +++ /dev/null @@ -1 +0,0 @@ -{"Keys":["com.unity.services.core.cloud-environment","com.unity.services.qos.version","com.unity.services.lobby.version","com.unity.services.core.version","com.unity.services.authentication.version","com.unity.services.relay.version"],"Values":[{"m_Value":"production","m_IsReadOnly":true},{"m_Value":"1.0.1","m_IsReadOnly":true},{"m_Value":"1.0.1","m_IsReadOnly":true},{"m_Value":"1.4.2","m_IsReadOnly":true},{"m_Value":"2.1.1","m_IsReadOnly":true},{"m_Value":"1.0.3","m_IsReadOnly":true}]} \ No newline at end of file diff --git a/Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta b/Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta deleted file mode 100644 index c2d37aa..0000000 --- a/Assets/StreamingAssets/UnityServicesProjectConfiguration.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 5850fa29d5b8ecb4a90d8708db37eb9d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: