Example #1
0
Alternatively, if you don't want to include the `A` property publically in your base class, you could change the access modifier of _a to be protected, and then it would be accessible in class2 (because it is derived from class1).
Example #2
0
 Usage Put this script on a camera. The public variables control the number of points in the line, its color, its thickness, and whether the line should be drawn or not (because disabling the script doesn't stop the OnPostRender function from running). The linePoints array is an array of Vector2s in normalized viewport coordinates (i.e. (0, 0) is the lower-left corner of the screen and (1,1) is the upper-right). Currently only one contiguous line is supported, but it would be easy enough to modify it to use an array of Vector2s in order to draw multiple separate lines, if so inclined. A sample routine, which results in the image above: