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

# Conflicts:
#	Source/Engine/Navigation/NavMesh.cpp
#	Source/Engine/Navigation/NavMeshBuilder.cpp
This commit is contained in:
Wojtek Figat
2021-01-22 11:31:22 +01:00
178 changed files with 1163 additions and 864 deletions

View File

@@ -262,9 +262,9 @@ namespace FlaxEditor.Content.Import
public int BaseLOD { get; set; } = 0;
/// <summary>
/// The amount of LODs to include in the model (all reaming ones starting from Base LOD will be generated).
/// The amount of LODs to include in the model (all remaining ones starting from Base LOD will be generated).
/// </summary>
[EditorOrder(1120), DefaultValue(4), Limit(1, Model.MaxLODs), EditorDisplay("Level Of Detail", "LOD Count"), Tooltip("The amount of LODs to include in the model (all reaming ones starting from Base LOD will be generated).")]
[EditorOrder(1120), DefaultValue(4), Limit(1, Model.MaxLODs), EditorDisplay("Level Of Detail", "LOD Count"), Tooltip("The amount of LODs to include in the model (all remaining ones starting from Base LOD will be generated).")]
public int LODCount { get; set; } = 4;
/// <summary>

View File

@@ -146,7 +146,7 @@ bool AndroidPlatformTools::OnPostProcess(CookingData& data)
const auto c = packageName[i];
if (c != '_' && c != '.' && !StringUtils::IsAlnum(c))
{
LOG(Error, "Android Package Name \'{0}\' contains invalid chaarcter. Only letters, numbers, dots and underscore characters are allowed.", packageName);
LOG(Error, "Android Package Name \'{0}\' contains invalid character. Only letters, numbers, dots and underscore characters are allowed.", packageName);
return true;
}
}

View File

@@ -28,7 +28,7 @@ bool UWPPlatformTools::OnScriptsStepDone(CookingData& data)
const String assembliesPath = data.OutputPath;
if (FileSystem::CopyFile(assembliesPath / TEXT("Newtonsoft.Json.dll"), customBinPath))
{
data.Error(TEXT("Failed to copy deloy custom assembly."));
data.Error(TEXT("Failed to copy deploy custom assembly."));
return true;
}
FileSystem::DeleteFile(assembliesPath / TEXT("Newtonsoft.Json.pdb"));

View File

@@ -48,7 +48,7 @@ public:
/// <summary>
/// Gets the value indicating whenever platform requires AOT.
/// </summary>
/// <returns>True if platform uses AOT and needs C# assemblies to be be precompiled, otherwise false.</returns>
/// <returns>True if platform uses AOT and needs C# assemblies to be precompiled, otherwise false.</returns>
virtual bool UseAOT() const
{
return false;

View File

@@ -65,7 +65,7 @@ bool ValidateStep::Perform(CookingData& data)
AssetInfo info;
if (!Content::GetAssetInfo(gameSettings->FirstScene, info))
{
data.Error(TEXT("Missing first scene."));
data.Error(TEXT("Missing first scene. Set it in the game settings."));
return true;
}
}

View File

@@ -43,7 +43,7 @@ public:
public:
/// <summary>
/// The flag used to determine if a project was used with the older engine version last time it was opened. Some cached data should be regenerated to prevent version difference issues. The version number comparision is based on major and minor part of the version. Build number is ignored.
/// The flag used to determine if a project was used with the older engine version last time it was opened. Some cached data should be regenerated to prevent version difference issues. The version number comparison is based on major and minor part of the version. Build number is ignored.
/// </summary>
static bool IsOldProjectOpened;

View File

@@ -222,7 +222,7 @@ namespace FlaxEditor.GUI
}
/// <summary>
/// Filters teh given value using the the <see cref="UseMode"/>.
/// Filters the given value using the <see cref="UseMode"/>.
/// </summary>
/// <param name="mode">The mode.</param>
/// <param name="value">The value to process.</param>

View File

