MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Apply

Method Apply

Source/Engine/Navigation/Navigation.cpp:215–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213IMPLEMENT_ENGINE_SETTINGS_GETTER(NavigationSettings, Navigation);
214
215void NavigationSettings::Apply()
216{
217 // Cache areas properties
218 for (auto& area : NavAreas)
219 {
220 if (area.Id < DT_MAX_AREAS)
221 {
222 NavMeshRuntime::NavAreasCosts[area.Id] = area.Cost;
223#if COMPILE_WITH_DEBUG_DRAW
224 NavMeshRuntime::NavAreasColors[area.Id] = area.Color;
225#endif
226 }
227 }
228
229#if USE_EDITOR
230 if (!Editor::IsPlayMode && Editor::Managed && Editor::Managed->CanAutoBuildNavMesh())
231 {
232 // Rebuild all navmeshs after apply changes on navigation
233 for (auto scene : Level::Scenes)
234 {
235 Navigation::BuildNavMesh(scene);
236 }
237 }
238#endif
239}
240
241#if USE_EDITOR
242

Callers

nothing calls this directly

Calls 2

BuildNavMeshFunction · 0.85
CanAutoBuildNavMeshMethod · 0.80

Tested by

no test coverage detected