30 lines
637 B
C#
30 lines
637 B
C#
|
using System;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace BITKit.Scene
|
||
|
{
|
||
|
public class SceneGizmoReference : MonoBehaviour
|
||
|
{
|
||
|
[SerializeField] private bool draw;
|
||
|
[SerializeField] private Color color;
|
||
|
[SerializeField] private float size;
|
||
|
|
||
|
[SerializeField] private Optional<Vector3> bounds;
|
||
|
private void OnDrawGizmos()
|
||
|
{
|
||
|
if (draw is false) return;
|
||
|
var position = transform.position;
|
||
|
Gizmos.color = color;
|
||
|
Gizmos.DrawWireSphere(position, size);
|
||
|
|
||
|
if (bounds.Allow)
|
||
|
{
|
||
|
Gizmos.DrawWireCube(position+transform.rotation*bounds.Value/2, bounds.Value);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|