Merge remote-tracking branch 'origin/master' into 1.2

This commit is contained in:
Wojtek Figat
2021-03-30 17:58:29 +02:00
38 changed files with 303 additions and 109 deletions

View File

@@ -282,7 +282,13 @@ namespace FlaxEditor.SceneGraph.Actors
{
// Remove unused points
while (srcCount > dstCount)
ActorChildNodes[srcCount-- - 1].Dispose();
{
var node = ActorChildNodes[srcCount-- - 1];
// TODO: support selection interface inside SceneGraph nodes (eg. on Root) so prefab editor can handle this too
if (Editor.Instance.SceneEditing.Selection.Contains(node))
Editor.Instance.SceneEditing.Deselect();
node.Dispose();
}
// Add new points
var id = ID;

View File

@@ -8,6 +8,9 @@
#include "Editor/Scripting/ScriptsBuilder.h"
#include "Engine/Engine/Globals.h"
#include "Engine/Platform/Win32/IncludeWindowsHeaders.h"
#if PLATFORM_LINUX
#include <stdio.h>
#endif
VisualStudioCodeEditor::VisualStudioCodeEditor(const String& execPath, const bool isInsiders)
: _execPath(execPath)

View File

@@ -341,7 +341,21 @@ void ScriptsBuilder::GetBinariesConfiguration(const Char*& target, const Char*&
target = platform = architecture = configuration = nullptr;
return;
}
target = Editor::Project->EditorTarget.GetText();
// Pick game target
if (Editor::Project->EditorTarget.HasChars())
{
target = Editor::Project->EditorTarget.Get();
}
else if (Editor::Project->GameTarget.HasChars())
{
target = Editor::Project->GameTarget.Get();
}
else
{
target = TEXT("");
LOG(Error, "Missing editor/game targets in project. Please specify EditorTarget and GameTarget properties in .flaxproj file.");
}
#if PLATFORM_WINDOWS
platform = TEXT("Windows");
@@ -551,19 +565,13 @@ bool ScriptsBuilderService::Init()
}
// Verify project
if (project->EditorTarget.IsEmpty() || project->GameTarget.IsEmpty())
if (project->EditorTarget.IsEmpty())
{
const String& name = project->Name;
String codeName;
for (int32 i = 0; i < name.Length(); i++)
{
Char c = name[i];
if (StringUtils::IsAlnum(c) && c != ' ' && c != '.')
codeName += c;
}
project->GameTarget = codeName + TEXT("Target");
project->EditorTarget = codeName + TEXT("EditorTarget");
LOG(Warning, "Missing EditorTarget property in opened project, using deducted target name {0}", Editor::Project->EditorTarget);
LOG(Warning, "Missing {0} property in opened project", TEXT("EditorTarget"));
}
if (project->GameTarget.IsEmpty())
{
LOG(Warning, "Missing {0} property in opened project", TEXT("GameTarget"));
}
// Remove any remaining files from previous Editor run hot-reloads

View File

@@ -1,7 +1,6 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
using FlaxEditor.Gizmo;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Input;
using FlaxEditor.Options;