mirror of
https://github.com/BlackMATov/unity-iso-tools.git
synced 2025-12-15 09:16:08 +07:00
unnecessary algo little fix
This commit is contained in:
@@ -15,15 +15,8 @@ namespace IsoTools.Internal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected void DestroyUnnecessaryCheck() {
|
protected void DestroyUnnecessaryCheck() {
|
||||||
var unnecessary = true;
|
|
||||||
GetComponents<IsoPhysicHelperHolder>(_tmpHolders);
|
GetComponents<IsoPhysicHelperHolder>(_tmpHolders);
|
||||||
for ( int i = 0, e = _tmpHolders.Count; i < e; ++i ) {
|
if ( _tmpHolders.Count == 1 && _tmpHolders[0] == this ) {
|
||||||
if ( _tmpHolders[i] != this ) {
|
|
||||||
unnecessary = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( unnecessary ) {
|
|
||||||
Destroy(physicHelper);
|
Destroy(physicHelper);
|
||||||
}
|
}
|
||||||
_tmpHolders.Clear();
|
_tmpHolders.Clear();
|
||||||
|
|||||||
Reference in New Issue
Block a user