Parcourir la source

safety disable

Trevor Baron il y a 6 ans
Parent
commit
fe6fd884f2
1 fichiers modifiés avec 4 ajouts et 0 suppressions
  1. 4 0
      gui/src/2D/advancedDynamicTexture.ts

+ 4 - 0
gui/src/2D/advancedDynamicTexture.ts

@@ -355,8 +355,12 @@ export class AdvancedDynamicTexture extends DynamicTexture {
         }
     }
 
+    private _disableInvalidateRect = false;
     private _invalidatedRectangle: Nullable<Measure> = null;
     public invalidateRect(minX: number, minY: number, maxX: number, maxY: number) {
+        if (this._disableInvalidateRect) {
+            return;
+        }
         if (!this._invalidatedRectangle) {
             this._invalidatedRectangle = new Measure(minX, minY, maxX - minX, maxY - minY);
         }else {