Closed ssshake closed 10 years ago
Sample code, to highlight on click. I think the best shader for this is one I used in another project called gems.shader.
using UnityEngine; using System.Collections;
public class Example : MonoBehaviour { public Shader shader1 = Shader.Find("Diffuse"); public Shader shader2 = Shader.Find("Transparent/Diffuse"); void Update() { if (Input.GetButtonDown("Jump")) if (renderer.material.shader == shader1) renderer.material.shader = shader2; else renderer.material.shader = shader1;
}
}
I'm attempting to deal with this... how do I set the renderer for an asteroid?
done
When you click and asteroid, highlight the border in a colour