@@ -186,7 +186,7 @@ namespace FlaxEditor.GUI.Dialogs
// Clean up
_window = null;
// Check if any thead is blocked during ShowDialog, then wait for it
// Check if any thread is blocked during ShowDialog, then wait for it
bool wait = true;
while (wait)
{

View File

@@ -64,7 +64,7 @@ namespace FlaxEditor.GUI.Docking
for (int i = 0; i < childPanels.Length; i++)
childPanels[i].Dispose();
// Delete reaming controls (except tabs proxy)
// Delete remaining controls (except tabs proxy)
if (TabsProxy != null)
TabsProxy.Parent = null;
DisposeChildren();

View File

@@ -168,6 +168,7 @@ namespace FlaxEditor.GUI.Input
{
if (button == MouseButton.Left)
{
Focus();
float mousePosition = location.X;
if (_thumbRect.Contains(ref location))
@@ -208,7 +209,6 @@ namespace FlaxEditor.GUI.Input
{
if (button == MouseButton.Left && _isSliding)
{
// End sliding
EndSliding();
return true;
}

View File

@@ -120,7 +120,7 @@ namespace FlaxEditor.GUI
/// <summary>
/// Draws the column.
/// </summary>
/// <param name="rect">The the header area rectangle.</param>
/// <param name="rect">The header area rectangle.</param>
/// <param name="columnIndex">The zero-based index of the column.</param>
protected virtual void DrawColumn(ref Rectangle rect, int columnIndex)
{

View File

@@ -402,7 +402,7 @@ namespace FlaxEditor.GUI
}
/// <summary>
/// Converts the input point from editor editor contents control space into the keyframes time/value coordinates.
/// Converts the input point from editor contents control space into the keyframes time/value coordinates.
/// </summary>
/// <param name="point">The point.</param>
/// <param name="keyframesContentAreaBounds">The keyframes contents area bounds.</param>

View File

@@ -179,7 +179,7 @@ namespace FlaxEditor.GUI.Timeline.Tracks
}
/// <summary>
/// Evaluates the member value value at the specified time.
/// Evaluates the member value at the specified time.
/// </summary>
/// <param name="time">The time to evaluate the member at.</param>
/// <returns>The member value at provided time.</returns>

View File

@@ -7,7 +7,7 @@ using FlaxEngine;
namespace FlaxEditor.Gizmo
{
/// <summary>
/// Represents collection of Gizmo tools where one is active and in use.
/// Represents collection of gizmo tools where one is active and in use.
/// </summary>
/// <seealso cref="GizmoBase" />
[HideInEditor]

View File

@@ -45,7 +45,7 @@ namespace FlaxEditor.Gizmo
)
{
// Error
Platform.Fatal("Failed to load Transform Gizmo resources.");
Platform.Fatal("Failed to load transform gizmo resources.");
}
}

View File

@@ -104,7 +104,7 @@ namespace FlaxEditor.Gizmo
public Axis ActiveAxis => _activeAxis;
/// <summary>
/// Gets or sts the current gizmo mode.
/// Gets or sets the current gizmo mode.
/// </summary>
public Mode ActiveMode
{

View File

@@ -151,7 +151,7 @@ namespace FlaxEditor.Gizmo
// Set positions of the gizmo
UpdateGizmoPosition();
// Scale Gizmo to fit on-screen
// Scale gizmo to fit on-screen
Vector3 vLength = Owner.ViewPosition - Position;
float gizmoSize = Editor.Instance.Options.Options.Visual.GizmoSize;
_screenScale = vLength.Length / GizmoScaleFactor * gizmoSize;
@@ -318,7 +318,7 @@ namespace FlaxEditor.Gizmo
}
else if (_activeMode == Mode.Scale)
{
// Apply Scale
// Apply scale
_scaleDelta = delta;
}
}

View File

@@ -74,7 +74,7 @@ namespace FlaxEditor.History
_reverseActions.PushBack(reverse[i]);
}
// Cleanup reaming actions
// Cleanup remaining actions
for (int i = _historyActionsLimit; i < history.Length; i++)
{
history[i].Dispose();

View File

@@ -108,7 +108,7 @@ namespace FlaxEditor.Modules
/// <summary>
/// Removes a quick action by name.
/// </summary>
/// <param name="name">Thr action's name.</param>
/// <param name="name">The action's name.</param>
/// <returns>True when it succeed, false if there is no Quick Action with this name.</returns>
public bool RemoveQuickAction(string name)
{

View File

@@ -410,7 +410,7 @@ namespace FlaxEditor.Modules
{
if (request.Settings != null && entry.TryOverrideSettings(request.Settings))
{
// Use overriden settings
// Use overridden settings
}
else if (!request.SkipSettingsDialog)
{

View File

@@ -276,8 +276,8 @@ namespace FlaxEditor.Modules
// Get metadata
int version = int.Parse(root.Attributes["Version"].Value, CultureInfo.InvariantCulture);
var virtualDesktopBounds = Platform.VirtualDesktopBounds;
var virtualDesktopSafeLeftCorner = virtualDesktopBounds.Location + new Vector2(0, 23); // 23 is a window strip size
var virtualDesktopSafeRightCorner = virtualDesktopBounds.BottomRight - new Vector2(50, 50); // apply some safe area
var virtualDesktopSafeLeftCorner = virtualDesktopBounds.Location;
var virtualDesktopSafeRightCorner = virtualDesktopBounds.BottomRight;
switch (version)
{
@@ -971,7 +971,7 @@ namespace FlaxEditor.Modules
}
#region Window Events
private void OnEditorStateChanged()
{
for (int i = 0; i < Windows.Count; i++)

View File

@@ -41,7 +41,7 @@ namespace FlaxEditor.Options
private readonly Dictionary<string, CreateCustomSettingsDelegate> _customSettings = new Dictionary<string, CreateCustomSettingsDelegate>();
/// <summary>
/// Gets the custom settings factories. Each entry defines the custom settings type identified by teh given key name. The value si a factory function that returns the default options fpr a given type.
/// Gets the custom settings factories. Each entry defines the custom settings type identified by the given key name. The value is a factory function that returns the default options for a given type.
/// </summary>
public IReadOnlyDictionary<string, CreateCustomSettingsDelegate> CustomSettings => _customSettings;

View File

@@ -80,7 +80,7 @@ namespace FlaxEditor.Progress
}
/// <summary>
/// Called when progress action gets updated (changed nfo text or progress value).
/// Called when progress action gets updated (changed info text or progress value).
/// </summary>
/// <param name="progress">The progress (normalized to range [0;1]).</param>
/// <param name="infoText">The information text.</param>

View File

@@ -204,7 +204,7 @@ bool ProjectInfo::LoadProject(const String& projectPath)
reference.Project = Load(referencePath);
if (reference.Project == nullptr)
{
LOG(Error, "Faield to load referenced project ({0}, from {1})", reference.Name, referencePath);
LOG(Error, "Failed to load referenced project ({0}, from {1})", reference.Name, referencePath);
return true;
}
}
@@ -277,7 +277,7 @@ bool ProjectInfo::LoadOldProject(const String& projectPath)
flaxReference.Project = Load(Globals::StartupFolder / TEXT("Flax.flaxproj"));
if (!flaxReference.Project)
{
ShowProjectLoadError(TEXT("Failed to load Flax Engien project."), projectPath);
ShowProjectLoadError(TEXT("Failed to load Flax Engine project."), projectPath);
return true;
}

View File

@@ -49,7 +49,7 @@ public:
{
if (dwRejectType == SERVERCALL_RETRYLATER)
{
// Retry immediatey
// Retry immediately
return 99;
}

View File

@@ -567,7 +567,7 @@ bool ScriptsBuilderService::Init()
LOG(Warning, "Missing EditorTarget property in opened project, using deducted target name {0}", Editor::Project->EditorTarget);
}
// Remove any reaming files from previous Editor run hot-reloads
// Remove any remaining files from previous Editor run hot-reloads
const Char *target, *platform, *architecture, *configuration;
ScriptsBuilder::GetBinariesConfiguration(target, platform, architecture, configuration);
if (target)

View File

@@ -65,8 +65,8 @@ namespace FlaxEditor.Surface
NodeElementArchetype.Factory.Output(0, "Length", typeof(float), 0),
NodeElementArchetype.Factory.Output(1, "Time", typeof(float), 1),
NodeElementArchetype.Factory.Output(2, "Normalized Time", typeof(float), 2),
NodeElementArchetype.Factory.Output(3, "Reaming Time", typeof(float), 3),
NodeElementArchetype.Factory.Output(4, "Reaming Normalized Time", typeof(float), 4),
NodeElementArchetype.Factory.Output(3, "Remaining Time", typeof(float), 3),
NodeElementArchetype.Factory.Output(4, "Remaining Normalized Time", typeof(float), 4),
}
},
}

