PlayerVisual remove debug

This commit is contained in:
2026-03-18 09:53:16 +01:00
parent 9d9d9ecb80
commit 80321228bb

View File

@@ -50,7 +50,24 @@ public class PlayerVisual : MonoBehaviour
public void RandomizeCustom()
{
Debug.Log("randomize");
float hueShift = Random.Range(0f, 360f);
_customization.Colors = new Color[_references.Materials.Length];
for (int i = 0; i < _customization.Colors.Length; i++)
{
Material mat = _references.Materials[i];
Color col = mat.color;
if (mat.IsKeywordEnabled("_EMISSION"))
col = mat.GetColor("_EmissionColor");
col = ShiftHue(col, hueShift);
_customization.Colors[i] = col;
}
SetCustom();
SaveCustom();
}
private void SetCustom()