Function CommandBuilder2D.InLocalSpace
InLocalSpace
(Transform transform)
Scope to draw multiple things relative to a transform object.
Public
ScopeMatrix InLocalSpace (
transform |
Scope to draw multiple things relative to a transform object.
All coordinates for items drawn inside the scope will be multiplied by the transform's localToWorldMatrix.
void Update () {
using (Draw.InLocalSpace(transform)) {
// Draw a box at (0,0,0) relative to the current object
// This means it will show up at the object's position
// The box is also rotated and scaled with the transform
Draw.WireBox(Vector3.zero, Vector3.one);
}
}