瀏覽代碼

safety disable

Trevor Baron 6 年之前
父節點
當前提交
fe6fd884f2
共有 1 個文件被更改,包括 4 次插入0 次删除
  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 {