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