default mesh collider are generated by default mesh, add camera info serialization, using error info instead of assert to process missing filepath when deserializing scene, move cullface into internal renderer api, fixed dynamic vertex buffer bug
This commit is contained in:
@ -171,7 +171,8 @@ namespace Prism
|
||||
m_SceneHierarchyPanel->SetEntityDeletedCallback(std::bind(&EditorLayer::OnEntityDeleted, this, std::placeholders::_1));
|
||||
UpdateWindowTitle("untitled Scene");
|
||||
|
||||
OpenScene("assets/scenes/FPSDemo.scene");
|
||||
// OpenScene("assets/scenes/FPSDemo.scene");
|
||||
NewScene();
|
||||
}
|
||||
|
||||
void EditorLayer::OnDetach()
|
||||
@ -1128,15 +1129,15 @@ namespace Prism
|
||||
|
||||
void EditorLayer::SaveSceneAs()
|
||||
{
|
||||
auto& app = Application::Get();
|
||||
std::string filepath = app.SaveFile("Prism Scene (*.hsc)\0*.hsc\0");
|
||||
const auto& app = Application::Get();
|
||||
const std::string filepath = app.SaveFile("Prism Scene (*.hsc)\0*.hsc\0");
|
||||
if (!filepath.empty())
|
||||
{
|
||||
PM_CLIENT_INFO("Saving scene to: {0}", m_SceneFilePath);
|
||||
SceneSerializer serializer(m_EditorScene);
|
||||
serializer.Serialize(filepath);
|
||||
|
||||
std::filesystem::path path = filepath;
|
||||
const std::filesystem::path path = filepath;
|
||||
UpdateWindowTitle(path.filename().string());
|
||||
m_SceneFilePath = filepath;
|
||||
}else
|
||||
@ -1174,13 +1175,14 @@ namespace Prism
|
||||
m_SceneHierarchyPanel->SetContext(m_EditorScene);
|
||||
}
|
||||
|
||||
float EditorLayer::GetSnapValue()
|
||||
float EditorLayer::GetSnapValue() const
|
||||
{
|
||||
switch (m_GizmoType)
|
||||
{
|
||||
case ImGuizmo::OPERATION::TRANSLATE: return 0.5f;
|
||||
case ImGuizmo::OPERATION::ROTATE: return 45.0f;
|
||||
case ImGuizmo::OPERATION::SCALE: return 0.5f;
|
||||
default: break;
|
||||
}
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ namespace Prism
|
||||
void OnScenePlay();
|
||||
void OnSceneStop();
|
||||
|
||||
float GetSnapValue();
|
||||
float GetSnapValue() const;
|
||||
private:
|
||||
Scope<SceneHierarchyPanel> m_SceneHierarchyPanel;
|
||||
|
||||
|
||||
@ -18,13 +18,13 @@ Entities:
|
||||
StoredFields:
|
||||
- Name: WalkingSpeed
|
||||
Type: 1
|
||||
Data: 20
|
||||
Data: 4
|
||||
- Name: RunSpeed
|
||||
Type: 1
|
||||
Data: 50
|
||||
Data: 10
|
||||
- Name: JumpForce
|
||||
Type: 1
|
||||
Data: 50
|
||||
Data: 1
|
||||
- Name: MouseSensitivity
|
||||
Type: 1
|
||||
Data: 10
|
||||
@ -147,7 +147,14 @@ Entities:
|
||||
Rotation: [0, 0, 0]
|
||||
Scale: [1, 1, 1]
|
||||
CameraComponent:
|
||||
Camera: some camera data...
|
||||
Camera:
|
||||
ProjectionType: 0
|
||||
PerspectiveFOV: 65
|
||||
PerspectiveNear: 0.100000001
|
||||
PerspectiveFar: 1000
|
||||
OrthographicSize: 10
|
||||
OrthographicNear: -1
|
||||
OrthographicFar: 1
|
||||
Primary: true
|
||||
- Entity: 18306113171518048249
|
||||
TagComponent:
|
||||
@ -186,7 +193,7 @@ Entities:
|
||||
Rotation: [0, 0, 0]
|
||||
Scale: [1, 1, 1]
|
||||
SkyLightComponent:
|
||||
EnvironmentAssetPath: assets\env\birchwood_4k.hdr
|
||||
EnvironmentAssetPath: assets/env/birchwood_4k.hdr
|
||||
Intensity: 1
|
||||
Angle: 0
|
||||
PhysicsLayers:
|
||||
|
||||
Reference in New Issue
Block a user