void OnDrawGizmos()
{
if (Application.isPlaying || this.container == null)
return;
Vector3 pos, size;
if (this._ui != null)
{
Gizmos.matrix = this._ui.displayObject.cachedTransform.localToWorldMatrix;
pos = new Vector3(this._ui.width / 2, -this._ui.height / 2, 0);
size = new Vector3(this._ui.width, this._ui.height, 0);
}
else
{
Gizmos.matrix = this.container.cachedTransform.localToWorldMatrix;
pos = new Vector3(uiBounds.x + uiBounds.width / 2, -uiBounds.y - uiBounds.height / 2, 0);
size = new Vector3(uiBounds.width, uiBounds.height, 0);
}
Gizmos.color = new Color(0, 0, 0, 0);
Gizmos.DrawCube(pos, size);
Gizmos.color = Color.white;
Gizmos.DrawWireCube(pos, size);
}