PlayerVisual remove debug
This commit is contained in:
@@ -50,7 +50,24 @@ public class PlayerVisual : MonoBehaviour
|
|||||||
|
|
||||||
public void RandomizeCustom()
|
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()
|
private void SetCustom()
|
||||||
|
|||||||
Reference in New Issue
Block a user