diff --git a/Editor/ScriptWindow.cpp b/Editor/ScriptWindow.cpp index 325845a72..47867e96d 100644 --- a/Editor/ScriptWindow.cpp +++ b/Editor/ScriptWindow.cpp @@ -20,7 +20,7 @@ void ScriptWindow::Create(EditorComponent* _editor) editor->RecordEntity(archive, entity); editor->optionsWnd.RefreshEntityTree(); - }); + }); float hei = 20; float wid = 100; @@ -96,9 +96,6 @@ void ScriptWindow::Create(EditorComponent* _editor) void ScriptWindow::SetEntity(wi::ecs::Entity entity) { - if (this->entity == entity) - return; - this->entity = entity; wi::scene::Scene& scene = editor->GetCurrentScene(); @@ -116,6 +113,10 @@ void ScriptWindow::SetEntity(wi::ecs::Entity entity) } playonceCheckBox.SetCheck(script->IsPlayingOnlyOnce()); } + else + { + fileButton.SetText("Open File..."); + } } void ScriptWindow::Update(const wi::Canvas& canvas, float dt)