Code review changes
This commit is contained in:
@@ -22,7 +22,6 @@
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Scripting/Script.h"
|
||||
#include "Engine/Engine/Time.h"
|
||||
#include "Engine/Physics/Physics.h"
|
||||
#include "Engine/Scripting/ManagedCLR/MAssembly.h"
|
||||
#include "Engine/Scripting/ManagedCLR/MClass.h"
|
||||
#include "Engine/Scripting/ManagedCLR/MDomain.h"
|
||||
@@ -779,8 +778,6 @@ bool LevelImpl::unloadScene(Scene* scene)
|
||||
// Force flush deleted objects so we actually delete unloaded scene objects (prevent from reloading their managed objects, etc.)
|
||||
ObjectsRemovalService::Flush();
|
||||
|
||||
Physics::EndPlay();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1031,8 +1028,6 @@ bool Level::loadScene(rapidjson_flax::Value& data, int32 engineBuild, Scene** ou
|
||||
{
|
||||
PROFILE_CPU_NAMED("BeginPlay");
|
||||
|
||||
Physics::BeginPlay();
|
||||
|
||||
ScopeLock lock(ScenesLock);
|
||||
Scenes.Add(scene);
|
||||
SceneBeginData beginData;
|
||||
|
||||
@@ -324,7 +324,6 @@ bool PhysicsService::Init()
|
||||
#endif
|
||||
|
||||
Physics::DefaultScene = Physics::FindOrCreateScene(TEXT("Default"));
|
||||
Physics::Scenes.Add(Physics::DefaultScene);
|
||||
|
||||
// Create default resources
|
||||
DefaultMaterial = CPhysX->createMaterial(0.7f, 0.7f, 0.3f);
|
||||
@@ -533,14 +532,3 @@ PhysicsScene* Physics::FindScene(const String& name)
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void Physics::BeginPlay()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
|
||||
void Physics::EndPlay()
|
||||
{
|
||||
reset();
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Engine/Core/Collections/Array.h"
|
||||
#include "Engine/Core/Math/Vector2.h"
|
||||
#include "Engine/Core/Math/Vector3.h"
|
||||
#include "Engine/Core/Math/Quaternion.h"
|
||||
@@ -111,7 +110,7 @@ public:
|
||||
/// List with all physics scenes (readonly).
|
||||
/// </summary>
|
||||
API_FIELD(ReadOnly)
|
||||
static Array<PhysicsScene*> Scenes;
|
||||
static Array<PhysicsScene*, HeapAllocation> Scenes;
|
||||
|
||||
/// <summary>
|
||||
/// Finds an existing <see cref="PhysicsScene"/> or creates it if it does not exist.
|
||||
@@ -590,8 +589,4 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="joint">The joint.</param>
|
||||
static void RemoveJoint(Joint* joint);
|
||||
|
||||
public:
|
||||
static void BeginPlay();
|
||||
static void EndPlay();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user