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

Method OnEnable

Source/Engine/Terrain/Terrain.cpp:863–880  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

861}
862
863void Terrain::OnEnable()
864{
865 GetScene()->Navigation.Actors.Add(this);
866 GetSceneRendering()->AddActor(this, _sceneRenderingKey);
867#if TERRAIN_USE_PHYSICS_DEBUG
868 GetSceneRendering()->AddPhysicsDebug(this);
869#endif
870 void* scene = GetPhysicsScene()->GetPhysicsScene();
871 for (int32 i = 0; i < _patches.Count(); i++)
872 {
873 auto patch = _patches[i];
874 if (patch->_physicsActor)
875 PhysicsBackend::AddSceneActor(scene, patch->_physicsActor);
876 }
877
878 // Base
879 Actor::OnEnable();
880}
881
882void Terrain::OnDisable()
883{

Callers

nothing calls this directly

Calls 7

GetSceneFunction · 0.85
GetPhysicsSceneFunction · 0.85
OnEnableFunction · 0.85
GetPhysicsSceneMethod · 0.80
AddMethod · 0.45
AddActorMethod · 0.45
CountMethod · 0.45

Tested by

no test coverage detected