improve Highlight
This commit is contained in:
@@ -4,11 +4,12 @@ using UnityEngine;
|
||||
public class Hightlight : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Color color = new Color(147, 142, 142, 1);
|
||||
private Color color = Color.white;
|
||||
|
||||
private Renderer[] renderers;
|
||||
//helper list to cache all the materials ofd this object
|
||||
private List<Material> materials;
|
||||
private const float INTENSITY = .15f;
|
||||
|
||||
//Gets all the materials from each renderer
|
||||
private void Awake()
|
||||
@@ -21,6 +22,7 @@ public class Hightlight : MonoBehaviour
|
||||
//that is why we need to all materials with "s"
|
||||
materials.AddRange(new List<Material>(renderer.materials));
|
||||
}
|
||||
color = color * INTENSITY;
|
||||
}
|
||||
|
||||
public void ToggleHighlight(bool val)
|
||||
|
||||
Reference in New Issue
Block a user