mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-13 06:47:44 +07:00
Speed up debug gizmos render
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
###### Version 3.1.0
|
||||
|
||||
* Fix Unity 5.6 warning
|
||||
* Speed up debug gizmos render
|
||||
* Disable iso object snapping by children
|
||||
|
||||
###### Version 3.0.2
|
||||
|
||||
@@ -316,14 +316,14 @@ namespace IsoTools {
|
||||
void OnDrawGizmos() {
|
||||
var iso_world = isoWorld;
|
||||
if ( iso_world ) {
|
||||
if ( iso_world.isShowIsoBounds ) {
|
||||
if ( iso_world.isShowIsoBounds && iso_world.Internal_IsVisible(this) ) {
|
||||
IsoUtils.DrawIsoCube(
|
||||
iso_world,
|
||||
position + size * 0.5f,
|
||||
size,
|
||||
Color.red);
|
||||
}
|
||||
if ( iso_world.isShowScreenBounds ) {
|
||||
if ( iso_world.isShowScreenBounds && iso_world.Internal_IsVisible(this) ) {
|
||||
IsoUtils.DrawRect(
|
||||
Internal.QTBounds,
|
||||
Color.green);
|
||||
@@ -333,7 +333,7 @@ namespace IsoTools {
|
||||
|
||||
void OnDrawGizmosSelected() {
|
||||
var iso_world = isoWorld;
|
||||
if ( iso_world && iso_world.isShowDepends ) {
|
||||
if ( iso_world && iso_world.isShowDepends && iso_world.Internal_IsVisible(this) ) {
|
||||
for ( int i = 0, e = Internal.SelfDepends.Count; i < e; ++i ) {
|
||||
IsoUtils.DrawLine(
|
||||
Internal.QTBounds.center,
|
||||
|
||||
@@ -443,6 +443,10 @@ namespace IsoTools {
|
||||
}
|
||||
}
|
||||
|
||||
public bool Internal_IsVisible(IsoObject iso_object) {
|
||||
return _screenSolver.curVisibles.Contains(iso_object);
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------
|
||||
//
|
||||
// Private
|
||||
|
||||
Reference in New Issue
Block a user