Ref<Texture2D>texture=Texture2D::Create(texturePath.string());if(texture->IsLoaded())component.Texture=texture;elseHZ_WARN("Could not load texture {0}",texturePath.filename().string());
voidEditorLayer::OpenScene(conststd::filesystem::path&path){if(path.extension().string()!=".crydust"){DEBUG_WARN("Could not load {0} - not a scene file",path.filename().string());return;}Ref<Scene>newScene=CreateRef<Scene>();SceneSerializerserializer(newScene);if(serializer.Deserialize(path.string())){m_ActiveScene=newScene;m_ActiveScene->OnViewportResize((uint32_t)m_ViewportSize.x,(uint32_t)m_ViewportSize.y);m_SceneHierarchyPanel.SetContext(m_ActiveScene);};}