|
Hello everybody! I'd like to know how to draw lines via script to make a solid figure, for example a cube, a triangle or a circle. After this I'd like to "extrude" the shape and give it a size (thickness). I found Handles.Drawline on the help and this is the code I wrote:
This gives me an error: Unknown identifier : Handles. Where is my error? And then when I finally create my line and my shape how do I extrude it? Thank you very much.
(comments are locked)
|
|
Handles is an editor class, and can only be used in editor scripts (which must be placed in a folder called Editor in your project's Assets folder), and will only work in the editor. To create solid shapes, you don't need to extrude anything; use the Mesh class. Just so you know, you can declare variables like this:
(or in that particular case, "Vector3.zero".)
(comments are locked)
|