View File

@@ -1046,7 +1046,7 @@ namespace FlaxEditor.Surface.Archetypes
startPos += nrm;
endPos += nrm;
// Swap fo the other arrow
// Swap to the other arrow
if (!diff)
{
var tmp = startPos;

View File

@@ -764,8 +764,8 @@ namespace FlaxEditor.Surface.Archetypes
NodeElementArchetype.Factory.Output(0, "Length", typeof(float), 0),
NodeElementArchetype.Factory.Output(1, "Time", typeof(float), 1),
NodeElementArchetype.Factory.Output(2, "Normalized Time", typeof(float), 2),
NodeElementArchetype.Factory.Output(3, "Reaming Time", typeof(float), 3),
NodeElementArchetype.Factory.Output(4, "Reaming Normalized Time", typeof(float), 4),
NodeElementArchetype.Factory.Output(3, "Remaining Time", typeof(float), 3),
NodeElementArchetype.Factory.Output(4, "Remaining Normalized Time", typeof(float), 4),
}
},
new NodeArchetype

View File

@@ -1177,7 +1177,7 @@ namespace FlaxEditor.Surface.Archetypes
[EditorOrder(0), Tooltip("The name of the parameter."), ExpandGroups]
public string Name;
[EditorOrder(1), Tooltip("The type fo the parameter value.")]
[EditorOrder(1), Tooltip("The type for the parameter value.")]
[TypeReference(typeof(object), nameof(IsTypeValid))]
public ScriptType Type;
@@ -1564,7 +1564,7 @@ namespace FlaxEditor.Surface.Archetypes
// Check if return type has been changed
if (_signature.ReturnType != prevReturnType)
{
// Update all return nodes used by this function to match teh new type
// Update all return nodes used by this function to match the new type
var usedNodes = DepthFirstTraversal(false);
var hasAnyReturnNode = false;
foreach (var node in usedNodes)

View File

@@ -32,7 +32,7 @@ namespace FlaxEditor.Surface.Archetypes
public Dictionary<Type, NodeElementArchetype[]> Prototypes = DefaultPrototypes;
/// <summary>
/// The default prototypes for thr node elements to use for the given parameter type.
/// The default prototypes for the node elements to use for the given parameter type.
/// </summary>
public static readonly Dictionary<Type, NodeElementArchetype[]> DefaultPrototypes = new Dictionary<Type, NodeElementArchetype[]>
{

View File

@@ -107,7 +107,7 @@ namespace FlaxEditor.Surface
/// Validates the parameter drag operation.
/// </summary>
/// <param name="parameterName">Name of the parameter.</param>
/// <returns>Tre if can drag that parameter, otherwise false.</returns>
/// <returns>True if can drag that parameter, otherwise false.</returns>
protected virtual bool ValidateDragParameter(string parameterName)
{
return GetParameter(parameterName) != null;

View File

@@ -76,7 +76,7 @@ namespace FlaxEditor.Surface
// Check if has cached groups
if (_cache.Count != 0)
{
// Check if context menu doesn;t have the recent cached groups
// Check if context menu doesn't have the recent cached groups
if (!contextMenu.Groups.Any(g => g.Archetype.Tag is int asInt && asInt == _version))
{
var groups = contextMenu.Groups.Where(g => g.Archetype.Tag is int).ToArray();

View File

@@ -21,6 +21,7 @@ namespace FlaxEditor.Tools.Foliage
private readonly Tabs _modes;
private readonly ContainerControl _noFoliagePanel;
private int _selectedFoliageTypeIndex = -1;
private Button _createNewFoliage;
/// <summary>
/// The editor instance.
@@ -99,6 +100,7 @@ namespace FlaxEditor.Tools.Foliage
public FoliageTab(SpriteHandle icon, Editor editor)
: base(string.Empty, icon)
{
Level.SceneLoaded += OnSceneLoaded;
Editor = editor;
Editor.SceneEditing.SelectionChanged += OnSelectionChanged;
@@ -135,14 +137,31 @@ namespace FlaxEditor.Tools.Foliage
Offsets = Margin.Zero,
Parent = _noFoliagePanel
};
var noFoliageButton = new Button
_createNewFoliage = new Button
{
Text = "Create new foliage",
AnchorPreset = AnchorPresets.MiddleCenter,
Offsets = new Margin(-60, 120, -12, 24),
Parent = _noFoliagePanel,
Enabled = false
};
noFoliageButton.Clicked += OnCreateNewFoliageClicked;
_createNewFoliage.Clicked += OnCreateNewFoliageClicked;
}
private void OnSceneLoaded(Scene arg1, Guid arg2)
{
_createNewFoliage.Enabled = true;
Level.SceneUnloaded += OnSceneUnloaded;
Level.SceneLoaded -= OnSceneLoaded;
}
private void OnSceneUnloaded(Scene arg1, Guid arg2)
{
_createNewFoliage.Enabled = false;
Level.SceneLoaded += OnSceneLoaded;
Level.SceneUnloaded -= OnSceneUnloaded;
}
private void OnSelected(Tab tab)
@@ -248,5 +267,16 @@ namespace FlaxEditor.Tools.Foliage
{
SelectedFoliageTypesChanged?.Invoke();
}
/// <inheritdoc />
public override void OnDestroy()
{
if (_createNewFoliage.Enabled)
Level.SceneUnloaded -= OnSceneUnloaded;
else
Level.SceneLoaded -= OnSceneLoaded;
base.OnDestroy();
}
}
}

View File

@@ -18,6 +18,7 @@ namespace FlaxEditor.Tools.Terrain
{
private readonly Tabs _modes;
private readonly ContainerControl _noTerrainPanel;
private readonly Button _createTerrainButton;
/// <summary>
/// The editor instance.
@@ -57,6 +58,7 @@ namespace FlaxEditor.Tools.Terrain
public CarveTab(SpriteHandle icon, Editor editor)
: base(string.Empty, icon)
{
Level.SceneLoaded += OnSceneLoaded;
Editor = editor;
Editor.SceneEditing.SelectionChanged += OnSelectionChanged;
@@ -93,14 +95,31 @@ namespace FlaxEditor.Tools.Terrain
Offsets = Margin.Zero,
Parent = _noTerrainPanel
};
var noTerrainButton = new Button
_createTerrainButton = new Button
{
Text = "Create new terrain",
AnchorPreset = AnchorPresets.MiddleCenter,
Offsets = new Margin(-60, 120, -12, 24),
Parent = _noTerrainPanel
Parent = _noTerrainPanel,
Enabled = false
};
noTerrainButton.Clicked += OnCreateNewTerrainClicked;
_createTerrainButton.Clicked += OnCreateNewTerrainClicked;
}
private void OnSceneLoaded(Scene arg1, Guid arg2)
{
_createTerrainButton.Enabled = true;
Level.SceneUnloaded += OnSceneUnloaded;
Level.SceneLoaded -= OnSceneLoaded;
}
private void OnSceneUnloaded(Scene arg1, Guid arg2)
{
_createTerrainButton.Enabled = false;
Level.SceneLoaded += OnSceneLoaded;
Level.SceneUnloaded -= OnSceneUnloaded;
}
private void OnSelected(Tab tab)
@@ -183,5 +202,16 @@ namespace FlaxEditor.Tools.Terrain
default: throw new IndexOutOfRangeException("Invalid carve tab mode.");
}
}
/// <inheritdoc />
public override void OnDestroy()
{
if (_createTerrainButton.Enabled)
Level.SceneUnloaded -= OnSceneUnloaded;
else
Level.SceneLoaded -= OnSceneLoaded;
base.OnDestroy();
}
}
}

