void OnDisable() { if (handler != null) { NavmeshClipper.RemoveEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback); forcedReloadRects.Clear(); handler.graph.OnRecalculatedTiles -= OnRecalculatedTiles; } }
// Token: 0x060026A7 RID: 9895 RVA: 0x001A8E50 File Offset: 0x001A7050 private void OnDisable() { if (this.handler != null) { NavmeshClipper.RemoveEnableCallback(new Action <NavmeshClipper>(this.HandleOnEnableCallback), new Action <NavmeshClipper>(this.HandleOnDisableCallback)); this.forcedReloadRects.Clear(); NavmeshBase graph = this.handler.graph; graph.OnRecalculatedTiles = (Action <NavmeshTile[]>)Delegate.Remove(graph.OnRecalculatedTiles, new Action <NavmeshTile[]>(this.OnRecalculatedTiles)); } }
// Token: 0x060026A5 RID: 9893 RVA: 0x001A8D18 File Offset: 0x001A6F18 public void UseSpecifiedHandler(TileHandler newHandler) { if (!base.enabled) { throw new InvalidOperationException("TileHandlerHelper is disabled"); } if (this.handler != null) { NavmeshClipper.RemoveEnableCallback(new Action <NavmeshClipper>(this.HandleOnEnableCallback), new Action <NavmeshClipper>(this.HandleOnDisableCallback)); NavmeshBase graph = this.handler.graph; graph.OnRecalculatedTiles = (Action <NavmeshTile[]>)Delegate.Remove(graph.OnRecalculatedTiles, new Action <NavmeshTile[]>(this.OnRecalculatedTiles)); } this.handler = newHandler; if (this.handler != null) { NavmeshClipper.AddEnableCallback(new Action <NavmeshClipper>(this.HandleOnEnableCallback), new Action <NavmeshClipper>(this.HandleOnDisableCallback)); NavmeshBase graph2 = this.handler.graph; graph2.OnRecalculatedTiles = (Action <NavmeshTile[]>)Delegate.Combine(graph2.OnRecalculatedTiles, new Action <NavmeshTile[]>(this.OnRecalculatedTiles)); } }
/** Use the specified handler, will create one at start if not called */ public void UseSpecifiedHandler(TileHandler newHandler) { if (!enabled) { throw new System.InvalidOperationException("TileHandlerHelper is disabled"); } if (handler != null) { NavmeshClipper.RemoveEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback); handler.graph.OnRecalculatedTiles -= OnRecalculatedTiles; } handler = newHandler; if (handler != null) { NavmeshClipper.AddEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback); handler.graph.OnRecalculatedTiles += OnRecalculatedTiles; } }
internal void OnDisable() { NavmeshClipper.RemoveEnableCallback(HandleOnEnableCallback, HandleOnDisableCallback); }