diff --git a/src/layaAir/laya/navigation/common/component/BaseNavMeshSurface.ts b/src/layaAir/laya/navigation/common/component/BaseNavMeshSurface.ts index b0949524dc..48d88d5aa2 100644 --- a/src/layaAir/laya/navigation/common/component/BaseNavMeshSurface.ts +++ b/src/layaAir/laya/navigation/common/component/BaseNavMeshSurface.ts @@ -1,5 +1,3 @@ - - import { Component } from "../../../components/Component"; import { Vector3 } from "../../../maths/Vector3"; import { NavTileData } from "../NavTileData"; @@ -440,6 +438,7 @@ export class BaseNavMeshSurface extends Component { bindDatas.forEach((value: any) => { NavigationUtils._freeLayaData(value); }); + this._cachedata._titleIndex.clear(); this._cachedata._cacheData = []; } diff --git a/src/samples/view/IndexView2D.ts b/src/samples/view/IndexView2D.ts index 1fd8ccdd56..75cc0f9d0c 100644 --- a/src/samples/view/IndexView2D.ts +++ b/src/samples/view/IndexView2D.ts @@ -134,6 +134,7 @@ import { Mesh2DRenderDemo } from "../2d/Mesh2DRenderDemo"; import { Trail2DRenderDemo } from "../2d/Trail2DRenderDemo"; import { TileMapLayerDemo } from "../2d/TileMapLayerDemo"; import { RenderCMD2DDemo } from "../2d/RenderCMD2DDemo"; +import { Material2DDemo } from "../2d/Material2DDemo"; /** * 首页View @@ -261,8 +262,8 @@ export class IndexView2D extends IndexViewUI { /************************HitTest-end***************************/ /************************Render2D-start***************************/ - private _render2DTestClsArr: any[] = [Camera2DDemo, Light2DDemo, Line2DRenderDemo, Mesh2DRenderDemo, Trail2DRenderDemo, TileMapLayerDemo, RenderCMD2DDemo]; - private _render2DTestArr: any[] = ['2D相机', '2D灯光示例', '2D线段渲染器', '2D网格渲染器', '2D拖尾渲染器', '瓦块地图层级示例', '2D渲染命令示例']; + private _render2DTestClsArr: any[] = [Camera2DDemo, Material2DDemo, Light2DDemo, Line2DRenderDemo, Mesh2DRenderDemo, Trail2DRenderDemo, TileMapLayerDemo, RenderCMD2DDemo]; + private _render2DTestArr: any[] = ['2D相机', "2D自定义材质示例", '2D灯光示例', '2D线段渲染器', '2D网格渲染器', '2D拖尾渲染器', '瓦块地图层级示例', '2D渲染命令示例']; /************************Render2D-end***************************/ private _bigIndex: number = -1;