View File

@@ -33,7 +33,7 @@ namespace FlaxEditor.Tools.Terrain.Paint
}
/// <summary>
/// The tool strength (normalized to range 0-1). Defines the intensity of the paint operation to make it stronger or mre subtle.
/// The tool strength (normalized to range 0-1). Defines the intensity of the paint operation to make it stronger or more subtle.
/// </summary>
[EditorOrder(0), Limit(0, 10, 0.01f), Tooltip("The tool strength (normalized to range 0-1). Defines the intensity of the paint operation to make it stronger or more subtle.")]
public float Strength = 1.0f;

View File

@@ -33,7 +33,7 @@ namespace FlaxEditor.Tools.Terrain.Sculpt
}
/// <summary>
/// The tool strength (normalized to range 0-1). Defines the intensity of the sculpt operation to make it stronger or mre subtle.
/// The tool strength (normalized to range 0-1). Defines the intensity of the sculpt operation to make it stronger or more subtle.
/// </summary>
[EditorOrder(0), Limit(0, 6, 0.01f), Tooltip("The tool strength (normalized to range 0-1). Defines the intensity of the sculpt operation to make it stronger or more subtle.")]
public float Strength = 1.2f;

View File

@@ -2,7 +2,7 @@
#include "TerrainTools.h"
#include "Engine/Core/Cache.h"
#include "Engine/Core/Math/VectorInt.h"
#include "Engine/Core/Math/Int2.h"
#include "Engine/Core/Math/Color32.h"
#include "Engine/Core/Collections/CollectionPoolCache.h"
#include "Engine/Terrain/TerrainPatch.h"

