In the Unity Editor the Line Renderer component works perfectly fine and renders just as it should do but when it is built for Android then they disappear.
The material for the Line Renderer uses the Mobile/Particles/Additive shader
My code for the Line Renderer is here:
string line;
StreamReader theReader = new StreamReader (fileName, Encoding.Default);
using (theReader) {
do {
line = theReader.ReadLine ();
file.Add (line);
if (line != null) {
string[] entries = line.Split ('>');
int firstNode = int.Parse (entries [0]);
int secondNode = int.Parse (entries [1]);
LineRenderer renderer = nodes [firstNode].GetComponent ();
renderer.SetPosition (0, nodes [firstNode].transform.position);
renderer.SetPosition (1, nodes [secondNode].transform.position);
}
} while (line != null);
theReader.Close();
}
↧