BFX_DecaGizmo.cs 705 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class BFX_DecaGizmo : MonoBehaviour
  5. {
  6. Transform t;
  7. private void OnDrawGizmos()
  8. {
  9. if (t == null) t = transform;
  10. Gizmos.color = new Color(49 / 255.0f, 136 / 255.0f, 1, 0.15f);
  11. Gizmos.matrix = Matrix4x4.TRS(t.position, t.rotation, t.lossyScale);
  12. Gizmos.DrawCube(Vector3.zero, Vector3.one);
  13. Gizmos.color = new Color(49 / 255.0f, 136 / 255.0f, 1, 0.95f);
  14. Gizmos.DrawWireCube(Vector3.zero, Vector3.one);
  15. Gizmos.matrix = Matrix4x4.identity;
  16. Gizmos.color = new Color(0.95f, 0.2f, 0.2f, 0.85f);
  17. Gizmos.DrawRay(t.position, t.up);
  18. }
  19. }