View File

@@ -49,7 +49,7 @@ namespace FlaxEditor.Tools
set => Tab._gizmoMode.BrushStrength = value;
}
[EditorOrder(20), EditorDisplay("Brush"), Limit(0.0f, 1.0f, 0.01f), Tooltip("The falloff parameter fo the brush. Adjusts the paint strength for the vertices that are far from the brush center. Use lower values to make painting smoother and softer.")]
[EditorOrder(20), EditorDisplay("Brush"), Limit(0.0f, 1.0f, 0.01f), Tooltip("The falloff parameter for the brush. Adjusts the paint strength for the vertices that are far from the brush center. Use lower values to make painting smoother and softer.")]
public float BrushFalloff
{
get => Tab._gizmoMode.BrushFalloff;

View File

@@ -6,10 +6,8 @@
#include "Engine/Core/Log.h"
#include "Engine/Graphics/Textures/TextureData.h"
#include "Engine/Graphics/PixelFormatExtensions.h"
#include "Engine/Serialization/FileReadStream.h"
#include "Engine/Tools/TextureTool/TextureTool.h"
#include "Engine/Core/Math/Color32.h"
#include "Engine/Core/Math/VectorInt.h"
#include "Engine/Core/Config/GameSettings.h"
#include "Engine/Content/Content.h"
#include "Engine/Content/AssetReference.h"
@@ -247,7 +245,7 @@ void UpdateIconData(uint8* iconData, const TextureData* icon)
iconTexSize = Math::RoundUpToPowerOf2(width);
}
// Try to pick a proper mip (requrie the same size)
// Try to pick a proper mip (require the same size)
const TextureMipData* srcPixels = nullptr;
int32 mipLevels = icon->GetMipLevels();
for (int32 mipIndex = 0; mipIndex < mipLevels; mipIndex++)

