Skip to content

Instantly share code, notes, and snippets.

@jniac
Created October 15, 2019 14:11
Show Gist options
  • Save jniac/a81ba251d57b6ec61c95eaded0add92a to your computer and use it in GitHub Desktop.
Save jniac/a81ba251d57b6ec61c95eaded0add92a to your computer and use it in GitHub Desktop.
SceneHelper
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SceneHelper : MonoBehaviour
{
private void OnDrawGizmos()
{
Gizmos.color = Color.yellow;
Gizmos.matrix = transform.localToWorldMatrix;
Vector3 A = new Vector3(-.5f, -.5f, 0);
Vector3 B = new Vector3(-.5f, +.5f, 0);
Vector3 C = new Vector3(+.5f, +.5f, 0);
Vector3 D = new Vector3(+.5f, -.5f, 0);
Gizmos.DrawLine(A, B);
Gizmos.DrawLine(B, C);
Gizmos.DrawLine(C, D);
Gizmos.DrawLine(D, A);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment