Hi, I have two simple issues related to scripts using C#: 1- I have a plane primitive and want to make it appear and disappear depending on some variable state. How do I do that? 2- I was trying to use the DrawLine function in the Update method of a script I am creating to draw a line between two points when runnign the EXE of my game, but the line never shows up. I am trying something just like the sample code in the reference manual: Code (csharp): Debug.DrawLine (Vector3.zero, new Vector3 (1, 0, 0), Color.red); Should I be using adding this code somwhere else? Do I need to enable Debug mode somehow? Should I be using Handles.DrawLine or Gizmos.DrawLine instead? Thank you all.
1. Set the object's renderer to enabled or disabled depending on that variable. 2. The Debug class only works in the editor. For line drawing in builds, try this. --Eric
Thanks, Eric. 1 worked and I will try 2 later on. Right now for 2, since I only wanted on line, I am using a scaled plane primitive (the one I am hiding and showing). GPU Inefficient compared to a line, I know. But, well, there ain't that many objects in my one room scene.