View File

@@ -251,7 +251,7 @@ namespace FlaxEditor.Utilities
var list = new List<MemberComparison>();
#if DEBUG_OBJECT_SNAPSHOT_COMPARISION
Debug.Logger.LogHandler.LogWrite(LogType.Warning, "-------------- Comparision --------------");
Debug.Logger.LogHandler.LogWrite(LogType.Warning, "-------------- Comparison --------------");
#endif
for (int i = _members.Count - 1; i >= 0; i--)
{

View File

@@ -126,7 +126,7 @@ namespace FlaxEditor.Utilities
/// </summary>
/// <param name="oper1">The first operator.</param>
/// <param name="oper2">The second operator.</param>
/// <returns>The comparision result.</returns>
/// <returns>The comparison result.</returns>
private static bool CompareOperators(string oper1, string oper2)
{
var op1 = Operators[oper1];

View File

@@ -743,6 +743,7 @@ namespace FlaxEditor.Utilities
case VariantType.Array: return new ScriptType(typeof(object[]));
case VariantType.Dictionary: return new ScriptType(typeof(Dictionary<object, object>));
case VariantType.ManagedObject: return new ScriptType(typeof(object));
case VariantType.Blob: return new ScriptType(typeof(byte[]));
default: throw new ArgumentOutOfRangeException($"Unknown Variant Type {variantType} without typename.");
}
}
@@ -806,6 +807,7 @@ namespace FlaxEditor.Utilities
case VariantType.Array: return typeof(object[]);
case VariantType.Dictionary: return typeof(Dictionary<object, object>);
case VariantType.ManagedObject: return typeof(object);
case VariantType.Blob: return typeof(byte[]);
default: throw new ArgumentOutOfRangeException($"Unknown Variant Type {variantType} without typename.");
}
}

View File

@@ -24,7 +24,7 @@ namespace FlaxEditor.Viewport.Cameras
public bool IsAnimatingMove => _moveStartTime > Mathf.Epsilon;
/// <summary>
/// The target point location. It's used to orbit around it whe user clicks Alt+LMB.
/// The target point location. It's used to orbit around it when user clicks Alt+LMB.
/// </summary>
public Vector3 TargetPoint = new Vector3(-200);

