topical media & game development
lib-unity-tutorial-gameplay-Assets-lineColor.js / js
var lineMaterial : Material;
function Start()
{
line = this.gameObject.AddComponent(LineRenderer);
line.SetWidth(.5, .5);
line.SetVertexCount(2);
// line.useWorldSpace = true;
line.material = lineMaterial;
line.SetColors(Color(1,0,0,1), Color(1,0,0,1));
//line.renderer.enabled = false;
//the line is later enabled
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.