void OnDrawGizmos() { if (this.editorSettings) { this.editorSettings = false; this.cachedTransform = this.transform; this.rectTransform = this.GetComponent <RectTransform>(); this.spriteRenderer = this.GetComponent <SpriteRenderer>(); this.optionalCollider = this.GetComponent <BoxCollider2D>(); } if (this.editorUpdate) { this.editorUpdate = false; this.UpdateResize(); UnityExtension.RepaintAllViews(); } }