View File

@@ -528,6 +528,18 @@ namespace FlaxEditor.Viewport
ViewWidgetButtonMenu.VisibleChanged += control => orthoValue.Checked = _isOrtho;
}
// Cara Orientation
{
var cameraView = ViewWidgetButtonMenu.AddChildMenu("Orientation").ContextMenu;
for (int i = 0; i < EditorViewportCameraOrientationValues.Length; i++)
{
var co = EditorViewportCameraOrientationValues[i];
var button = cameraView.AddButton(co.Name);
button.Tag = co.Orientation;
}
cameraView.ButtonClicked += button => ViewOrientation = Quaternion.Euler((Vector3)button.Tag);
}
// Field of View
{
var fov = ViewWidgetButtonMenu.AddButton("Field Of View");
@@ -1193,6 +1205,28 @@ namespace FlaxEditor.Viewport
base.OnDestroy();
}
private struct CameraOrientation
{
public readonly string Name;
public readonly Vector3 Orientation;
public CameraOrientation(string name, Vector3 orientation)
{
Name = name;
Orientation = orientation;
}
}
private readonly CameraOrientation[] EditorViewportCameraOrientationValues =
{
new CameraOrientation("Front", new Vector3(0, 0, 0)),
new CameraOrientation("Back", new Vector3(0, 180, 0)),
new CameraOrientation("Left", new Vector3(0, 90, 0)),
new CameraOrientation("Right", new Vector3(0, -90, 0)),
new CameraOrientation("Top", new Vector3(-90, 0, 0)),
new CameraOrientation("Bottom", new Vector3(90, 0, 0))
};
private readonly float[] EditorViewportCameraSpeedValues =
{
0.1f,

View File

@@ -115,7 +115,7 @@ namespace FlaxEditor.Windows
{
var thirdPartyPanel = new Panel(ScrollBars.Vertical)
{
Bounds = new Rectangle(0, topParentControl.Bottom + 4, Width, Height - topParentControl.Bottom - 24),
Bounds = new Rectangle(4, topParentControl.Bottom + 4, Width - 8, Height - topParentControl.Bottom - 24),
Parent = this
};
var thirdPartyEntries = new[]

View File

@@ -288,7 +288,7 @@ namespace FlaxEditor.Windows.Assets
public abstract class AssetEditorWindowBase<T> : AssetEditorWindow where T : Asset
{
/// <summary>
/// Flag set to true if window is is waiting for asset to be loaded (to send <see cref="OnAssetLoaded"/> or <see cref="OnAssetLoadFailed"/> events).
/// Flag set to true if window is waiting for asset to be loaded (to send <see cref="OnAssetLoaded"/> or <see cref="OnAssetLoadFailed"/> events).
/// </summary>
protected bool _isWaitingForLoaded;

View File

@@ -490,7 +490,7 @@ namespace FlaxEditor.Windows.Assets
}
if (_player.IsStopped || _player.Time >= _options.EndTime)
{
// End rendering but perform reaming copies of the staging textures so all data is captured (from GPU to CPU)
// End rendering but perform remaining copies of the staging textures so all data is captured (from GPU to CPU)
_state = States.Staging;
break;
}

View File

@@ -222,7 +222,7 @@ namespace FlaxEditor.Windows
private void PlayingStateOnSceneDuplicating()
{
// Remove reaming GUI controls so loaded scene can add own GUI
// Remove remaining GUI controls so loaded scene can add own GUI
//_guiRoot.DisposeChildren();
// Show GUI
@@ -231,7 +231,7 @@ namespace FlaxEditor.Windows
private void PlayingStateOnSceneRestored()
{
// Remove reaming GUI controls so loaded scene can add own GUI
// Remove remaining GUI controls so loaded scene can add own GUI
//_guiRoot.DisposeChildren();
// Hide GUI

View File

@@ -110,6 +110,11 @@ const Char* SplashScreenQuotes[] =
TEXT("You have my bow.\nAnd my axe!"),
TEXT("To the bridge of Khazad-dum."),
TEXT("One ring to rule them all.\nOne ring to find them."),
TEXT("Ladies and gentelman, we got him"),
TEXT("Cyberpunk of game engines"),
TEXT("That's what she said"),
TEXT("Compiling Shaders (93,788)"),
TEXT("Hi There"),
};
SplashScreen::~SplashScreen()