From bd6ce4ae2588b9725b2c6a6e7ee0b8bda2c95ba8 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Sun, 17 Sep 2023 02:03:01 -0400
Subject: [PATCH 001/114] Very basic grip snap working. Need to add
configuration.
---
Source/Editor/Surface/VisjectSurface.Input.cs | 35 +++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/Source/Editor/Surface/VisjectSurface.Input.cs b/Source/Editor/Surface/VisjectSurface.Input.cs
index 7264321c3..27c8e2a02 100644
--- a/Source/Editor/Surface/VisjectSurface.Input.cs
+++ b/Source/Editor/Surface/VisjectSurface.Input.cs
@@ -1,5 +1,6 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
+using System;
using System.Collections.Generic;
using System.Linq;
using FlaxEditor.Options;
@@ -223,16 +224,46 @@ namespace FlaxEditor.Surface
// Moving
else if (_isMovingSelection)
{
+ bool testOption = true;
+ float testGridSize = 15f;
// Calculate delta (apply view offset)
var viewDelta = _rootControl.Location - _movingSelectionViewPos;
_movingSelectionViewPos = _rootControl.Location;
var delta = location - _leftMouseDownPos - viewDelta;
- if (delta.LengthSquared > 0.01f)
+ var deltaLengthSquared = delta.LengthSquared;
+
+ delta /= _targetScale;
+ if ((!testOption || Math.Abs(delta.X) >= testGridSize || (Math.Abs(delta.Y) >= testGridSize))
+ && deltaLengthSquared > 0.01f)
{
// Move selected nodes
- delta /= _targetScale;
+ Debug.Log("test " + delta.ToString() + ", " + testGridSize.ToString() + ", " + _targetScale.ToString());
+
+
+ if (testOption)
+ {
+ // Round delta to ensure grid snapping.
+
+ Float2 unroundedDelta = delta;
+ unroundedDelta.X = (float) Math.CopySign(Math.Floor(Math.Abs((double)unroundedDelta.X) / testGridSize) * testGridSize, unroundedDelta.X);
+ unroundedDelta.Y = (float)Math.CopySign(Math.Floor(Math.Abs((double)unroundedDelta.Y) / testGridSize) * testGridSize, unroundedDelta.Y);
+ delta = unroundedDelta;
+ }
+
foreach (var node in _movingNodes)
+ {
+ if (testOption)
+ {
+ // Ensure location is snapped if grid snap is on.
+
+ Float2 unroundedLocation = node.Location;
+ unroundedLocation.X = (float)Math.CopySign(Math.Round(Math.Abs((double)unroundedLocation.X) / testGridSize) * testGridSize, unroundedLocation.X);
+ unroundedLocation.Y = (float)Math.CopySign(Math.Round(Math.Abs((double)unroundedLocation.Y) / testGridSize) * testGridSize, unroundedLocation.Y);
+ node.Location = unroundedLocation;
+ }
node.Location += delta;
+ }
+
_leftMouseDownPos = location;
_movingNodesDelta += delta;
Cursor = CursorType.SizeAll;
From 976faee8a33fb4d189a7998471c0169be69de8ce Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Sun, 17 Sep 2023 12:46:57 -0400
Subject: [PATCH 002/114] Extract options from testing area and handle extra
mouse deltas that were not processed during the previous movement frame.
---
Source/Editor/Surface/VisjectSurface.Input.cs | 51 ++++++++++++-------
1 file changed, 32 insertions(+), 19 deletions(-)
diff --git a/Source/Editor/Surface/VisjectSurface.Input.cs b/Source/Editor/Surface/VisjectSurface.Input.cs
index 27c8e2a02..5ba070200 100644
--- a/Source/Editor/Surface/VisjectSurface.Input.cs
+++ b/Source/Editor/Surface/VisjectSurface.Input.cs
@@ -18,10 +18,18 @@ namespace FlaxEditor.Surface
///
public readonly InputActionsContainer InputActions;
+ ///
+ /// Should grid snapping be enabled for these nodes?
+ ///
+ public bool GridSnappingEnabled = false;
+
private string _currentInputText = string.Empty;
private Float2 _movingNodesDelta;
+ private Float2 _gridRoundingDelta;
private HashSet _movingNodes;
private readonly Stack _inputBrackets = new Stack();
+ private readonly float _gridSize = 15f;
+
private class InputBracket
{
@@ -177,6 +185,15 @@ namespace FlaxEditor.Surface
}
}
+ private Float2 RoundToGrid(Float2 point)
+ {
+ Float2 pointToRound = point;
+ pointToRound.X = (float)Math.CopySign(Math.Floor(Math.Abs((double)pointToRound.X) / _gridSize) * _gridSize, pointToRound.X);
+ pointToRound.Y = (float)Math.CopySign(Math.Floor(Math.Abs((double)pointToRound.Y) / _gridSize) * _gridSize, pointToRound.Y);
+
+ return pointToRound;
+ }
+
///
public override void OnMouseEnter(Float2 location)
{
@@ -224,48 +241,44 @@ namespace FlaxEditor.Surface
// Moving
else if (_isMovingSelection)
{
- bool testOption = true;
- float testGridSize = 15f;
+ if (!GridSnappingEnabled)
+ _gridRoundingDelta = Float2.Zero; // Reset in case user toggled option between frames.
+
// Calculate delta (apply view offset)
var viewDelta = _rootControl.Location - _movingSelectionViewPos;
_movingSelectionViewPos = _rootControl.Location;
- var delta = location - _leftMouseDownPos - viewDelta;
+ var delta = location - _leftMouseDownPos - viewDelta + _gridRoundingDelta;
var deltaLengthSquared = delta.LengthSquared;
delta /= _targetScale;
- if ((!testOption || Math.Abs(delta.X) >= testGridSize || (Math.Abs(delta.Y) >= testGridSize))
+ if ((!GridSnappingEnabled || Math.Abs(delta.X) >= _gridSize || (Math.Abs(delta.Y) >= _gridSize))
&& deltaLengthSquared > 0.01f)
{
// Move selected nodes
- Debug.Log("test " + delta.ToString() + ", " + testGridSize.ToString() + ", " + _targetScale.ToString());
+ Debug.Log("test " + delta.ToString() + ", " + _gridSize.ToString() + ", " + _targetScale.ToString());
-
- if (testOption)
+ // The change that occurred by rounding. Used to retain specific delta values if it doesn't snap on one axis but does on another.
+ if (GridSnappingEnabled)
{
- // Round delta to ensure grid snapping.
-
Float2 unroundedDelta = delta;
- unroundedDelta.X = (float) Math.CopySign(Math.Floor(Math.Abs((double)unroundedDelta.X) / testGridSize) * testGridSize, unroundedDelta.X);
- unroundedDelta.Y = (float)Math.CopySign(Math.Floor(Math.Abs((double)unroundedDelta.Y) / testGridSize) * testGridSize, unroundedDelta.Y);
- delta = unroundedDelta;
+
+ delta = RoundToGrid(unroundedDelta);
+ _gridRoundingDelta = (unroundedDelta - delta) * _targetScale; // Standardize unit of the rounding delta, in case user zooms between node movements.
}
foreach (var node in _movingNodes)
{
- if (testOption)
+ if (GridSnappingEnabled)
{
- // Ensure location is snapped if grid snap is on.
-
Float2 unroundedLocation = node.Location;
- unroundedLocation.X = (float)Math.CopySign(Math.Round(Math.Abs((double)unroundedLocation.X) / testGridSize) * testGridSize, unroundedLocation.X);
- unroundedLocation.Y = (float)Math.CopySign(Math.Round(Math.Abs((double)unroundedLocation.Y) / testGridSize) * testGridSize, unroundedLocation.Y);
- node.Location = unroundedLocation;
+ node.Location = RoundToGrid(unroundedLocation);
}
+
node.Location += delta;
}
_leftMouseDownPos = location;
- _movingNodesDelta += delta;
+ _movingNodesDelta += delta; // TODO: Figure out how to handle undo for differing values of _gridRoundingDelta between selected nodes. For now it will be a small error in undo.
Cursor = CursorType.SizeAll;
MarkAsEdited(false);
}
From e38da7eb95020e0235cdb19c6cb62b6e7b70959e Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Sun, 17 Sep 2023 16:48:41 -0400
Subject: [PATCH 003/114] Factor Toolstrip setup out from the various Visject
Windows. I made this it's own commit in case you don't like these changes,
but if you want to undo you will have to add the new button I added to all
three windows.
---
Source/Editor/Surface/SurfaceUtils.cs | 21 +++++++++++++++++++
Source/Editor/Surface/VisjectSurfaceWindow.cs | 15 ++-----------
.../Assets/VisjectFunctionSurfaceWindow.cs | 14 ++-----------
.../Windows/Assets/VisualScriptWindow.cs | 12 ++---------
4 files changed, 27 insertions(+), 35 deletions(-)
diff --git a/Source/Editor/Surface/SurfaceUtils.cs b/Source/Editor/Surface/SurfaceUtils.cs
index 08b9c6d63..563d00df0 100644
--- a/Source/Editor/Surface/SurfaceUtils.cs
+++ b/Source/Editor/Surface/SurfaceUtils.cs
@@ -12,6 +12,8 @@ using FlaxEditor.Scripting;
using FlaxEditor.Utilities;
using FlaxEngine.Utilities;
using FlaxEngine;
+using FlaxEditor.GUI;
+using FlaxEditor.Options;
namespace FlaxEditor.Surface
{
@@ -532,5 +534,24 @@ namespace FlaxEditor.Surface
value = new Double4(i);
return value;
}
+
+ public static void VisjectCommonToolstripSetup(Editor editor, ToolStrip toolStrip, FlaxEditor.Undo undo,
+ Action save, Action showWholeGraph, InputActionsContainer actionsContainer,
+ out ToolStripButton saveButton, out ToolStripButton undoButton, out ToolStripButton redoButton)
+ {
+ // Toolstrip
+ saveButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Save64, save).LinkTooltip("Save");
+ toolStrip.AddSeparator();
+ undoButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Undo64, undo.PerformUndo).LinkTooltip("Undo (Ctrl+Z)");
+ redoButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Redo64, undo.PerformRedo).LinkTooltip("Redo (Ctrl+Y)");
+ toolStrip.AddSeparator();
+ toolStrip.AddButton(editor.Icons.Search64, editor.ContentFinding.ShowSearch).LinkTooltip("Open content search tool (Ctrl+F)");
+ toolStrip.AddButton(editor.Icons.CenterView64, showWholeGraph).LinkTooltip("Show whole graph");
+
+ // Setup input actions
+ actionsContainer.Add(options => options.Undo, undo.PerformUndo);
+ actionsContainer.Add(options => options.Redo, undo.PerformRedo);
+ actionsContainer.Add(options => options.Search, editor.ContentFinding.ShowSearch);
+ }
}
}
diff --git a/Source/Editor/Surface/VisjectSurfaceWindow.cs b/Source/Editor/Surface/VisjectSurfaceWindow.cs
index 305121e11..8362cbd44 100644
--- a/Source/Editor/Surface/VisjectSurfaceWindow.cs
+++ b/Source/Editor/Surface/VisjectSurfaceWindow.cs
@@ -772,19 +772,8 @@ namespace FlaxEditor.Surface
}
_propertiesEditor.Modified += OnPropertyEdited;
- // Toolstrip
- _saveButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Save64, Save).LinkTooltip("Save");
- _toolstrip.AddSeparator();
- _undoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Undo64, _undo.PerformUndo).LinkTooltip("Undo (Ctrl+Z)");
- _redoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Redo64, _undo.PerformRedo).LinkTooltip("Redo (Ctrl+Y)");
- _toolstrip.AddSeparator();
- _toolstrip.AddButton(Editor.Icons.Search64, Editor.ContentFinding.ShowSearch).LinkTooltip("Open content search tool (Ctrl+F)");
- _toolstrip.AddButton(editor.Icons.CenterView64, ShowWholeGraph).LinkTooltip("Show whole graph");
-
- // Setup input actions
- InputActions.Add(options => options.Undo, _undo.PerformUndo);
- InputActions.Add(options => options.Redo, _undo.PerformRedo);
- InputActions.Add(options => options.Search, Editor.ContentFinding.ShowSearch);
+ SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo, Save, ShowWholeGraph, InputActions,
+ out _saveButton, out _undoButton, out _redoButton);
}
private void OnUndoRedo(IUndoAction action)
diff --git a/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs b/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
index 7ae6ae8be..69a1ae6ad 100644
--- a/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
+++ b/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
@@ -68,13 +68,8 @@ namespace FlaxEditor.Windows.Assets
_undo.ActionDone += OnUndoRedo;
// Toolstrip
- _saveButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Save64, Save).LinkTooltip("Save");
- _toolstrip.AddSeparator();
- _undoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Undo64, _undo.PerformUndo).LinkTooltip("Undo (Ctrl+Z)");
- _redoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Redo64, _undo.PerformRedo).LinkTooltip("Redo (Ctrl+Y)");
- _toolstrip.AddSeparator();
- _toolstrip.AddButton(Editor.Icons.Search64, Editor.ContentFinding.ShowSearch).LinkTooltip("Open content search tool (Ctrl+F)");
- _toolstrip.AddButton(editor.Icons.CenterView64, ShowWholeGraph).LinkTooltip("Show whole graph");
+ SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo, Save, ShowWholeGraph, InputActions,
+ out _saveButton, out _undoButton, out _redoButton);
// Panel
_panel = new Panel(ScrollBars.None)
@@ -83,11 +78,6 @@ namespace FlaxEditor.Windows.Assets
Offsets = new Margin(0, 0, _toolstrip.Bottom, 0),
Parent = this
};
-
- // Setup input actions
- InputActions.Add(options => options.Undo, _undo.PerformUndo);
- InputActions.Add(options => options.Redo, _undo.PerformRedo);
- InputActions.Add(options => options.Search, Editor.ContentFinding.ShowSearch);
}
private void OnUndoRedo(IUndoAction action)
diff --git a/Source/Editor/Windows/Assets/VisualScriptWindow.cs b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
index ed20b591e..cd5455a5b 100644
--- a/Source/Editor/Windows/Assets/VisualScriptWindow.cs
+++ b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
@@ -596,13 +596,8 @@ namespace FlaxEditor.Windows.Assets
_propertiesEditor.Select(_properties);
// Toolstrip
- _saveButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Save64, Save).LinkTooltip("Save");
- _toolstrip.AddSeparator();
- _undoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Undo64, _undo.PerformUndo).LinkTooltip("Undo (Ctrl+Z)");
- _redoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Redo64, _undo.PerformRedo).LinkTooltip("Redo (Ctrl+Y)");
- _toolstrip.AddSeparator();
- _toolstrip.AddButton(Editor.Icons.Search64, Editor.ContentFinding.ShowSearch).LinkTooltip("Open content search tool (Ctrl+F)");
- _toolstrip.AddButton(editor.Icons.CenterView64, ShowWholeGraph).LinkTooltip("Show whole graph");
+ SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo, Save, ShowWholeGraph, InputActions,
+ out _saveButton, out _undoButton, out _redoButton);
_toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/scripting/visual/index.html")).LinkTooltip("See documentation to learn more");
_debugToolstripControls = new[]
@@ -642,9 +637,6 @@ namespace FlaxEditor.Windows.Assets
debugObjectPickerContainer.Parent = _toolstrip;
// Setup input actions
- InputActions.Add(options => options.Undo, _undo.PerformUndo);
- InputActions.Add(options => options.Redo, _undo.PerformRedo);
- InputActions.Add(options => options.Search, Editor.ContentFinding.ShowSearch);
InputActions.Add(options => options.DebuggerContinue, OnDebuggerContinue);
InputActions.Add(options => options.DebuggerStepOver, OnDebuggerStepOver);
InputActions.Add(options => options.DebuggerStepOut, OnDebuggerStepOut);
From 5571430e1bed9aed28fc3124be38db640c9b715e Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Sun, 17 Sep 2023 16:50:02 -0400
Subject: [PATCH 004/114] Move options out of VisjectSurface.Input to a
different place.
---
Source/Editor/Surface/VisjectSurface.Input.cs | 11 -----------
Source/Editor/Surface/VisjectSurface.cs | 6 ++++++
2 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/Source/Editor/Surface/VisjectSurface.Input.cs b/Source/Editor/Surface/VisjectSurface.Input.cs
index 5ba070200..462abe54e 100644
--- a/Source/Editor/Surface/VisjectSurface.Input.cs
+++ b/Source/Editor/Surface/VisjectSurface.Input.cs
@@ -18,18 +18,11 @@ namespace FlaxEditor.Surface
///
public readonly InputActionsContainer InputActions;
- ///
- /// Should grid snapping be enabled for these nodes?
- ///
- public bool GridSnappingEnabled = false;
-
private string _currentInputText = string.Empty;
private Float2 _movingNodesDelta;
private Float2 _gridRoundingDelta;
private HashSet _movingNodes;
private readonly Stack _inputBrackets = new Stack();
- private readonly float _gridSize = 15f;
-
private class InputBracket
{
@@ -254,10 +247,6 @@ namespace FlaxEditor.Surface
if ((!GridSnappingEnabled || Math.Abs(delta.X) >= _gridSize || (Math.Abs(delta.Y) >= _gridSize))
&& deltaLengthSquared > 0.01f)
{
- // Move selected nodes
- Debug.Log("test " + delta.ToString() + ", " + _gridSize.ToString() + ", " + _targetScale.ToString());
-
- // The change that occurred by rounding. Used to retain specific delta values if it doesn't snap on one axis but does on another.
if (GridSnappingEnabled)
{
Float2 unroundedDelta = delta;
diff --git a/Source/Editor/Surface/VisjectSurface.cs b/Source/Editor/Surface/VisjectSurface.cs
index 22aba4855..7cfcecbfc 100644
--- a/Source/Editor/Surface/VisjectSurface.cs
+++ b/Source/Editor/Surface/VisjectSurface.cs
@@ -30,6 +30,12 @@ namespace FlaxEditor.Surface
///
protected SurfaceRootControl _rootControl;
+ ///
+ /// Is grid snapping enabled for this surface?
+ ///
+ public bool GridSnappingEnabled = false;
+
+ private readonly float _gridSize = 15f;
private float _targetScale = 1.0f;
private float _moveViewWithMouseDragSpeed = 1.0f;
private bool _canEdit = true;
From 02d68bc057d9d4a1f4fadaf1ac09a703033f8b60 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Sun, 17 Sep 2023 18:20:50 -0400
Subject: [PATCH 005/114] Add toggle button for grid snapping.
---
Source/Editor/Surface/SurfaceUtils.cs | 21 +++++++++++++++++--
Source/Editor/Surface/VisjectSurfaceWindow.cs | 11 ++++++++--
.../Assets/VisjectFunctionSurfaceWindow.cs | 11 ++++++++--
.../Windows/Assets/VisualScriptWindow.cs | 13 ++++++++++--
4 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/Source/Editor/Surface/SurfaceUtils.cs b/Source/Editor/Surface/SurfaceUtils.cs
index 563d00df0..f5ca394fb 100644
--- a/Source/Editor/Surface/SurfaceUtils.cs
+++ b/Source/Editor/Surface/SurfaceUtils.cs
@@ -14,6 +14,7 @@ using FlaxEngine.Utilities;
using FlaxEngine;
using FlaxEditor.GUI;
using FlaxEditor.Options;
+using FlaxEngine.GUI;
namespace FlaxEditor.Surface
{
@@ -535,9 +536,10 @@ namespace FlaxEditor.Surface
return value;
}
+ // This might not be the greatest place to put this but I couldn't find anything better yet.
public static void VisjectCommonToolstripSetup(Editor editor, ToolStrip toolStrip, FlaxEditor.Undo undo,
- Action save, Action showWholeGraph, InputActionsContainer actionsContainer,
- out ToolStripButton saveButton, out ToolStripButton undoButton, out ToolStripButton redoButton)
+ Action save, Action showWholeGraph, Action toggleGridSnap, InputActionsContainer actionsContainer,
+ out ToolStripButton saveButton, out ToolStripButton undoButton, out ToolStripButton redoButton, out ToolStripButton gridSnapButton)
{
// Toolstrip
saveButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Save64, save).LinkTooltip("Save");
@@ -547,11 +549,26 @@ namespace FlaxEditor.Surface
toolStrip.AddSeparator();
toolStrip.AddButton(editor.Icons.Search64, editor.ContentFinding.ShowSearch).LinkTooltip("Open content search tool (Ctrl+F)");
toolStrip.AddButton(editor.Icons.CenterView64, showWholeGraph).LinkTooltip("Show whole graph");
+ gridSnapButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Stop64, toggleGridSnap).LinkTooltip("Toggle grid snapping for nodes.");
+ gridSnapButton.BackgroundColor = Style.Current.Background; // Default color for grid snap button.
// Setup input actions
actionsContainer.Add(options => options.Undo, undo.PerformUndo);
actionsContainer.Add(options => options.Redo, undo.PerformRedo);
actionsContainer.Add(options => options.Search, editor.ContentFinding.ShowSearch);
}
+
+ public static void ToggleSurfaceGridSnap(VisjectSurface surface, ToolStripButton gridSnapButton)
+ {
+ surface.GridSnappingEnabled = !surface.GridSnappingEnabled;
+ if (surface.GridSnappingEnabled)
+ {
+ gridSnapButton.BackgroundColor = Style.Current.BackgroundSelected;
+ }
+ else
+ {
+ gridSnapButton.BackgroundColor = Style.Current.Background;
+ }
+ }
}
}
diff --git a/Source/Editor/Surface/VisjectSurfaceWindow.cs b/Source/Editor/Surface/VisjectSurfaceWindow.cs
index 8362cbd44..eff8ec8a3 100644
--- a/Source/Editor/Surface/VisjectSurfaceWindow.cs
+++ b/Source/Editor/Surface/VisjectSurfaceWindow.cs
@@ -669,6 +669,7 @@ namespace FlaxEditor.Surface
private readonly ToolStripButton _saveButton;
private readonly ToolStripButton _undoButton;
private readonly ToolStripButton _redoButton;
+ private readonly ToolStripButton _gridSnapButton;
private bool _showWholeGraphOnLoad = true;
///
@@ -772,8 +773,9 @@ namespace FlaxEditor.Surface
}
_propertiesEditor.Modified += OnPropertyEdited;
- SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo, Save, ShowWholeGraph, InputActions,
- out _saveButton, out _undoButton, out _redoButton);
+ SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo,
+ Save, ShowWholeGraph, ToggleGridSnap, InputActions,
+ out _saveButton, out _undoButton, out _redoButton, out _gridSnapButton);
}
private void OnUndoRedo(IUndoAction action)
@@ -812,6 +814,11 @@ namespace FlaxEditor.Surface
_surface.ShowWholeGraph();
}
+ private void ToggleGridSnap()
+ {
+ SurfaceUtils.ToggleSurfaceGridSnap(_surface, _gridSnapButton);
+ }
+
///
/// Refreshes temporary asset to see changes live when editing the surface.
///
diff --git a/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs b/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
index 69a1ae6ad..9750fa3e6 100644
--- a/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
+++ b/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
@@ -30,6 +30,7 @@ namespace FlaxEditor.Windows.Assets
private readonly ToolStripButton _saveButton;
private readonly ToolStripButton _undoButton;
private readonly ToolStripButton _redoButton;
+ private readonly ToolStripButton _gridSnapButton;
private bool _showWholeGraphOnLoad = true;
///
@@ -68,8 +69,9 @@ namespace FlaxEditor.Windows.Assets
_undo.ActionDone += OnUndoRedo;
// Toolstrip
- SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo, Save, ShowWholeGraph, InputActions,
- out _saveButton, out _undoButton, out _redoButton);
+ SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo,
+ Save, ShowWholeGraph, ToggleGridSnap, InputActions,
+ out _saveButton, out _undoButton, out _redoButton, out _gridSnapButton);
// Panel
_panel = new Panel(ScrollBars.None)
@@ -94,6 +96,11 @@ namespace FlaxEditor.Windows.Assets
_surface.ShowWholeGraph();
}
+ private void ToggleGridSnap()
+ {
+ SurfaceUtils.ToggleSurfaceGridSnap(_surface, _gridSnapButton);
+ }
+
///
/// Refreshes temporary asset to see changes live when editing the surface.
///
diff --git a/Source/Editor/Windows/Assets/VisualScriptWindow.cs b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
index cd5455a5b..3b6480063 100644
--- a/Source/Editor/Windows/Assets/VisualScriptWindow.cs
+++ b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
@@ -533,6 +533,7 @@ namespace FlaxEditor.Windows.Assets
private readonly ToolStripButton _saveButton;
private readonly ToolStripButton _undoButton;
private readonly ToolStripButton _redoButton;
+ private readonly ToolStripButton _gridSnapButton;
private Control[] _debugToolstripControls;
private bool _showWholeGraphOnLoad = true;
private bool _tmpAssetIsDirty;
@@ -596,8 +597,11 @@ namespace FlaxEditor.Windows.Assets
_propertiesEditor.Select(_properties);
// Toolstrip
- SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo, Save, ShowWholeGraph, InputActions,
- out _saveButton, out _undoButton, out _redoButton);
+ SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo,
+ Save, ShowWholeGraph, ToggleGridSnap, InputActions,
+ out _saveButton, out _undoButton, out _redoButton, out _gridSnapButton);
+
+ // The rest of the toolstrip
_toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/scripting/visual/index.html")).LinkTooltip("See documentation to learn more");
_debugToolstripControls = new[]
@@ -678,6 +682,11 @@ namespace FlaxEditor.Windows.Assets
_surface.ShowWholeGraph();
}
+ private void ToggleGridSnap()
+ {
+ SurfaceUtils.ToggleSurfaceGridSnap(_surface, _gridSnapButton);
+ }
+
///
/// Refreshes temporary asset to see changes live when editing the surface.
///
From 83bf68a64f21d964f0ca8498522f25d6c7270cae Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Sun, 17 Sep 2023 18:31:49 -0400
Subject: [PATCH 006/114] Make GridSize public.
---
Source/Editor/Surface/VisjectSurface.Input.cs | 6 +++---
Source/Editor/Surface/VisjectSurface.cs | 6 +++++-
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/Source/Editor/Surface/VisjectSurface.Input.cs b/Source/Editor/Surface/VisjectSurface.Input.cs
index 462abe54e..d61f9bd0d 100644
--- a/Source/Editor/Surface/VisjectSurface.Input.cs
+++ b/Source/Editor/Surface/VisjectSurface.Input.cs
@@ -181,8 +181,8 @@ namespace FlaxEditor.Surface
private Float2 RoundToGrid(Float2 point)
{
Float2 pointToRound = point;
- pointToRound.X = (float)Math.CopySign(Math.Floor(Math.Abs((double)pointToRound.X) / _gridSize) * _gridSize, pointToRound.X);
- pointToRound.Y = (float)Math.CopySign(Math.Floor(Math.Abs((double)pointToRound.Y) / _gridSize) * _gridSize, pointToRound.Y);
+ pointToRound.X = (float)Math.CopySign(Math.Floor(Math.Abs((double)pointToRound.X) / GridSize) * GridSize, pointToRound.X);
+ pointToRound.Y = (float)Math.CopySign(Math.Floor(Math.Abs((double)pointToRound.Y) / GridSize) * GridSize, pointToRound.Y);
return pointToRound;
}
@@ -244,7 +244,7 @@ namespace FlaxEditor.Surface
var deltaLengthSquared = delta.LengthSquared;
delta /= _targetScale;
- if ((!GridSnappingEnabled || Math.Abs(delta.X) >= _gridSize || (Math.Abs(delta.Y) >= _gridSize))
+ if ((!GridSnappingEnabled || Math.Abs(delta.X) >= GridSize || (Math.Abs(delta.Y) >= GridSize))
&& deltaLengthSquared > 0.01f)
{
if (GridSnappingEnabled)
diff --git a/Source/Editor/Surface/VisjectSurface.cs b/Source/Editor/Surface/VisjectSurface.cs
index 7cfcecbfc..fc0995100 100644
--- a/Source/Editor/Surface/VisjectSurface.cs
+++ b/Source/Editor/Surface/VisjectSurface.cs
@@ -35,7 +35,11 @@ namespace FlaxEditor.Surface
///
public bool GridSnappingEnabled = false;
- private readonly float _gridSize = 15f;
+ ///
+ /// The size of the snapping grid.
+ ///
+ public static readonly float GridSize = 15f;
+
private float _targetScale = 1.0f;
private float _moveViewWithMouseDragSpeed = 1.0f;
private bool _canEdit = true;
From b202573920699216965a7394446522fc3106671f Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Mon, 18 Sep 2023 10:37:23 -0400
Subject: [PATCH 007/114] Scale node size to the next highest grid-aligned
size.
---
Source/Editor/Surface/NodeArchetype.cs | 14 ++++++++++++-
Source/Editor/Surface/VisjectSurface.Input.cs | 20 ++++++++++++++++---
2 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/Source/Editor/Surface/NodeArchetype.cs b/Source/Editor/Surface/NodeArchetype.cs
index 6dc923ce2..cdcf1211b 100644
--- a/Source/Editor/Surface/NodeArchetype.cs
+++ b/Source/Editor/Surface/NodeArchetype.cs
@@ -99,10 +99,22 @@ namespace FlaxEditor.Surface
///
public CreateCustomNodeFunc Create;
+ private Float2 _size;
+
///
/// Default initial size of the node.
///
- public Float2 Size;
+ public Float2 Size {
+ get
+ {
+ return _size;
+ }
+ set
+ {
+ _size = VisjectSurface.RoundToGrid(value, true);
+ Debug.Log(_size.ToString());
+ }
+ }
///
/// Custom set of flags.
diff --git a/Source/Editor/Surface/VisjectSurface.Input.cs b/Source/Editor/Surface/VisjectSurface.Input.cs
index d61f9bd0d..be64019b6 100644
--- a/Source/Editor/Surface/VisjectSurface.Input.cs
+++ b/Source/Editor/Surface/VisjectSurface.Input.cs
@@ -178,11 +178,25 @@ namespace FlaxEditor.Surface
}
}
- private Float2 RoundToGrid(Float2 point)
+ ///
+ /// Round a visject coordinate point to the grid.
+ ///
+ /// The point to be rounded.
+ /// Round to ceiling instead?
+ ///
+ public static Float2 RoundToGrid(Float2 point, bool ceil = false)
{
+ Func round = x =>
+ {
+ double pointGridUnits = Math.Abs((double)x) / GridSize;
+ pointGridUnits = ceil ? Math.Ceiling(pointGridUnits) : Math.Floor(pointGridUnits);
+
+ return (float)Math.CopySign(pointGridUnits * GridSize, x);
+ };
+
Float2 pointToRound = point;
- pointToRound.X = (float)Math.CopySign(Math.Floor(Math.Abs((double)pointToRound.X) / GridSize) * GridSize, pointToRound.X);
- pointToRound.Y = (float)Math.CopySign(Math.Floor(Math.Abs((double)pointToRound.Y) / GridSize) * GridSize, pointToRound.Y);
+ pointToRound.X = round(pointToRound.X);
+ pointToRound.Y = round(pointToRound.Y);
return pointToRound;
}
From d83d510002c827c26efb71b2b62981fbedd4f5c6 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Tue, 19 Sep 2023 22:59:38 -0400
Subject: [PATCH 008/114] Update material size node to fit text..
---
Source/Editor/Surface/Archetypes/Material.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Surface/Archetypes/Material.cs b/Source/Editor/Surface/Archetypes/Material.cs
index 1a797c67d..a68132587 100644
--- a/Source/Editor/Surface/Archetypes/Material.cs
+++ b/Source/Editor/Surface/Archetypes/Material.cs
@@ -281,7 +281,7 @@ namespace FlaxEditor.Surface.Archetypes
Title = "Material",
Description = "Main material node",
Flags = NodeFlags.MaterialGraph | NodeFlags.NoRemove | NodeFlags.NoSpawnViaGUI | NodeFlags.NoSpawnViaPaste | NodeFlags.NoCloseButton,
- Size = new Float2(150, 300),
+ Size = new Float2(180, 300),
Elements = new[]
{
NodeElementArchetype.Factory.Input(0, "", true, typeof(void), 0),
From a7d56c29b505e6a258a1a6a8c5e6070f1b57bd01 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Tue, 19 Sep 2023 23:00:17 -0400
Subject: [PATCH 009/114] Update scaling setters.
---
Source/Editor/Surface/NodeArchetype.cs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Source/Editor/Surface/NodeArchetype.cs b/Source/Editor/Surface/NodeArchetype.cs
index cdcf1211b..b1a36ba0a 100644
--- a/Source/Editor/Surface/NodeArchetype.cs
+++ b/Source/Editor/Surface/NodeArchetype.cs
@@ -100,11 +100,11 @@ namespace FlaxEditor.Surface
public CreateCustomNodeFunc Create;
private Float2 _size;
-
///
/// Default initial size of the node.
///
- public Float2 Size {
+ public Float2 Size
+ {
get
{
return _size;
@@ -112,7 +112,6 @@ namespace FlaxEditor.Surface
set
{
_size = VisjectSurface.RoundToGrid(value, true);
- Debug.Log(_size.ToString());
}
}
From 0fe1acdabccbe274eb21ea0dc43815c84386ae45 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Tue, 19 Sep 2023 23:00:55 -0400
Subject: [PATCH 010/114] Update grid size to fit the Node Box positioning.
---
Source/Editor/Surface/VisjectSurface.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Surface/VisjectSurface.cs b/Source/Editor/Surface/VisjectSurface.cs
index fc0995100..50c112418 100644
--- a/Source/Editor/Surface/VisjectSurface.cs
+++ b/Source/Editor/Surface/VisjectSurface.cs
@@ -38,7 +38,7 @@ namespace FlaxEditor.Surface
///
/// The size of the snapping grid.
///
- public static readonly float GridSize = 15f;
+ public static readonly float GridSize = 20f;
private float _targetScale = 1.0f;
private float _moveViewWithMouseDragSpeed = 1.0f;
From b4d95a68f140978841640694d400f3d0b3a7e89d Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Tue, 19 Sep 2023 23:08:57 -0400
Subject: [PATCH 011/114] Apply patch from DutchDave on discord to make nodes
selectable from any point on the node.
---
Source/Editor/Surface/SurfaceNode.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index c24c47fbd..047e22476 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -878,7 +878,7 @@ namespace FlaxEditor.Surface
///
public override bool CanSelect(ref Float2 location)
{
- return _headerRect.MakeOffsetted(Location).Contains(ref location);
+ return _headerRect.MakeOffsetted(Location).Contains(ref location) || new Rectangle(Float2.Zero, Size).MakeOffsetted(Location).Contains(ref location);
}
///
From 67653cc0e88407dbdbd5628613c90ee8b68d5542 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Wed, 20 Sep 2023 01:45:49 -0400
Subject: [PATCH 012/114] Increase the size of the bitwise node to accomodate
for the "Result" text.
---
Source/Editor/Surface/Archetypes/Bitwise.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Editor/Surface/Archetypes/Bitwise.cs b/Source/Editor/Surface/Archetypes/Bitwise.cs
index 06f719adc..058159d48 100644
--- a/Source/Editor/Surface/Archetypes/Bitwise.cs
+++ b/Source/Editor/Surface/Archetypes/Bitwise.cs
@@ -19,7 +19,7 @@ namespace FlaxEditor.Surface.Archetypes
Description = desc,
AlternativeTitles = altTitles,
Flags = NodeFlags.AllGraphs,
- Size = new Float2(140, 20),
+ Size = new Float2(160, 20),
Elements = new[]
{
NodeElementArchetype.Factory.Input(0, "A", true, typeof(int), 0),
@@ -37,7 +37,7 @@ namespace FlaxEditor.Surface.Archetypes
Description = desc,
AlternativeTitles = altTitles,
Flags = NodeFlags.AllGraphs,
- Size = new Float2(140, 40),
+ Size = new Float2(160, 40),
DefaultValues = new object[]
{
0,
From 2696bc3704c35d2b9d4f7ca787b1dde3485f176b Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Fri, 22 Sep 2023 12:26:11 -0400
Subject: [PATCH 013/114] Add debug view for collision boxes.
---
Source/Editor/Surface/NodeArchetype.cs | 45 ++++-
Source/Editor/Surface/NodeElementArchetype.cs | 4 +-
Source/Editor/Surface/SurfaceNode.cs | 180 ++++++++++++++++--
3 files changed, 205 insertions(+), 24 deletions(-)
diff --git a/Source/Editor/Surface/NodeArchetype.cs b/Source/Editor/Surface/NodeArchetype.cs
index b1a36ba0a..4582aa054 100644
--- a/Source/Editor/Surface/NodeArchetype.cs
+++ b/Source/Editor/Surface/NodeArchetype.cs
@@ -1,8 +1,11 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
+using System.Collections.Generic;
+using System.Linq;
using FlaxEditor.Scripting;
using FlaxEngine;
+using FlaxEngine.GUI;
namespace FlaxEditor.Surface
{
@@ -178,10 +181,50 @@ namespace FlaxEditor.Surface
///
public Func DependentBoxFilter;
+ private NodeElementArchetype[] _elements;
///
/// Array with default elements descriptions.
///
- public NodeElementArchetype[] Elements;
+ public NodeElementArchetype[] Elements
+ {
+ get
+ {
+ return _elements;
+ }
+ set
+ {
+ _elements = value;
+
+ /*Float2 topLeft = Float2.Zero;
+ Float2 bottomRight = Float2.Zero;
+ List textRectangles = new List();
+
+ foreach (NodeElementArchetype nodeElementType in _elements)
+ {
+ bool isInputElement = nodeElementType.Type == NodeElementType.Input;
+ bool isOutputElement = nodeElementType.Type == NodeElementType.Output;
+ if (isInputElement)
+ {
+ // Text will be to the right
+ }
+
+ // In case of negatives.. most likely not needed.
+ topLeft.X = Math.Min(topLeft.X, nodeElementType.Position.X);
+ topLeft.Y = Math.Min(topLeft.Y, nodeElementType.Position.Y);
+
+ bottomRight.X = Math.Max(bottomRight.X, nodeElementType.Position.X + nodeElementType.Size.X);
+ bottomRight.Y = Math.Max(bottomRight.Y, nodeElementType.Position.Y + nodeElementType.Size.Y);
+ }
+
+ float paddingConst = 15;
+
+ float sizeXElements = bottomRight.X - topLeft.X + paddingConst;
+ float sizeYElements = bottomRight.Y - topLeft.Y + paddingConst;
+ float titleSize = Style.Current.FontLarge.MeasureText(Title).X + paddingConst;
+
+ Size = new Float2(Math.Max(sizeXElements, titleSize), sizeYElements);*/
+ }
+ }
///
/// Tries to parse some text and extract the data from it.
diff --git a/Source/Editor/Surface/NodeElementArchetype.cs b/Source/Editor/Surface/NodeElementArchetype.cs
index be8b67378..298127c3a 100644
--- a/Source/Editor/Surface/NodeElementArchetype.cs
+++ b/Source/Editor/Surface/NodeElementArchetype.cs
@@ -132,8 +132,8 @@ namespace FlaxEditor.Surface
{
Type = NodeElementType.Input,
Position = new Float2(
- Constants.NodeMarginX - Constants.BoxOffsetX,
- Constants.NodeMarginY + Constants.NodeHeaderSize + yLevel * Constants.LayoutOffsetY),
+ Constants.NodeMarginX - Constants.BoxOffsetX,
+ Constants.NodeMarginY + Constants.NodeHeaderSize + yLevel * Constants.LayoutOffsetY),
Text = text,
Single = single,
ValueIndex = valueIndex,
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index 047e22476..8d0ed43b9 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -165,7 +165,7 @@ namespace FlaxEditor.Surface
{
if (Surface == null)
return;
- Size = CalculateNodeSize(width, height);
+ Size = CalculateNodeSize(width, height);
// Update boxes on width change
//if (!Mathf.NearEqual(prevSize.X, Size.X))
@@ -180,6 +180,109 @@ namespace FlaxEditor.Surface
}
}
+ private Float2 GetBoxControlWidthHeight(Control control, Font boxLabelFont)
+ {
+ float boxWidth = 0;
+ float boxHeight = 0;
+
+ if (control is InputBox inputBox)
+ {
+ boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 20;
+ if (inputBox.DefaultValueEditor != null)
+ boxWidth += inputBox.DefaultValueEditor.Width + 4;
+ boxHeight = inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
+ }
+ else if (control is OutputBox outputBox)
+ {
+ boxWidth = boxLabelFont.MeasureText(outputBox.Text).X + 20;
+ boxHeight = outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
+ }
+ else if (control is Control defaultControl)
+ {
+ if (defaultControl.AnchorPreset == AnchorPresets.TopLeft)
+ {
+ boxWidth = defaultControl.Right + 4 - Constants.NodeMarginX;
+ boxHeight = defaultControl.Bottom + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize;
+ }
+ else
+ {
+ boxWidth = defaultControl.Width + 4;
+ boxHeight = defaultControl.Height + 4;
+ }
+ }
+
+ return new Float2(boxWidth, boxHeight);
+ }
+
+ public ContainerControl HACK = null;
+
+ private Float2 CompareAndGetNewCollisionSize(Rectangle rect1, Rectangle rect2, float collisionWidth, float collisionHeight)
+ {
+ Rectangle sharedArea;
+ Rectangle.Shared(ref rect1, ref rect2, out sharedArea);
+
+ Color colliderColor = Color.Chocolate;
+ colliderColor.A = 0.1f;
+ Panel colliderPanel = new Panel
+ {
+ BackgroundColor = colliderColor,
+ Location = sharedArea.Location,
+ Size = sharedArea.Size,
+ Parent = HACK
+ };
+
+ return new Float2(Mathf.Max(collisionWidth, sharedArea.Width + 4), Mathf.Max(collisionHeight, sharedArea.Height + 4));
+ }
+
+ private Float2 CalculateCollisionSize(List controls, Font boxLabelFont)
+ {
+ List colliderRectangles = new List();
+ int controlsCount = controls.Count;
+ for (int i = 0; i < controlsCount; i++)
+ {
+ var control = controls[i];
+ if (!control.Visible || control is Panel panel)
+ continue;
+
+ Float2 boxSize = GetBoxControlWidthHeight(control, boxLabelFont);
+
+ Rectangle controlRect = new Rectangle(control.X, control.Y, boxSize.X, boxSize.Y);
+ colliderRectangles.Add(controlRect);
+
+ Color colliderColor = Style.Current.BackgroundSelected;
+ colliderColor.A = 0.25f;
+ Panel colliderPanel = new Panel
+ {
+ BackgroundColor = colliderColor,
+ Location = controlRect.Location,
+ Size = controlRect.Size,
+ Parent = HACK
+ };
+ }
+
+ float collisionWidth = 0;
+ float collisionHeight = 0;
+ for (int i = 0; i < colliderRectangles.Count; i++)
+ {
+ for (int j = 0; j < colliderRectangles.Count; j++)
+ {
+ if (i == j)
+ {
+ continue;
+ }
+
+ Rectangle rect1 = colliderRectangles[i];
+ Rectangle rect2 = colliderRectangles[j];
+ Float2 newCollisionSize = CompareAndGetNewCollisionSize(rect1, rect2, collisionWidth, collisionHeight);
+
+ collisionWidth = newCollisionSize.X;
+ collisionHeight = newCollisionSize.Y;
+ }
+ }
+
+ return new Float2(collisionWidth, collisionHeight);
+ }
+
///
/// Automatically resizes the node to match the title size and all the elements for best fit of the node dimensions.
///
@@ -187,6 +290,7 @@ namespace FlaxEditor.Surface
{
if (Surface == null)
return;
+ HACK = this;
var width = 0.0f;
var height = 0.0f;
var leftHeight = 0.0f;
@@ -195,44 +299,75 @@ namespace FlaxEditor.Surface
var rightWidth = 40.0f;
var boxLabelFont = Style.Current.FontSmall;
var titleLabelFont = Style.Current.FontLarge;
- for (int i = 0; i < Children.Count; i++)
+ int childrenCount = Children.Count;
+ for (int i = 0; i < childrenCount; i++)
{
var child = Children[i];
+ if (child is Panel panel)
+ {
+ panel.Visible = false;
+ }
if (!child.Visible)
continue;
+
+ Float2 boxSize = GetBoxControlWidthHeight(child, boxLabelFont);
if (child is InputBox inputBox)
{
- var boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 20;
- if (inputBox.DefaultValueEditor != null)
- boxWidth += inputBox.DefaultValueEditor.Width + 4;
- leftWidth = Mathf.Max(leftWidth, boxWidth);
- leftHeight = Mathf.Max(leftHeight, inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f);
+ leftWidth = Mathf.Max(leftWidth, boxSize.X);
+ leftHeight = Mathf.Max(leftHeight, boxSize.Y);
}
else if (child is OutputBox outputBox)
{
- rightWidth = Mathf.Max(rightWidth, boxLabelFont.MeasureText(outputBox.Text).X + 20);
- rightHeight = Mathf.Max(rightHeight, outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f);
+ rightWidth = Mathf.Max(rightWidth, boxSize.X);
+ rightHeight = Mathf.Max(rightHeight, boxSize.Y);
}
- else if (child is Control control)
+ else
{
- if (control.AnchorPreset == AnchorPresets.TopLeft)
- {
- width = Mathf.Max(width, control.Right + 4 - Constants.NodeMarginX);
- height = Mathf.Max(height, control.Bottom + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize);
- }
- else
- {
- width = Mathf.Max(width, control.Width + 4);
- height = Mathf.Max(height, control.Height + 4);
- }
+ width = Mathf.Max(width, boxSize.X);
+ height = Mathf.Max(height, boxSize.Y);
}
}
+ Debug.Log(Title);
+ Float2 collisionSize = CalculateCollisionSize(Children, boxLabelFont);
+ Debug.Log(collisionSize.ToString());
+ //width += collisionSize.X;
+ //height += collisionSize.Y;
+
width = Mathf.Max(width, leftWidth + rightWidth + 10);
width = Mathf.Max(width, titleLabelFont.MeasureText(Title).X + 30);
height = Mathf.Max(height, Mathf.Max(leftHeight, rightHeight));
- Resize(width, height);
+
+ Float2 roundedSize = VisjectSurface.RoundToGrid(new Float2(width, height), true);
+ Resize(roundedSize.X, roundedSize.Y);
}
+ /* if (child is InputBox inputBox)
+{
+ var boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 20;
+ if (inputBox.DefaultValueEditor != null)
+ boxWidth += inputBox.DefaultValueEditor.Width + 4;
+ leftWidth = Mathf.Max(leftWidth, boxWidth);
+ leftHeight = Mathf.Max(leftHeight, inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f);
+}
+else if (child is OutputBox outputBox)
+{
+ rightWidth = Mathf.Max(rightWidth, boxLabelFont.MeasureText(outputBox.Text).X + 20);
+ rightHeight = Mathf.Max(rightHeight, outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f);
+}
+else if (child is Control control)
+{
+ if (control.AnchorPreset == AnchorPresets.TopLeft)
+ {
+ width = Mathf.Max(width, control.Right + 4 - Constants.NodeMarginX);
+ height = Mathf.Max(height, control.Bottom + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize);
+ }
+ else
+ {
+ width = Mathf.Max(width, control.Width + 4);
+ height = Mathf.Max(height, control.Height + 4);
+ }
+}*/
+
///
/// Creates an element from the archetype and adds the element to the node.
///
@@ -310,6 +445,9 @@ namespace FlaxEditor.Surface
Elements.Add(element);
if (element is Control control)
AddChild(control);
+
+ if (!(element is Panel panel))
+ ResizeAuto();
}
///
From 081ef1fd81fd32a9aaa3fd97b86cde9e6a9692e8 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Mon, 25 Sep 2023 14:20:35 -0400
Subject: [PATCH 014/114] More debug draws. It seems to be showing some weird
issues with leftWidth/rightWidth size.
---
Source/Editor/Surface/SurfaceNode.cs | 135 +++++++++++++++++++++++++--
Source/Engine/Core/Config.Gen.h | 3 +
2 files changed, 129 insertions(+), 9 deletions(-)
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index 8d0ed43b9..d6275e439 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -223,19 +223,21 @@ namespace FlaxEditor.Surface
Color colliderColor = Color.Chocolate;
colliderColor.A = 0.1f;
- Panel colliderPanel = new Panel
+ /*Panel colliderPanel = new Panel
{
BackgroundColor = colliderColor,
Location = sharedArea.Location,
Size = sharedArea.Size,
Parent = HACK
- };
+ };*/
return new Float2(Mathf.Max(collisionWidth, sharedArea.Width + 4), Mathf.Max(collisionHeight, sharedArea.Height + 4));
}
private Float2 CalculateCollisionSize(List controls, Font boxLabelFont)
{
+ Debug.Log(string.Format("{0}:", Title));
+
List colliderRectangles = new List();
int controlsCount = controls.Count;
for (int i = 0; i < controlsCount; i++)
@@ -244,20 +246,98 @@ namespace FlaxEditor.Surface
if (!control.Visible || control is Panel panel)
continue;
- Float2 boxSize = GetBoxControlWidthHeight(control, boxLabelFont);
+ Debug.Log(string.Format("\t{0}:", control.GetType().ToString()));
+ Debug.Log(string.Format("\t\tControl Bounds: {0}", control.Bounds));
+ /*Color colliderColor2 = Color.Crimson;
+ colliderColor2.A = 0.25f;
+ new Panel
+ {
+ BackgroundColor = colliderColor2,
+ Location = control.Bounds.Location,
+ Size = control.Bounds.Size,
+ Parent = HACK
+ };
- Rectangle controlRect = new Rectangle(control.X, control.Y, boxSize.X, boxSize.Y);
+ if (control is InputBox inputBox2)
+ {
+ Rectangle textRect;
+ textRect.Size = boxLabelFont.MeasureText(inputBox2.Text);
+ textRect.Location = new Float2(control.Bounds.Location.X + 24, control.Bounds.Location.Y);
+ Debug.Log(string.Format("\t\tText Rectangle: {0}", textRect));
+
+ Color colliderColor3 = Color.ForestGreen;
+ colliderColor3.A = 0.25f;
+ new Panel
+ {
+ BackgroundColor = colliderColor3,
+ Location = textRect.Location,
+ Size = textRect.Size,
+ Parent = HACK
+ };
+ }
+
+ if (control is OutputBox outputBox2)
+ {
+ Rectangle textRect;
+ textRect.Size = boxLabelFont.MeasureText(outputBox2.Text);
+ textRect.Location = new Float2(control.Bounds.Location.X - textRect.Size.X - 2, control.Bounds.Location.Y);
+ Debug.Log(string.Format("\t\tText Rectangle: {0}", textRect));
+
+ Color colliderColor3 = Color.ForestGreen;
+ colliderColor3.A = 0.25f;
+ new Panel
+ {
+ BackgroundColor = colliderColor3,
+ Location = textRect.Location,
+ Size = textRect.Size,
+ Parent = HACK
+ };
+ }*/
+
+
+
+
+
+ Float2 boxSize = GetBoxControlWidthHeight(control, boxLabelFont);
+ Float2 boxPosition = control.Location;
+
+ // Special condition handling that is different than `GetBoxControlWidthHeight`
+ if (control is OutputBox outputBox)
+ {
+ boxPosition.X -= boxLabelFont.MeasureText(outputBox.Text).X;
+ boxSize.X = boxLabelFont.MeasureText(outputBox.Text).X + 20;
+ boxSize.Y = Mathf.Max(boxLabelFont.MeasureText(outputBox.Text).Y, outputBox.Height) + 4;
+ } else if (control is InputBox inputBox)
+ {
+ boxSize.X = boxLabelFont.MeasureText(inputBox.Text).X + 20;
+ boxSize.Y = Mathf.Max(boxLabelFont.MeasureText(inputBox.Text).Y, inputBox.Height) + 4;
+ } else
+ {
+ if (control.AnchorPreset == AnchorPresets.TopLeft)
+ {
+ boxSize.X = control.Right + 4 - Constants.NodeMarginX;
+ boxSize.Y = control.Bottom - control.Top + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize;
+ boxPosition.Y = control.Top;
+ }
+ else
+ {
+ boxSize.X = control.Width + 4;
+ boxSize.Y = control.Height + 4;
+ }
+ }
+
+ Rectangle controlRect = new Rectangle(boxPosition.X, boxPosition.Y, boxSize.X, boxSize.Y);
colliderRectangles.Add(controlRect);
Color colliderColor = Style.Current.BackgroundSelected;
colliderColor.A = 0.25f;
- Panel colliderPanel = new Panel
+ /*Panel colliderPanel = new Panel
{
BackgroundColor = colliderColor,
Location = controlRect.Location,
Size = controlRect.Size,
Parent = HACK
- };
+ };*/
}
float collisionWidth = 0;
@@ -283,6 +363,13 @@ namespace FlaxEditor.Surface
return new Float2(collisionWidth, collisionHeight);
}
+ //HACK
+ private Color alphainator(Color color, float alpha)
+ {
+ color.A = alpha;
+ return color;
+ }
+
///
/// Automatically resizes the node to match the title size and all the elements for best fit of the node dimensions.
///
@@ -336,9 +423,39 @@ namespace FlaxEditor.Surface
width = Mathf.Max(width, leftWidth + rightWidth + 10);
width = Mathf.Max(width, titleLabelFont.MeasureText(Title).X + 30);
height = Mathf.Max(height, Mathf.Max(leftHeight, rightHeight));
-
- Float2 roundedSize = VisjectSurface.RoundToGrid(new Float2(width, height), true);
- Resize(roundedSize.X, roundedSize.Y);
+
+ new Panel
+ {
+ BackgroundColor = alphainator(Color.Azure, 0.25f),
+ Size = new Float2(leftWidth, height),
+ AnchorPreset = AnchorPresets.TopLeft,
+ Location = new Float2(4f, Constants.NodeHeaderSize + 4),
+ Parent = HACK
+ };
+
+ new Panel
+ {
+ BackgroundColor = alphainator(Color.Crimson, 0.25f),
+ Size = new Float2(rightWidth, height),
+ AnchorPreset = AnchorPresets.TopRight,
+ Location = new Float2(-4-rightWidth, Constants.NodeHeaderSize + 4),
+ Parent = HACK
+ };
+
+ /*Rectangle testRect = Rectangle.Default;
+ testRect.Width = width;
+ testRect.Height = height;
+ testRect.Y += 10; // ra
+ new Panel
+ {
+ BackgroundColor = colliderColor,
+ Location = testRect.Location,
+ Size = testRect.Size,
+ Parent = HACK
+ };*/
+
+ Float2 roundedSize = VisjectSurface.RoundToGrid(new Float2(width, height), ceil: true);
+ //Resize(roundedSize.X, roundedSize.Y);
}
/* if (child is InputBox inputBox)
diff --git a/Source/Engine/Core/Config.Gen.h b/Source/Engine/Core/Config.Gen.h
index 6f70f09be..81c149108 100644
--- a/Source/Engine/Core/Config.Gen.h
+++ b/Source/Engine/Core/Config.Gen.h
@@ -1 +1,4 @@
#pragma once
+
+#define COMPILE_WITH_DEV_ENV 0
+#define OFFICIAL_BUILD 1
From d9f3fe186d03716ac3fc7a3d73036a27ae3851dc Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Mon, 2 Oct 2023 00:13:29 -0400
Subject: [PATCH 015/114] Implement function to properly get the size of the
value editor for an InputBox.
---
Source/Editor/Surface/Elements/InputBox.cs | 30 ++++++
Source/Editor/Surface/SurfaceNode.cs | 113 +++++++--------------
2 files changed, 64 insertions(+), 79 deletions(-)
diff --git a/Source/Editor/Surface/Elements/InputBox.cs b/Source/Editor/Surface/Elements/InputBox.cs
index 4eac03105..5b0a43ca9 100644
--- a/Source/Editor/Surface/Elements/InputBox.cs
+++ b/Source/Editor/Surface/Elements/InputBox.cs
@@ -1652,5 +1652,35 @@ namespace FlaxEditor.Surface.Elements
}
}
}
+
+ ///
+ /// Get the size of the value editor for this box.
+ ///
+ /// The size of the value editor for this box.
+ public Float2 GetValueEditorSize()
+ {
+ if (!HasValue)
+ return Float2.Zero;
+
+ if (_defaultValueEditor != null)
+ return _defaultValueEditor.Bounds.Size;
+
+ for (int i = 0; i < DefaultValueEditors.Count; i++)
+ {
+ if (DefaultValueEditors[i].CanUse(this, ref _currentType))
+ {
+ var bounds = new Rectangle(X + Width + 8 + Style.Current.FontSmall.MeasureText(Text).X, Y, 90, Height);
+ _editor = DefaultValueEditors[i];
+
+ // TODO: Find a better way to evaluate the size than using existing create code to resolve the size for each editor type.
+ var tempEditor = _editor.Create(this, ref bounds);
+ Float2 editorSize = tempEditor.Size;
+ tempEditor.Dispose();
+ return editorSize;
+ }
+ }
+
+ return Float2.Zero;
+ }
}
}
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index d6275e439..c18698890 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -180,40 +180,6 @@ namespace FlaxEditor.Surface
}
}
- private Float2 GetBoxControlWidthHeight(Control control, Font boxLabelFont)
- {
- float boxWidth = 0;
- float boxHeight = 0;
-
- if (control is InputBox inputBox)
- {
- boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 20;
- if (inputBox.DefaultValueEditor != null)
- boxWidth += inputBox.DefaultValueEditor.Width + 4;
- boxHeight = inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
- }
- else if (control is OutputBox outputBox)
- {
- boxWidth = boxLabelFont.MeasureText(outputBox.Text).X + 20;
- boxHeight = outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
- }
- else if (control is Control defaultControl)
- {
- if (defaultControl.AnchorPreset == AnchorPresets.TopLeft)
- {
- boxWidth = defaultControl.Right + 4 - Constants.NodeMarginX;
- boxHeight = defaultControl.Bottom + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize;
- }
- else
- {
- boxWidth = defaultControl.Width + 4;
- boxHeight = defaultControl.Height + 4;
- }
- }
-
- return new Float2(boxWidth, boxHeight);
- }
-
public ContainerControl HACK = null;
private Float2 CompareAndGetNewCollisionSize(Rectangle rect1, Rectangle rect2, float collisionWidth, float collisionHeight)
@@ -370,6 +336,39 @@ namespace FlaxEditor.Surface
return color;
}
+ private Float2 GetBoxControlWidthHeight(Control control, Font boxLabelFont)
+ {
+ float boxWidth = 0;
+ float boxHeight = 0;
+
+ if (control is InputBox inputBox)
+ {
+ boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 24;
+ boxWidth += inputBox.GetValueEditorSize().X + 8;
+ boxHeight = inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
+ }
+ else if (control is OutputBox outputBox)
+ {
+ boxWidth = boxLabelFont.MeasureText(outputBox.Text).X + 24;
+ boxHeight = outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
+ }
+ else if (control is Control defaultControl)
+ {
+ if (defaultControl.AnchorPreset == AnchorPresets.TopLeft)
+ {
+ boxWidth = defaultControl.Right + 4 - Constants.NodeMarginX;
+ boxHeight = defaultControl.Bottom + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize;
+ }
+ else
+ {
+ boxWidth = defaultControl.Width + 4;
+ boxHeight = defaultControl.Height + 4;
+ }
+ }
+
+ return new Float2(boxWidth, boxHeight);
+ }
+
///
/// Automatically resizes the node to match the title size and all the elements for best fit of the node dimensions.
///
@@ -414,11 +413,6 @@ namespace FlaxEditor.Surface
height = Mathf.Max(height, boxSize.Y);
}
}
- Debug.Log(Title);
- Float2 collisionSize = CalculateCollisionSize(Children, boxLabelFont);
- Debug.Log(collisionSize.ToString());
- //width += collisionSize.X;
- //height += collisionSize.Y;
width = Mathf.Max(width, leftWidth + rightWidth + 10);
width = Mathf.Max(width, titleLabelFont.MeasureText(Title).X + 30);
@@ -442,49 +436,10 @@ namespace FlaxEditor.Surface
Parent = HACK
};
- /*Rectangle testRect = Rectangle.Default;
- testRect.Width = width;
- testRect.Height = height;
- testRect.Y += 10; // ra
- new Panel
- {
- BackgroundColor = colliderColor,
- Location = testRect.Location,
- Size = testRect.Size,
- Parent = HACK
- };*/
-
Float2 roundedSize = VisjectSurface.RoundToGrid(new Float2(width, height), ceil: true);
- //Resize(roundedSize.X, roundedSize.Y);
+ Resize(roundedSize.X, roundedSize.Y);
}
- /* if (child is InputBox inputBox)
-{
- var boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 20;
- if (inputBox.DefaultValueEditor != null)
- boxWidth += inputBox.DefaultValueEditor.Width + 4;
- leftWidth = Mathf.Max(leftWidth, boxWidth);
- leftHeight = Mathf.Max(leftHeight, inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f);
-}
-else if (child is OutputBox outputBox)
-{
- rightWidth = Mathf.Max(rightWidth, boxLabelFont.MeasureText(outputBox.Text).X + 20);
- rightHeight = Mathf.Max(rightHeight, outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f);
-}
-else if (child is Control control)
-{
- if (control.AnchorPreset == AnchorPresets.TopLeft)
- {
- width = Mathf.Max(width, control.Right + 4 - Constants.NodeMarginX);
- height = Mathf.Max(height, control.Bottom + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize);
- }
- else
- {
- width = Mathf.Max(width, control.Width + 4);
- height = Mathf.Max(height, control.Height + 4);
- }
-}*/
-
///
/// Creates an element from the archetype and adds the element to the node.
///
From 8ba1878657ad161aec5f9c80db6c25ac7efdf8b0 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Mon, 2 Oct 2023 00:18:16 -0400
Subject: [PATCH 016/114] Cleanup Logs.
---
Source/Editor/Surface/SurfaceNode.cs | 176 ---------------------------
1 file changed, 176 deletions(-)
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index c18698890..763f82fdb 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -180,162 +180,6 @@ namespace FlaxEditor.Surface
}
}
- public ContainerControl HACK = null;
-
- private Float2 CompareAndGetNewCollisionSize(Rectangle rect1, Rectangle rect2, float collisionWidth, float collisionHeight)
- {
- Rectangle sharedArea;
- Rectangle.Shared(ref rect1, ref rect2, out sharedArea);
-
- Color colliderColor = Color.Chocolate;
- colliderColor.A = 0.1f;
- /*Panel colliderPanel = new Panel
- {
- BackgroundColor = colliderColor,
- Location = sharedArea.Location,
- Size = sharedArea.Size,
- Parent = HACK
- };*/
-
- return new Float2(Mathf.Max(collisionWidth, sharedArea.Width + 4), Mathf.Max(collisionHeight, sharedArea.Height + 4));
- }
-
- private Float2 CalculateCollisionSize(List controls, Font boxLabelFont)
- {
- Debug.Log(string.Format("{0}:", Title));
-
- List colliderRectangles = new List();
- int controlsCount = controls.Count;
- for (int i = 0; i < controlsCount; i++)
- {
- var control = controls[i];
- if (!control.Visible || control is Panel panel)
- continue;
-
- Debug.Log(string.Format("\t{0}:", control.GetType().ToString()));
- Debug.Log(string.Format("\t\tControl Bounds: {0}", control.Bounds));
- /*Color colliderColor2 = Color.Crimson;
- colliderColor2.A = 0.25f;
- new Panel
- {
- BackgroundColor = colliderColor2,
- Location = control.Bounds.Location,
- Size = control.Bounds.Size,
- Parent = HACK
- };
-
- if (control is InputBox inputBox2)
- {
- Rectangle textRect;
- textRect.Size = boxLabelFont.MeasureText(inputBox2.Text);
- textRect.Location = new Float2(control.Bounds.Location.X + 24, control.Bounds.Location.Y);
- Debug.Log(string.Format("\t\tText Rectangle: {0}", textRect));
-
- Color colliderColor3 = Color.ForestGreen;
- colliderColor3.A = 0.25f;
- new Panel
- {
- BackgroundColor = colliderColor3,
- Location = textRect.Location,
- Size = textRect.Size,
- Parent = HACK
- };
- }
-
- if (control is OutputBox outputBox2)
- {
- Rectangle textRect;
- textRect.Size = boxLabelFont.MeasureText(outputBox2.Text);
- textRect.Location = new Float2(control.Bounds.Location.X - textRect.Size.X - 2, control.Bounds.Location.Y);
- Debug.Log(string.Format("\t\tText Rectangle: {0}", textRect));
-
- Color colliderColor3 = Color.ForestGreen;
- colliderColor3.A = 0.25f;
- new Panel
- {
- BackgroundColor = colliderColor3,
- Location = textRect.Location,
- Size = textRect.Size,
- Parent = HACK
- };
- }*/
-
-
-
-
-
- Float2 boxSize = GetBoxControlWidthHeight(control, boxLabelFont);
- Float2 boxPosition = control.Location;
-
- // Special condition handling that is different than `GetBoxControlWidthHeight`
- if (control is OutputBox outputBox)
- {
- boxPosition.X -= boxLabelFont.MeasureText(outputBox.Text).X;
- boxSize.X = boxLabelFont.MeasureText(outputBox.Text).X + 20;
- boxSize.Y = Mathf.Max(boxLabelFont.MeasureText(outputBox.Text).Y, outputBox.Height) + 4;
- } else if (control is InputBox inputBox)
- {
- boxSize.X = boxLabelFont.MeasureText(inputBox.Text).X + 20;
- boxSize.Y = Mathf.Max(boxLabelFont.MeasureText(inputBox.Text).Y, inputBox.Height) + 4;
- } else
- {
- if (control.AnchorPreset == AnchorPresets.TopLeft)
- {
- boxSize.X = control.Right + 4 - Constants.NodeMarginX;
- boxSize.Y = control.Bottom - control.Top + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize;
- boxPosition.Y = control.Top;
- }
- else
- {
- boxSize.X = control.Width + 4;
- boxSize.Y = control.Height + 4;
- }
- }
-
- Rectangle controlRect = new Rectangle(boxPosition.X, boxPosition.Y, boxSize.X, boxSize.Y);
- colliderRectangles.Add(controlRect);
-
- Color colliderColor = Style.Current.BackgroundSelected;
- colliderColor.A = 0.25f;
- /*Panel colliderPanel = new Panel
- {
- BackgroundColor = colliderColor,
- Location = controlRect.Location,
- Size = controlRect.Size,
- Parent = HACK
- };*/
- }
-
- float collisionWidth = 0;
- float collisionHeight = 0;
- for (int i = 0; i < colliderRectangles.Count; i++)
- {
- for (int j = 0; j < colliderRectangles.Count; j++)
- {
- if (i == j)
- {
- continue;
- }
-
- Rectangle rect1 = colliderRectangles[i];
- Rectangle rect2 = colliderRectangles[j];
- Float2 newCollisionSize = CompareAndGetNewCollisionSize(rect1, rect2, collisionWidth, collisionHeight);
-
- collisionWidth = newCollisionSize.X;
- collisionHeight = newCollisionSize.Y;
- }
- }
-
- return new Float2(collisionWidth, collisionHeight);
- }
-
- //HACK
- private Color alphainator(Color color, float alpha)
- {
- color.A = alpha;
- return color;
- }
-
private Float2 GetBoxControlWidthHeight(Control control, Font boxLabelFont)
{
float boxWidth = 0;
@@ -376,7 +220,6 @@ namespace FlaxEditor.Surface
{
if (Surface == null)
return;
- HACK = this;
var width = 0.0f;
var height = 0.0f;
var leftHeight = 0.0f;
@@ -417,25 +260,6 @@ namespace FlaxEditor.Surface
width = Mathf.Max(width, leftWidth + rightWidth + 10);
width = Mathf.Max(width, titleLabelFont.MeasureText(Title).X + 30);
height = Mathf.Max(height, Mathf.Max(leftHeight, rightHeight));
-
- new Panel
- {
- BackgroundColor = alphainator(Color.Azure, 0.25f),
- Size = new Float2(leftWidth, height),
- AnchorPreset = AnchorPresets.TopLeft,
- Location = new Float2(4f, Constants.NodeHeaderSize + 4),
- Parent = HACK
- };
-
- new Panel
- {
- BackgroundColor = alphainator(Color.Crimson, 0.25f),
- Size = new Float2(rightWidth, height),
- AnchorPreset = AnchorPresets.TopRight,
- Location = new Float2(-4-rightWidth, Constants.NodeHeaderSize + 4),
- Parent = HACK
- };
-
Float2 roundedSize = VisjectSurface.RoundToGrid(new Float2(width, height), ceil: true);
Resize(roundedSize.X, roundedSize.Y);
}
From 8cf6134f8ba8f6d8fbad87959fb6ce9fd21d28b6 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Mon, 2 Oct 2023 00:34:14 -0400
Subject: [PATCH 017/114] Cleanup.
---
Source/Editor/Surface/NodeArchetype.cs | 45 +------------------
Source/Editor/Surface/NodeElementArchetype.cs | 4 +-
Source/Editor/Surface/SurfaceNode.cs | 8 ++--
Source/Editor/Surface/SurfaceUtils.cs | 4 +-
Source/Editor/Surface/VisjectSurface.Input.cs | 2 +-
.../Windows/Assets/VisualScriptWindow.cs | 2 +-
6 files changed, 10 insertions(+), 55 deletions(-)
diff --git a/Source/Editor/Surface/NodeArchetype.cs b/Source/Editor/Surface/NodeArchetype.cs
index 4582aa054..b1a36ba0a 100644
--- a/Source/Editor/Surface/NodeArchetype.cs
+++ b/Source/Editor/Surface/NodeArchetype.cs
@@ -1,11 +1,8 @@
// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
-using System.Collections.Generic;
-using System.Linq;
using FlaxEditor.Scripting;
using FlaxEngine;
-using FlaxEngine.GUI;
namespace FlaxEditor.Surface
{
@@ -181,50 +178,10 @@ namespace FlaxEditor.Surface
///
public Func DependentBoxFilter;
- private NodeElementArchetype[] _elements;
///
/// Array with default elements descriptions.
///
- public NodeElementArchetype[] Elements
- {
- get
- {
- return _elements;
- }
- set
- {
- _elements = value;
-
- /*Float2 topLeft = Float2.Zero;
- Float2 bottomRight = Float2.Zero;
- List textRectangles = new List();
-
- foreach (NodeElementArchetype nodeElementType in _elements)
- {
- bool isInputElement = nodeElementType.Type == NodeElementType.Input;
- bool isOutputElement = nodeElementType.Type == NodeElementType.Output;
- if (isInputElement)
- {
- // Text will be to the right
- }
-
- // In case of negatives.. most likely not needed.
- topLeft.X = Math.Min(topLeft.X, nodeElementType.Position.X);
- topLeft.Y = Math.Min(topLeft.Y, nodeElementType.Position.Y);
-
- bottomRight.X = Math.Max(bottomRight.X, nodeElementType.Position.X + nodeElementType.Size.X);
- bottomRight.Y = Math.Max(bottomRight.Y, nodeElementType.Position.Y + nodeElementType.Size.Y);
- }
-
- float paddingConst = 15;
-
- float sizeXElements = bottomRight.X - topLeft.X + paddingConst;
- float sizeYElements = bottomRight.Y - topLeft.Y + paddingConst;
- float titleSize = Style.Current.FontLarge.MeasureText(Title).X + paddingConst;
-
- Size = new Float2(Math.Max(sizeXElements, titleSize), sizeYElements);*/
- }
- }
+ public NodeElementArchetype[] Elements;
///
/// Tries to parse some text and extract the data from it.
diff --git a/Source/Editor/Surface/NodeElementArchetype.cs b/Source/Editor/Surface/NodeElementArchetype.cs
index 298127c3a..be8b67378 100644
--- a/Source/Editor/Surface/NodeElementArchetype.cs
+++ b/Source/Editor/Surface/NodeElementArchetype.cs
@@ -132,8 +132,8 @@ namespace FlaxEditor.Surface
{
Type = NodeElementType.Input,
Position = new Float2(
- Constants.NodeMarginX - Constants.BoxOffsetX,
- Constants.NodeMarginY + Constants.NodeHeaderSize + yLevel * Constants.LayoutOffsetY),
+ Constants.NodeMarginX - Constants.BoxOffsetX,
+ Constants.NodeMarginY + Constants.NodeHeaderSize + yLevel * Constants.LayoutOffsetY),
Text = text,
Single = single,
ValueIndex = valueIndex,
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index 763f82fdb..67fd7a308 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -165,7 +165,7 @@ namespace FlaxEditor.Surface
{
if (Surface == null)
return;
- Size = CalculateNodeSize(width, height);
+ Size = CalculateNodeSize(width, height);
// Update boxes on width change
//if (!Mathf.NearEqual(prevSize.X, Size.X))
@@ -228,8 +228,7 @@ namespace FlaxEditor.Surface
var rightWidth = 40.0f;
var boxLabelFont = Style.Current.FontSmall;
var titleLabelFont = Style.Current.FontLarge;
- int childrenCount = Children.Count;
- for (int i = 0; i < childrenCount; i++)
+ for (int i = 0; i < Children.Count; i++)
{
var child = Children[i];
if (child is Panel panel)
@@ -342,8 +341,7 @@ namespace FlaxEditor.Surface
if (element is Control control)
AddChild(control);
- if (!(element is Panel panel))
- ResizeAuto();
+ ResizeAuto(); // Resize when an element is added to avoid hardcoded sizes.
}
///
diff --git a/Source/Editor/Surface/SurfaceUtils.cs b/Source/Editor/Surface/SurfaceUtils.cs
index f5ca394fb..b8563220d 100644
--- a/Source/Editor/Surface/SurfaceUtils.cs
+++ b/Source/Editor/Surface/SurfaceUtils.cs
@@ -1,4 +1,4 @@
-// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
+ // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
@@ -13,8 +13,8 @@ using FlaxEditor.Utilities;
using FlaxEngine.Utilities;
using FlaxEngine;
using FlaxEditor.GUI;
-using FlaxEditor.Options;
using FlaxEngine.GUI;
+using FlaxEditor.Options;
namespace FlaxEditor.Surface
{
diff --git a/Source/Editor/Surface/VisjectSurface.Input.cs b/Source/Editor/Surface/VisjectSurface.Input.cs
index 0b664768d..a250d4df7 100644
--- a/Source/Editor/Surface/VisjectSurface.Input.cs
+++ b/Source/Editor/Surface/VisjectSurface.Input.cs
@@ -197,7 +197,7 @@ namespace FlaxEditor.Surface
Float2 pointToRound = point;
pointToRound.X = round(pointToRound.X);
pointToRound.Y = round(pointToRound.Y);
-
+
return pointToRound;
}
diff --git a/Source/Editor/Windows/Assets/VisualScriptWindow.cs b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
index 3b6480063..075c127d4 100644
--- a/Source/Editor/Windows/Assets/VisualScriptWindow.cs
+++ b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
@@ -597,7 +597,7 @@ namespace FlaxEditor.Windows.Assets
_propertiesEditor.Select(_properties);
// Toolstrip
- SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo,
+ SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo,
Save, ShowWholeGraph, ToggleGridSnap, InputActions,
out _saveButton, out _undoButton, out _redoButton, out _gridSnapButton);
From 1b12ccd1801f49346db0078e05e1d08cca371b7c Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Mon, 2 Oct 2023 00:36:07 -0400
Subject: [PATCH 018/114] Remove extra spacing on copyright notice.
---
Source/Editor/Surface/SurfaceUtils.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Surface/SurfaceUtils.cs b/Source/Editor/Surface/SurfaceUtils.cs
index b8563220d..408baca57 100644
--- a/Source/Editor/Surface/SurfaceUtils.cs
+++ b/Source/Editor/Surface/SurfaceUtils.cs
@@ -1,4 +1,4 @@
- // Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
+// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
using System;
using System.Collections.Generic;
From 075da663442b940e1477ea47629a2080d657790d Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Tue, 10 Oct 2023 12:46:49 -0400
Subject: [PATCH 019/114] I am not a C# compiler.
---
Source/Editor/Surface/SurfaceNode.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index 4ed6078f7..f2d1a9b1c 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -248,12 +248,12 @@ namespace FlaxEditor.Surface
}
else
{
- if (control.AnchorPreset == AnchorPresets.TopLeft)
+ if (child.AnchorPreset == AnchorPresets.TopLeft)
{
width = Mathf.Max(width, boxSize.X);
height = Mathf.Max(height, boxSize.Y);
}
- else if (!_headerRect.Intersects(control.Bounds))
+ else if (!_headerRect.Intersects(child.Bounds))
{
width = Mathf.Max(width, boxSize.X);
height = Mathf.Max(height, boxSize.Y);
From 6af9df79b2b98d2b84cbdc477d6d4f2d35061ab4 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Tue, 10 Oct 2023 19:11:45 -0400
Subject: [PATCH 020/114] Debug testing..
---
Source/Editor/Surface/SurfaceNode.cs | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index f2d1a9b1c..4e27baf0e 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -187,11 +187,13 @@ namespace FlaxEditor.Surface
boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 24;
boxWidth += inputBox.GetValueEditorSize().X + 8;
boxHeight = inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
+ Debug.Log($"InputBox {control.GetType().Name}: {boxWidth}, {boxHeight}");
}
else if (control is OutputBox outputBox)
{
boxWidth = boxLabelFont.MeasureText(outputBox.Text).X + 24;
boxHeight = outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
+ Debug.Log($"OutputBox {control.GetType().Name}: {boxWidth}, {boxHeight}");
}
else if (control is Control defaultControl)
{
@@ -205,6 +207,10 @@ namespace FlaxEditor.Surface
boxWidth = defaultControl.Width + 4;
boxHeight = defaultControl.Height + 4;
}
+ Debug.Log($"Control {control.GetType().Name}: {boxWidth}, {boxHeight}");
+ } else
+ {
+ Debug.Log($"Control (filtered) {control.GetType().Name}: {boxWidth}, {boxHeight}");
}
return new Float2(boxWidth, boxHeight);
@@ -343,6 +349,7 @@ namespace FlaxEditor.Surface
public void AddElement(ISurfaceNodeElement element)
{
Elements.Add(element);
+ Debug.Log($"Element: {element.Archetype.Type}");
if (element is Control control)
AddChild(control);
From 46e26e63efdf8f622c48ece1223bdf2deca76c1a Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Thu, 12 Oct 2023 13:54:03 -0400
Subject: [PATCH 021/114] Revert auto-resize feature to put in a different
branch.
---
Source/Editor/Surface/Archetypes/Bitwise.cs | 4 +-
Source/Editor/Surface/Archetypes/Material.cs | 2 +-
Source/Editor/Surface/SurfaceNode.cs | 79 ++++----------------
3 files changed, 19 insertions(+), 66 deletions(-)
diff --git a/Source/Editor/Surface/Archetypes/Bitwise.cs b/Source/Editor/Surface/Archetypes/Bitwise.cs
index 058159d48..06f719adc 100644
--- a/Source/Editor/Surface/Archetypes/Bitwise.cs
+++ b/Source/Editor/Surface/Archetypes/Bitwise.cs
@@ -19,7 +19,7 @@ namespace FlaxEditor.Surface.Archetypes
Description = desc,
AlternativeTitles = altTitles,
Flags = NodeFlags.AllGraphs,
- Size = new Float2(160, 20),
+ Size = new Float2(140, 20),
Elements = new[]
{
NodeElementArchetype.Factory.Input(0, "A", true, typeof(int), 0),
@@ -37,7 +37,7 @@ namespace FlaxEditor.Surface.Archetypes
Description = desc,
AlternativeTitles = altTitles,
Flags = NodeFlags.AllGraphs,
- Size = new Float2(160, 40),
+ Size = new Float2(140, 40),
DefaultValues = new object[]
{
0,
diff --git a/Source/Editor/Surface/Archetypes/Material.cs b/Source/Editor/Surface/Archetypes/Material.cs
index 72a780858..b85d1c9d4 100644
--- a/Source/Editor/Surface/Archetypes/Material.cs
+++ b/Source/Editor/Surface/Archetypes/Material.cs
@@ -281,7 +281,7 @@ namespace FlaxEditor.Surface.Archetypes
Title = "Material",
Description = "Main material node",
Flags = NodeFlags.MaterialGraph | NodeFlags.NoRemove | NodeFlags.NoSpawnViaGUI | NodeFlags.NoSpawnViaPaste | NodeFlags.NoCloseButton,
- Size = new Float2(180, 300),
+ Size = new Float2(150, 300),
Elements = new[]
{
NodeElementArchetype.Factory.Input(0, "", true, typeof(void), 0),
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index 4e27baf0e..780ef81f0 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -177,45 +177,6 @@ namespace FlaxEditor.Surface
Size = CalculateNodeSize(width, height);
}
- private Float2 GetBoxControlWidthHeight(Control control, Font boxLabelFont)
- {
- float boxWidth = 0;
- float boxHeight = 0;
-
- if (control is InputBox inputBox)
- {
- boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 24;
- boxWidth += inputBox.GetValueEditorSize().X + 8;
- boxHeight = inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
- Debug.Log($"InputBox {control.GetType().Name}: {boxWidth}, {boxHeight}");
- }
- else if (control is OutputBox outputBox)
- {
- boxWidth = boxLabelFont.MeasureText(outputBox.Text).X + 24;
- boxHeight = outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f;
- Debug.Log($"OutputBox {control.GetType().Name}: {boxWidth}, {boxHeight}");
- }
- else if (control is Control defaultControl)
- {
- if (defaultControl.AnchorPreset == AnchorPresets.TopLeft)
- {
- boxWidth = defaultControl.Right + 4 - Constants.NodeMarginX;
- boxHeight = defaultControl.Bottom + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize;
- }
- else
- {
- boxWidth = defaultControl.Width + 4;
- boxHeight = defaultControl.Height + 4;
- }
- Debug.Log($"Control {control.GetType().Name}: {boxWidth}, {boxHeight}");
- } else
- {
- Debug.Log($"Control (filtered) {control.GetType().Name}: {boxWidth}, {boxHeight}");
- }
-
- return new Float2(boxWidth, boxHeight);
- }
-
///
/// Automatically resizes the node to match the title size and all the elements for best fit of the node dimensions.
///
@@ -234,44 +195,39 @@ namespace FlaxEditor.Surface
for (int i = 0; i < Children.Count; i++)
{
var child = Children[i];
- if (child is Panel panel)
- {
- panel.Visible = false;
- }
if (!child.Visible)
continue;
-
- Float2 boxSize = GetBoxControlWidthHeight(child, boxLabelFont);
if (child is InputBox inputBox)
{
- leftWidth = Mathf.Max(leftWidth, boxSize.X);
- leftHeight = Mathf.Max(leftHeight, boxSize.Y);
+ var boxWidth = boxLabelFont.MeasureText(inputBox.Text).X + 20;
+ if (inputBox.DefaultValueEditor != null)
+ boxWidth += inputBox.DefaultValueEditor.Width + 4;
+ leftWidth = Mathf.Max(leftWidth, boxWidth);
+ leftHeight = Mathf.Max(leftHeight, inputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f);
}
else if (child is OutputBox outputBox)
{
- rightWidth = Mathf.Max(rightWidth, boxSize.X);
- rightHeight = Mathf.Max(rightHeight, boxSize.Y);
+ rightWidth = Mathf.Max(rightWidth, boxLabelFont.MeasureText(outputBox.Text).X + 20);
+ rightHeight = Mathf.Max(rightHeight, outputBox.Archetype.Position.Y - Constants.NodeMarginY - Constants.NodeHeaderSize + 20.0f);
}
- else
+ else if (child is Control control)
{
- if (child.AnchorPreset == AnchorPresets.TopLeft)
+ if (control.AnchorPreset == AnchorPresets.TopLeft)
{
- width = Mathf.Max(width, boxSize.X);
- height = Mathf.Max(height, boxSize.Y);
+ width = Mathf.Max(width, control.Right + 4 - Constants.NodeMarginX);
+ height = Mathf.Max(height, control.Bottom + 4 - Constants.NodeMarginY - Constants.NodeHeaderSize);
}
- else if (!_headerRect.Intersects(child.Bounds))
+ else if (!_headerRect.Intersects(control.Bounds))
{
- width = Mathf.Max(width, boxSize.X);
- height = Mathf.Max(height, boxSize.Y);
+ width = Mathf.Max(width, control.Width + 4);
+ height = Mathf.Max(height, control.Height + 4);
}
}
}
-
width = Mathf.Max(width, leftWidth + rightWidth + 10);
width = Mathf.Max(width, titleLabelFont.MeasureText(Title).X + 30);
height = Mathf.Max(height, Mathf.Max(leftHeight, rightHeight));
- Float2 roundedSize = VisjectSurface.RoundToGrid(new Float2(width, height), ceil: true);
- Resize(roundedSize.X, roundedSize.Y);
+ Resize(width, height);
}
///
@@ -349,11 +305,8 @@ namespace FlaxEditor.Surface
public void AddElement(ISurfaceNodeElement element)
{
Elements.Add(element);
- Debug.Log($"Element: {element.Archetype.Type}");
if (element is Control control)
AddChild(control);
-
- ResizeAuto(); // Resize when an element is added to avoid hardcoded sizes.
}
///
@@ -935,7 +888,7 @@ namespace FlaxEditor.Surface
///
public override bool CanSelect(ref Float2 location)
{
- return _headerRect.MakeOffsetted(Location).Contains(ref location) || new Rectangle(Float2.Zero, Size).MakeOffsetted(Location).Contains(ref location);
+ return _headerRect.MakeOffsetted(Location).Contains(ref location);
}
///
From c9d7498bed0647e35ec5b50656baf7200942b7de Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Thu, 12 Oct 2023 13:57:38 -0400
Subject: [PATCH 022/114] Remove unneeded changes.
---
Source/Editor/Surface/Elements/InputBox.cs | 30 ----------------------
1 file changed, 30 deletions(-)
diff --git a/Source/Editor/Surface/Elements/InputBox.cs b/Source/Editor/Surface/Elements/InputBox.cs
index 5a9f33704..2047bcd1a 100644
--- a/Source/Editor/Surface/Elements/InputBox.cs
+++ b/Source/Editor/Surface/Elements/InputBox.cs
@@ -1652,35 +1652,5 @@ namespace FlaxEditor.Surface.Elements
}
}
}
-
- ///
- /// Get the size of the value editor for this box.
- ///
- /// The size of the value editor for this box.
- public Float2 GetValueEditorSize()
- {
- if (!HasValue)
- return Float2.Zero;
-
- if (_defaultValueEditor != null)
- return _defaultValueEditor.Bounds.Size;
-
- for (int i = 0; i < DefaultValueEditors.Count; i++)
- {
- if (DefaultValueEditors[i].CanUse(this, ref _currentType))
- {
- var bounds = new Rectangle(X + Width + 8 + Style.Current.FontSmall.MeasureText(Text).X, Y, 90, Height);
- _editor = DefaultValueEditors[i];
-
- // TODO: Find a better way to evaluate the size than using existing create code to resolve the size for each editor type.
- var tempEditor = _editor.Create(this, ref bounds);
- Float2 editorSize = tempEditor.Size;
- tempEditor.Dispose();
- return editorSize;
- }
- }
-
- return Float2.Zero;
- }
}
}
From 96ba3832d6d75c801f046c9902f9724076b0e805 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Fri, 10 Nov 2023 10:53:14 -0500
Subject: [PATCH 023/114] Re-add change allowing you to drag anywhere on the
node.
---
Source/Editor/Surface/SurfaceNode.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index 780ef81f0..30ed4b1f3 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -888,7 +888,7 @@ namespace FlaxEditor.Surface
///
public override bool CanSelect(ref Float2 location)
{
- return _headerRect.MakeOffsetted(Location).Contains(ref location);
+ return _headerRect.MakeOffsetted(Location).Contains(ref location) || new Rectangle(Float2.Zero, Size).MakeOffsetted(Location).Contains(ref location); ;
}
///
From f6313b44277dc3e61854108fa0e54e613bc7484c Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Wed, 3 Apr 2024 04:53:11 +0200
Subject: [PATCH 024/114] Extended math lib
added
GetRotacionFromNormal
AlignRotacionToNormalAndSnapToGrid
SnapToRotatedGrid
SnapToRotatedGridWithOffset
---
Source/Engine/Core/Math/Quaternion.cs | 41 ++++++
Source/Engine/Core/Math/Quaternion.h | 21 +++
Source/Engine/Core/Math/Transform.cs | 181 ++++++++++++++++++++++++++
Source/Engine/Core/Math/Transform.h | 71 ++++++++++
Source/Engine/Core/Math/Vector3.cs | 74 +++++++++++
Source/Engine/Core/Math/Vector3.h | 41 ++++++
6 files changed, 429 insertions(+)
diff --git a/Source/Engine/Core/Math/Quaternion.cs b/Source/Engine/Core/Math/Quaternion.cs
index 86a6e4e2d..b69df3969 100644
--- a/Source/Engine/Core/Math/Quaternion.cs
+++ b/Source/Engine/Core/Math/Quaternion.cs
@@ -1479,6 +1479,47 @@ namespace FlaxEngine
return results;
}
+ ///
+ /// Gets rotacion for normal in relation to transform
+ /// Funcion especially created for aligned with axis aligned faces
+ /// use full with
+ ///
+ /// Example code:
+ ///
+ /// GetRotacionFromNormalExample :
+ /// RayOrgin;
+ /// SomeObject;
+ ///
+ /// {
+ /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// {
+ /// position = Hit.Collider.Position;
+ /// transform = Hit.Collider.Transform;
+ /// point = Hit.Point;
+ /// normal = Hit.Normal;
+ /// rot = .GetRotacionFromNormal(normal,transform);
+ /// SomeObject.Position = point;
+ /// SomeObject.Orientation = rot;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ ///
+ /// the normal vector
+ /// relative to
+ /// normal as rotacion
+ public static Quaternion GetRotacionFromNormal(Vector3 InNormal, Transform InRefrenceTransform)
+ {
+ Float3 up = InRefrenceTransform.Up;
+ var dot = Vector3.Dot(InNormal, up);
+ if (Mathf.NearEqual(Math.Abs(dot), 1))
+ {
+ up = InRefrenceTransform.Right;
+ }
+ return Quaternion.LookRotation(InNormal, up);
+ }
+
///
/// Adds two quaternions.
///
diff --git a/Source/Engine/Core/Math/Quaternion.h b/Source/Engine/Core/Math/Quaternion.h
index 0790dcbfb..2f2c538a6 100644
--- a/Source/Engine/Core/Math/Quaternion.h
+++ b/Source/Engine/Core/Math/Quaternion.h
@@ -660,6 +660,27 @@ public:
// @param roll The roll of rotation (in radians)
// @param result When the method completes, contains the newly created quaternion
static void RotationYawPitchRoll(float yaw, float pitch, float roll, Quaternion& result);
+
+
+ ///
+ /// Gets rotacion for normal in relation to transform
+ /// Funcion especially created for aligned with axis aligned faces
+ /// use full with
+ ///
+ /// the normal vector
+ /// relative to
+ /// normal as rotacion
+ static Quaternion GetRotacionFromNormal(const Vector3& InNormal, const Transform& InRefrenceTransform)
+ {
+ Float3 up = InRefrenceTransform.GetUp();
+ auto dot = Vector3::Dot(InNormal, up);
+ if (Math::NearEqual(Math::Abs(dot), 1))
+ {
+ up = InRefrenceTransform.GetRight();
+ }
+ return Quaternion::LookRotation(InNormal, up);
+ }
+
};
///
diff --git a/Source/Engine/Core/Math/Transform.cs b/Source/Engine/Core/Math/Transform.cs
index e00265f6d..844625514 100644
--- a/Source/Engine/Core/Math/Transform.cs
+++ b/Source/Engine/Core/Math/Transform.cs
@@ -477,6 +477,187 @@ namespace FlaxEngine
Quaternion.Slerp(ref start.Orientation, ref end.Orientation, amount, out result.Orientation);
Float3.Lerp(ref start.Scale, ref end.Scale, amount, out result.Scale);
}
+ ///
+ /// combines funcions
+ /// ,
+ ///
+ /// Example code:
+ ///
+ /// AlignRotacionToObjectAndSnapToGridExample :
+ /// Offset = 50.0f;
+ /// GridSize = * 20.0f;
+ /// RayOrgin;
+ /// SomeObject;
+ ///
+ /// {
+ /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// {
+ /// transform = Hit.Collider.Transform;
+ /// point = Hit.Point;
+ /// normal = Hit.Normal;
+ /// SomeObject.Transform = .AlignRotacionToNormalAndSnapToGrid
+ /// (
+ /// point,
+ /// normal,
+ /// Offset,
+ /// transform,
+ /// SomeObject.Scale,
+ /// GridSize
+ /// );
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to applay after snaping
+ /// Normal vector
+ /// Realative transform
+ /// return scale
+ /// InRefrenceTransform
+ /// rotated and snaped transform
+ public static Transform AlignRotacionToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, float InNormalOffset, Transform InRelativeTo, Float3 InReturnScale, Vector3 InGridSize)
+ {
+ Quaternion rot = Quaternion.GetRotacionFromNormal(InNormal, InRelativeTo);
+ return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, new Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
+ }
+ ///
+ /// combines funcions
+ /// ,
+ ///
+ /// Example code:
+ ///
+ /// AlignRotacionToObjectAndSnapToGridExample :
+ /// Offset = 50.0f;
+ /// GridSize = * 20.0f;
+ /// RayOrgin;
+ /// SomeObject;
+ ///
+ /// {
+ /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// {
+ /// transform = Hit.Collider.Transform;
+ /// point = Hit.Point;
+ /// normal = Hit.Normal;
+ /// SomeObject.Transform = .AlignRotacionToNormalAndSnapToGrid
+ /// (
+ /// point,
+ /// normal,
+ /// Offset,
+ /// transform,
+ /// GridSize
+ /// );
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to applay after snaping
+ /// Normal vector
+ /// Realative transform
+ /// InRefrenceTransform
+ /// rotated and snaped transform with scale
+ public static Transform AlignRotacionToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, float InNormalOffset, Transform InRelativeTo, Vector3 InGridSize)
+ {
+ Quaternion rot = Quaternion.GetRotacionFromNormal(InNormal, InRelativeTo);
+ return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, new Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3.One);
+ }
+ ///
+ /// combines funcions
+ /// ,
+ ///
+ /// Example code:
+ ///
+ /// AlignRotacionToObjectAndSnapToGridExample :
+ /// Offset = new Vector3(0, 0, 50f);
+ /// GridSize = * 20.0f;
+ /// RayOrgin;
+ /// SomeObject;
+ ///
+ /// {
+ /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// {
+ /// transform = Hit.Collider.Transform;
+ /// point = Hit.Point;
+ /// normal = Hit.Normal;
+ /// SomeObject.Transform = .AlignRotacionToNormalAndSnapToGrid
+ /// (
+ /// point,
+ /// normal,
+ /// Offset,
+ /// transform,
+ /// SomeObject.Scale,
+ /// GridSize
+ /// );
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to applay after snaping
+ /// Normal vector
+ /// Realative transform
+ /// return scale
+ /// InRefrenceTransform
+ /// rotated and snaped transform
+ public static Transform AlignRotacionToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, Vector3 InNormalOffset, Transform InRelativeTo, Float3 InReturnScale, Vector3 InGridSize)
+ {
+ Quaternion rot = Quaternion.GetRotacionFromNormal(InNormal, InRelativeTo);
+ return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
+ }
+
+ ///
+ /// combines funcions
+ /// ,
+ ///
+ /// Example code:
+ ///
+ /// AlignRotacionToObjectAndSnapToGridExample :
+ /// Offset = new Vector3(0, 0, 50f);
+ /// GridSize = * 20.0f;
+ /// RayOrgin;
+ /// SomeObject;
+ ///
+ /// {
+ /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// {
+ /// transform = Hit.Collider.Transform;
+ /// point = Hit.Point;
+ /// normal = Hit.Normal;
+ /// SomeObject.Transform = .AlignRotacionToNormalAndSnapToGrid
+ /// (
+ /// point,
+ /// normal,
+ /// Offset,
+ /// transform,
+ /// GridSize
+ /// );
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local grid offset to applay after snaping
+ /// Normal vector
+ /// Realative transform
+ /// InRefrenceTransform
+ /// rotated and snaped transform with scale
+ public static Transform AlignRotacionToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, Vector3 InNormalOffset, Transform InRelativeTo, Vector3 InGridSize)
+ {
+ Quaternion rot = Quaternion.GetRotacionFromNormal(InNormal, InRelativeTo);
+ return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3.One);
+ }
///
/// Tests for equality between two objects.
diff --git a/Source/Engine/Core/Math/Transform.h b/Source/Engine/Core/Math/Transform.h
index 2c51bfa4a..a54c356db 100644
--- a/Source/Engine/Core/Math/Transform.h
+++ b/Source/Engine/Core/Math/Transform.h
@@ -291,6 +291,77 @@ public:
return result;
}
+ ///
+ /// combines funcions
+ /// ,
+ ///
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to applay after snaping
+ /// Normal vector
+ /// Realative transform
+ /// return scale
+ /// InRefrenceTransform
+ /// rotated and snaped transform
+ static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
+ {
+ Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
+ }
+ ///
+ /// combines funcions
+ /// ,
+ ///
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to applay after snaping
+ /// Normal vector
+ /// Realative transform
+ /// InRefrenceTransform
+ /// rotated and snaped transform with scale
+ static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
+ {
+ Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3::One);
+ }
+ ///
+ /// combines funcions
+ /// ,
+ ///
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to applay after snaping
+ /// Normal vector
+ /// Realative transform
+ /// return scale
+ /// InRefrenceTransform
+ /// rotated and snaped transform
+ static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo,const Float3& InReturnScale,const Vector3& InGridSize)
+ {
+ Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
+ }
+ ///
+ /// combines funcions
+ /// ,
+ ///
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local grid offset to applay after snaping
+ /// Normal vector
+ /// Realative transform
+ /// InRefrenceTransform
+ /// rotated and snaped transform with scale
+ static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint,const Vector3& InNormal,const Vector3& InNormalOffset, const Transform& InRelativeTo,const Vector3& InGridSize)
+ {
+ Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3::One);
+ }
+
public:
FORCE_INLINE Transform operator*(const Transform& other) const
{
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index 848a3b532..9cda11544 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1685,6 +1685,80 @@ namespace FlaxEngine
return pos;
}
+ ///
+ /// Snaps the on to rotate grid.
+ /// for world aligned grid snapping use instead
+ /// Example code:
+ ///
+ /// SnapToRotatedGridExample :
+ /// GridSize = * 20.0f;
+ /// RayOrgin;
+ /// SomeObject;
+ ///
+ /// {
+ /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// {
+ /// position = Hit.Collider.Position;
+ /// transform = Hit.Collider.Transform;
+ /// point = Hit.Point;
+ /// normal = Hit.Normal;
+ /// //Get rotation from normal relative to collider transform
+ /// rot = .GetRotacionFromNormal(normal,transform);
+ /// point = .SnapToRotatedGrid(point,position,rot,GridSize);
+ /// SomeObject.Position = point;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ ///
+ /// The position to snap.
+ /// The center point.
+ /// The rotation of the grid.
+ /// The size of the grid.
+ /// The position snapped to the grid.
+ public static Vector3 SnapToRotatedGrid(Vector3 InPoint, Vector3 InCenterPoint, Quaternion InOrientation, Vector3 InGridSize)
+ {
+ Vector3 p = (InPoint - InCenterPoint) * InOrientation.Conjugated();
+ return (SnapToGrid(p, InGridSize) * InOrientation) + InCenterPoint;
+ }
+ ///
+ /// The same as but with local offset applied after point is spapend
+ /// Example code:
+ ///
+ /// SnapToRotatedGridWithOffsetExample :
+ /// Offset = new Vector3(0, 0, 50f);
+ /// GridSize = * 20.0f;
+ /// RayOrgin;
+ /// SomeObject;
+ ///
+ /// {
+ /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// {
+ /// position = Hit.Collider.Position;
+ /// transform = Hit.Collider.Transform;
+ /// point = Hit.Point;
+ /// normal = Hit.Normal;
+ /// rot = .GetRotacionFromNormal(normal,transform);
+ /// point = .SnapToRotatedGridWithOffset(point,position,Offset,rot,GridSize);
+ /// SomeObject.Position = point;
+ /// }
+ /// }
+ /// }
+ ///
+ ///
+ ///
+ /// The position to snap.
+ /// The center point.
+ /// The rotation of the grid.
+ /// The size of the grid.
+ /// The local grid offset to applay after snaping
+ ///
+ public static Vector3 SnapToRotatedGridWithOffset(Vector3 InPoint, Vector3 InCenterPoint, Vector3 InOffset, Quaternion InOrientation, Vector3 InGridSize)
+ {
+ return ((SnapToGrid((InPoint - InCenterPoint) * InOrientation.Conjugated(), InGridSize) + InOffset) * InOrientation) + InCenterPoint;
+ }
+
///
/// Adds two vectors.
///
diff --git a/Source/Engine/Core/Math/Vector3.h b/Source/Engine/Core/Math/Vector3.h
index 950d730c5..b8f074b73 100644
--- a/Source/Engine/Core/Math/Vector3.h
+++ b/Source/Engine/Core/Math/Vector3.h
@@ -927,6 +927,47 @@ public:
/// The second vector.
/// The angle (in radians).
static FLAXENGINE_API T Angle(const Vector3Base& from, const Vector3Base& to);
+
+ ///
+ /// Snaps the input position into the grid.
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The position snapped to the grid.
+ static Vector3 SnapToGrid(const Vector3& pos, Vector3 gridSize)
+ {
+ pos.X = Math::Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X;
+ pos.Y = Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y;
+ pos.Z = Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z;
+ return pos;
+ }
+
+ ///
+ /// Snaps the on to rotate grid.
+ /// for world aligned grid snapping use instead
+ ///
+ /// The position to snap.
+ /// The center point.
+ /// The rotation of the grid.
+ /// The size of the grid.
+ /// The position snapped to the grid.
+ static Vector3 SnapToRotatedGrid(const Vector3& InPoint, const Vector3& InCenterPoint, const Quaternion& InOrientation, const Vector3& InGridSize)
+ {
+ return (Vector3::SnapToGrid((InPoint - InCenterPoint) * InOrientation.Conjugated(), InGridSize) * InOrientation) + InCenterPoint;
+ }
+ ///
+ /// The same as but with local offset applied after point is spapend
+ ///
+ /// The position to snap.
+ /// The center point.
+ /// The rotation of the grid.
+ /// The size of the grid.
+ /// The local grid offset to applay after snaping
+ ///
+ static Vector3 SnapToRotatedGridWithOffset(const Vector3& InPoint, const Vector3& InCenterPoint, const Vector3& InOffset, const Quaternion& InOrientation, const Vector3& InGridSize)
+ {
+ return ((Vector3::SnapToGrid((InPoint - InCenterPoint) * InOrientation.Conjugated(), InGridSize) + InOffset) * InOrientation) + InCenterPoint;
+ }
};
template
From f6f1f0023a66731c884aed2603171be6fe106159 Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Wed, 3 Apr 2024 06:03:31 +0200
Subject: [PATCH 025/114] fixed compile errors
---
Source/Engine/Core/Math/Quaternion.cpp | 12 ++++++
Source/Engine/Core/Math/Quaternion.h | 12 +-----
Source/Engine/Core/Math/Vector3.cpp | 60 ++++++++++++++++++++++++++
Source/Engine/Core/Math/Vector3.h | 18 ++------
4 files changed, 76 insertions(+), 26 deletions(-)
diff --git a/Source/Engine/Core/Math/Quaternion.cpp b/Source/Engine/Core/Math/Quaternion.cpp
index 03989dab5..addff7854 100644
--- a/Source/Engine/Core/Math/Quaternion.cpp
+++ b/Source/Engine/Core/Math/Quaternion.cpp
@@ -7,6 +7,7 @@
#include "Matrix3x3.h"
#include "Math.h"
#include "../Types/String.h"
+#include "Engine/Core/Math/Transform.h"
Quaternion Quaternion::Zero(0, 0, 0, 0);
Quaternion Quaternion::One(1, 1, 1, 1);
@@ -532,3 +533,14 @@ void Quaternion::RotationYawPitchRoll(float yaw, float pitch, float roll, Quater
result.Y = sinYawOver2 * cosPitchOver2 * cosRollOver2 - cosYawOver2 * sinPitchOver2 * sinRollOver2;
result.Z = cosYawOver2 * cosPitchOver2 * sinRollOver2 - sinYawOver2 * sinPitchOver2 * cosRollOver2;
}
+
+Quaternion Quaternion::GetRotacionFromNormal(const Vector3& InNormal, const Transform& InRefrenceTransform)
+{
+ Float3 up = InRefrenceTransform.GetUp();
+ auto dot = Vector3::Dot(InNormal, up);
+ if (Math::NearEqual(Math::Abs(dot), 1))
+ {
+ up = InRefrenceTransform.GetRight();
+ }
+ return Quaternion::LookRotation(InNormal, up);
+}
diff --git a/Source/Engine/Core/Math/Quaternion.h b/Source/Engine/Core/Math/Quaternion.h
index 2f2c538a6..b0e456e9b 100644
--- a/Source/Engine/Core/Math/Quaternion.h
+++ b/Source/Engine/Core/Math/Quaternion.h
@@ -670,17 +670,7 @@ public:
/// the normal vector
/// relative to
/// normal as rotacion
- static Quaternion GetRotacionFromNormal(const Vector3& InNormal, const Transform& InRefrenceTransform)
- {
- Float3 up = InRefrenceTransform.GetUp();
- auto dot = Vector3::Dot(InNormal, up);
- if (Math::NearEqual(Math::Abs(dot), 1))
- {
- up = InRefrenceTransform.GetRight();
- }
- return Quaternion::LookRotation(InNormal, up);
- }
-
+ static Quaternion GetRotacionFromNormal(const Vector3& InNormal, const Transform& InRefrenceTransform);
};
///
diff --git a/Source/Engine/Core/Math/Vector3.cpp b/Source/Engine/Core/Math/Vector3.cpp
index 3ffb2cdc9..69dad16e7 100644
--- a/Source/Engine/Core/Math/Vector3.cpp
+++ b/Source/Engine/Core/Math/Vector3.cpp
@@ -324,6 +324,26 @@ float Float3::Angle(const Float3& from, const Float3& to)
return Math::Acos(dot);
}
+template<>
+Float3 Float3::SnapToRotatedGridWithOffset(const Float3& InPoint, const Float3& InCenterPoint, const Float3& InOffset, const Quaternion& InOrientation, const Float3& InGridSize)
+{
+ return (InOrientation * (InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
+}
+
+template<>
+Float3 Float3::SnapToGrid(const Float3& pos, const Float3& gridSize)
+{
+ return Float3(Math::Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X,
+ Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y,
+ Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
+}
+
+template<>
+Float3 Float3::SnapToRotatedGrid(const Float3& InPoint, const Float3& InCenterPoint, const Quaternion& InOrientation, const Float3& InGridSize)
+{
+ return (InOrientation * InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize)) + InCenterPoint;
+}
+
// Double
static_assert(sizeof(Double3) == 24, "Invalid Double3 type size.");
@@ -638,6 +658,26 @@ double Double3::Angle(const Double3& from, const Double3& to)
return Math::Acos(dot);
}
+template<>
+Double3 Double3::SnapToRotatedGridWithOffset(const Double3& InPoint, const Double3& InCenterPoint, const Double3& InOffset, const Quaternion& InOrientation, const Double3& InGridSize)
+{
+ return (InOrientation * (InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
+}
+
+template<>
+Double3 Double3::SnapToGrid(const Double3& pos, const Double3& gridSize)
+{
+ return Double3(Math::Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X,
+ Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y,
+ Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
+}
+
+template<>
+Double3 Double3::SnapToRotatedGrid(const Double3& InPoint, const Double3& InCenterPoint, const Quaternion& InOrientation, const Double3& InGridSize)
+{
+ return (InOrientation * InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize)) + InCenterPoint;
+}
+
// Int
static_assert(sizeof(Int3) == 12, "Invalid Int3 type size.");
@@ -852,3 +892,23 @@ int32 Int3::Angle(const Int3& from, const Int3& to)
{
return 0;
}
+
+template<>
+Int3 Int3::SnapToRotatedGridWithOffset(const Int3& InPoint, const Int3& InCenterPoint, const Int3& InOffset, const Quaternion& InOrientation, const Int3& InGridSize)
+{
+ return (InOrientation * (InOrientation.Conjugated() * Int3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
+}
+
+template<>
+Int3 Int3::SnapToGrid(const Int3& pos, const Int3& gridSize)
+{
+ return Double3(Math::Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X,
+ Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y,
+ Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
+}
+
+template<>
+Int3 Int3::SnapToRotatedGrid(const Int3& InPoint, const Int3& InCenterPoint, const Quaternion& InOrientation, const Int3& InGridSize)
+{
+ return (InOrientation * InOrientation.Conjugated() * Int3::SnapToGrid((InPoint - InCenterPoint), InGridSize)) + InCenterPoint;
+}
diff --git a/Source/Engine/Core/Math/Vector3.h b/Source/Engine/Core/Math/Vector3.h
index b8f074b73..7850411f9 100644
--- a/Source/Engine/Core/Math/Vector3.h
+++ b/Source/Engine/Core/Math/Vector3.h
@@ -934,13 +934,7 @@ public:
/// The position to snap.
/// The size of the grid.
/// The position snapped to the grid.
- static Vector3 SnapToGrid(const Vector3& pos, Vector3 gridSize)
- {
- pos.X = Math::Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X;
- pos.Y = Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y;
- pos.Z = Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z;
- return pos;
- }
+ static Vector3Base SnapToGrid(const Vector3Base& pos,const Vector3Base& gridSize);
///
/// Snaps the on to rotate grid.
@@ -951,10 +945,7 @@ public:
/// The rotation of the grid.
/// The size of the grid.
/// The position snapped to the grid.
- static Vector3 SnapToRotatedGrid(const Vector3& InPoint, const Vector3& InCenterPoint, const Quaternion& InOrientation, const Vector3& InGridSize)
- {
- return (Vector3::SnapToGrid((InPoint - InCenterPoint) * InOrientation.Conjugated(), InGridSize) * InOrientation) + InCenterPoint;
- }
+ static Vector3Base SnapToRotatedGrid(const Vector3Base& InPoint, const Vector3Base& InCenterPoint, const Quaternion& InOrientation, const Vector3Base& InGridSize);
///
/// The same as but with local offset applied after point is spapend
///
@@ -964,10 +955,7 @@ public:
/// The size of the grid.
/// The local grid offset to applay after snaping
///
- static Vector3 SnapToRotatedGridWithOffset(const Vector3& InPoint, const Vector3& InCenterPoint, const Vector3& InOffset, const Quaternion& InOrientation, const Vector3& InGridSize)
- {
- return ((Vector3::SnapToGrid((InPoint - InCenterPoint) * InOrientation.Conjugated(), InGridSize) + InOffset) * InOrientation) + InCenterPoint;
- }
+ static Vector3Base SnapToRotatedGridWithOffset(const Vector3Base& InPoint, const Vector3Base& InCenterPoint, const Vector3Base& InOffset, const Quaternion& InOrientation, const Vector3Base& InGridSize);
};
template
From 58d4bad400e1d751fcf08a10ed4b0bb7caa8fb13 Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Wed, 3 Apr 2024 06:16:46 +0200
Subject: [PATCH 026/114] Update Vector3.cpp
---
Source/Engine/Core/Math/Vector3.cpp | 36 ++++++++++++++---------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/Source/Engine/Core/Math/Vector3.cpp b/Source/Engine/Core/Math/Vector3.cpp
index 69dad16e7..30247d70b 100644
--- a/Source/Engine/Core/Math/Vector3.cpp
+++ b/Source/Engine/Core/Math/Vector3.cpp
@@ -324,12 +324,6 @@ float Float3::Angle(const Float3& from, const Float3& to)
return Math::Acos(dot);
}
-template<>
-Float3 Float3::SnapToRotatedGridWithOffset(const Float3& InPoint, const Float3& InCenterPoint, const Float3& InOffset, const Quaternion& InOrientation, const Float3& InGridSize)
-{
- return (InOrientation * (InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
-}
-
template<>
Float3 Float3::SnapToGrid(const Float3& pos, const Float3& gridSize)
{
@@ -338,6 +332,12 @@ Float3 Float3::SnapToGrid(const Float3& pos, const Float3& gridSize)
Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
}
+template<>
+Float3 Float3::SnapToRotatedGridWithOffset(const Float3& InPoint, const Float3& InCenterPoint, const Float3& InOffset, const Quaternion& InOrientation, const Float3& InGridSize)
+{
+ return (InOrientation * (InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
+}
+
template<>
Float3 Float3::SnapToRotatedGrid(const Float3& InPoint, const Float3& InCenterPoint, const Quaternion& InOrientation, const Float3& InGridSize)
{
@@ -658,12 +658,6 @@ double Double3::Angle(const Double3& from, const Double3& to)
return Math::Acos(dot);
}
-template<>
-Double3 Double3::SnapToRotatedGridWithOffset(const Double3& InPoint, const Double3& InCenterPoint, const Double3& InOffset, const Quaternion& InOrientation, const Double3& InGridSize)
-{
- return (InOrientation * (InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
-}
-
template<>
Double3 Double3::SnapToGrid(const Double3& pos, const Double3& gridSize)
{
@@ -672,6 +666,12 @@ Double3 Double3::SnapToGrid(const Double3& pos, const Double3& gridSize)
Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
}
+template<>
+Double3 Double3::SnapToRotatedGridWithOffset(const Double3& InPoint, const Double3& InCenterPoint, const Double3& InOffset, const Quaternion& InOrientation, const Double3& InGridSize)
+{
+ return (InOrientation * (InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
+}
+
template<>
Double3 Double3::SnapToRotatedGrid(const Double3& InPoint, const Double3& InCenterPoint, const Quaternion& InOrientation, const Double3& InGridSize)
{
@@ -893,12 +893,6 @@ int32 Int3::Angle(const Int3& from, const Int3& to)
return 0;
}
-template<>
-Int3 Int3::SnapToRotatedGridWithOffset(const Int3& InPoint, const Int3& InCenterPoint, const Int3& InOffset, const Quaternion& InOrientation, const Int3& InGridSize)
-{
- return (InOrientation * (InOrientation.Conjugated() * Int3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
-}
-
template<>
Int3 Int3::SnapToGrid(const Int3& pos, const Int3& gridSize)
{
@@ -907,6 +901,12 @@ Int3 Int3::SnapToGrid(const Int3& pos, const Int3& gridSize)
Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
}
+template<>
+Int3 Int3::SnapToRotatedGridWithOffset(const Int3& InPoint, const Int3& InCenterPoint, const Int3& InOffset, const Quaternion& InOrientation, const Int3& InGridSize)
+{
+ return (InOrientation * (InOrientation.Conjugated() * Int3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
+}
+
template<>
Int3 Int3::SnapToRotatedGrid(const Int3& InPoint, const Int3& InCenterPoint, const Quaternion& InOrientation, const Int3& InGridSize)
{
From 137a60ccef739f59ff000d9cb0311f60a2ae6a06 Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Wed, 3 Apr 2024 06:34:22 +0200
Subject: [PATCH 027/114] will it explode ?
---
Source/Engine/Core/Math/Transform.cpp | 6 ++++++
Source/Engine/Core/Math/Transform.h | 27 +++++++--------------------
2 files changed, 13 insertions(+), 20 deletions(-)
diff --git a/Source/Engine/Core/Math/Transform.cpp b/Source/Engine/Core/Math/Transform.cpp
index 6195dad04..7a8c4cd3d 100644
--- a/Source/Engine/Core/Math/Transform.cpp
+++ b/Source/Engine/Core/Math/Transform.cpp
@@ -252,3 +252,9 @@ void Transform::Lerp(const Transform& t1, const Transform& t2, float amount, Tra
Quaternion::Slerp(t1.Orientation, t2.Orientation, amount, result.Orientation);
Float3::Lerp(t1.Scale, t2.Scale, amount, result.Scale);
}
+
+inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
+{
+ Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
+}
diff --git a/Source/Engine/Core/Math/Transform.h b/Source/Engine/Core/Math/Transform.h
index a54c356db..7d76f3432 100644
--- a/Source/Engine/Core/Math/Transform.h
+++ b/Source/Engine/Core/Math/Transform.h
@@ -304,11 +304,8 @@ public:
/// return scale
/// InRefrenceTransform
/// rotated and snaped transform
- static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
- {
- Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
- return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
- }
+ inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize);
+
///
/// combines funcions
/// ,
@@ -321,11 +318,8 @@ public:
/// Realative transform
/// InRefrenceTransform
/// rotated and snaped transform with scale
- static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
- {
- Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
- return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3::One);
- }
+ inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize);
+
///
/// combines funcions
/// ,
@@ -339,11 +333,8 @@ public:
/// return scale
/// InRefrenceTransform
/// rotated and snaped transform
- static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo,const Float3& InReturnScale,const Vector3& InGridSize)
- {
- Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
- return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
- }
+ inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo,const Float3& InReturnScale,const Vector3& InGridSize);
+
///
/// combines funcions
/// ,
@@ -356,11 +347,7 @@ public:
/// Realative transform
/// InRefrenceTransform
/// rotated and snaped transform with scale
- static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint,const Vector3& InNormal,const Vector3& InNormalOffset, const Transform& InRelativeTo,const Vector3& InGridSize)
- {
- Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
- return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3::One);
- }
+ inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint,const Vector3& InNormal,const Vector3& InNormalOffset, const Transform& InRelativeTo,const Vector3& InGridSize);
public:
FORCE_INLINE Transform operator*(const Transform& other) const
From bfa3507cc6439c3d2cbccc10232d145c2243a873 Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Wed, 3 Apr 2024 06:36:33 +0200
Subject: [PATCH 028/114] missing cpp funcion :shit:
---
Source/Engine/Core/Math/Transform.cpp | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Source/Engine/Core/Math/Transform.cpp b/Source/Engine/Core/Math/Transform.cpp
index 7a8c4cd3d..cfb1ca3b7 100644
--- a/Source/Engine/Core/Math/Transform.cpp
+++ b/Source/Engine/Core/Math/Transform.cpp
@@ -258,3 +258,21 @@ inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& In
Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
}
+
+inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
+{
+ Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3::One);
+}
+
+inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
+{
+ Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
+}
+
+inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
+{
+ Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3::One);
+}
From 18d641e2aa6f26b021204384cfaaf19576e1bc30 Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Wed, 3 Apr 2024 14:34:51 +0200
Subject: [PATCH 029/114] correct spelling mistakes and doc's
Co-Authored-By: Menotdan <32620310+Menotdan@users.noreply.github.com>
---
Source/Engine/Core/Math/Quaternion.cpp | 6 +-
Source/Engine/Core/Math/Quaternion.cs | 24 +++---
Source/Engine/Core/Math/Quaternion.h | 14 ++--
Source/Engine/Core/Math/Transform.cpp | 16 ++--
Source/Engine/Core/Math/Transform.cs | 90 ++++++++++----------
Source/Engine/Core/Math/Transform.h | 112 ++++++++++++-------------
Source/Engine/Core/Math/Vector3.cs | 14 ++--
Source/Engine/Core/Math/Vector3.h | 19 +++--
8 files changed, 146 insertions(+), 149 deletions(-)
diff --git a/Source/Engine/Core/Math/Quaternion.cpp b/Source/Engine/Core/Math/Quaternion.cpp
index addff7854..4197fa147 100644
--- a/Source/Engine/Core/Math/Quaternion.cpp
+++ b/Source/Engine/Core/Math/Quaternion.cpp
@@ -534,13 +534,13 @@ void Quaternion::RotationYawPitchRoll(float yaw, float pitch, float roll, Quater
result.Z = cosYawOver2 * cosPitchOver2 * sinRollOver2 - sinYawOver2 * sinPitchOver2 * cosRollOver2;
}
-Quaternion Quaternion::GetRotacionFromNormal(const Vector3& InNormal, const Transform& InRefrenceTransform)
+Quaternion Quaternion::GetRotationFromNormal(const Vector3& InNormal, const Transform& InReferenceTransform)
{
- Float3 up = InRefrenceTransform.GetUp();
+ Float3 up = InReferenceTransform.GetUp();
auto dot = Vector3::Dot(InNormal, up);
if (Math::NearEqual(Math::Abs(dot), 1))
{
- up = InRefrenceTransform.GetRight();
+ up = InReferenceTransform.GetRight();
}
return Quaternion::LookRotation(InNormal, up);
}
diff --git a/Source/Engine/Core/Math/Quaternion.cs b/Source/Engine/Core/Math/Quaternion.cs
index b69df3969..a23487c19 100644
--- a/Source/Engine/Core/Math/Quaternion.cs
+++ b/Source/Engine/Core/Math/Quaternion.cs
@@ -1480,13 +1480,13 @@ namespace FlaxEngine
}
///
- /// Gets rotacion for normal in relation to transform
- /// Funcion especially created for aligned with axis aligned faces
- /// use full with
+ /// Gets rotation from a normal in relation to a transform.
+ /// This function is especially useful for axis aligned faces,
+ /// and with .
///
/// Example code:
///
- /// GetRotacionFromNormalExample :
+ /// GetRotationFromNormalExample :
/// RayOrgin;
/// SomeObject;
///
@@ -1497,7 +1497,7 @@ namespace FlaxEngine
/// transform = Hit.Collider.Transform;
/// point = Hit.Point;
/// normal = Hit.Normal;
- /// rot = .GetRotacionFromNormal(normal,transform);
+ /// rot = .GetRotationFromNormal(normal,transform);
/// SomeObject.Position = point;
/// SomeObject.Orientation = rot;
/// }
@@ -1506,18 +1506,18 @@ namespace FlaxEngine
///
///
///
- /// the normal vector
- /// relative to
- /// normal as rotacion
- public static Quaternion GetRotacionFromNormal(Vector3 InNormal, Transform InRefrenceTransform)
+ /// The normal vector.
+ /// The reference transform.
+ /// The rotation from the normal vector.
+ public static Quaternion GetRotationFromNormal(Vector3 InNormal, Transform InReferenceTransform)
{
- Float3 up = InRefrenceTransform.Up;
+ Float3 up = InReferenceTransform.Up;
var dot = Vector3.Dot(InNormal, up);
if (Mathf.NearEqual(Math.Abs(dot), 1))
{
- up = InRefrenceTransform.Right;
+ up = InReferenceTransform.Right;
}
- return Quaternion.LookRotation(InNormal, up);
+ return LookRotation(InNormal, up);
}
///
diff --git a/Source/Engine/Core/Math/Quaternion.h b/Source/Engine/Core/Math/Quaternion.h
index b0e456e9b..d841f964f 100644
--- a/Source/Engine/Core/Math/Quaternion.h
+++ b/Source/Engine/Core/Math/Quaternion.h
@@ -663,14 +663,14 @@ public:
///
- /// Gets rotacion for normal in relation to transform
- /// Funcion especially created for aligned with axis aligned faces
- /// use full with
+ /// Gets rotation from a normal in relation to a transform.
+ /// This function is especially useful for axis aligned faces,
+ /// and with .
///
- /// the normal vector
- /// relative to
- /// normal as rotacion
- static Quaternion GetRotacionFromNormal(const Vector3& InNormal, const Transform& InRefrenceTransform);
+ /// The normal vector.
+ /// The reference transform.
+ /// The rotation from the normal vector.
+ static Quaternion GetRotationFromNormal(const Vector3& InNormal, const Transform& InReferenceTransform);
};
///
diff --git a/Source/Engine/Core/Math/Transform.cpp b/Source/Engine/Core/Math/Transform.cpp
index cfb1ca3b7..234b78c04 100644
--- a/Source/Engine/Core/Math/Transform.cpp
+++ b/Source/Engine/Core/Math/Transform.cpp
@@ -253,26 +253,26 @@ void Transform::Lerp(const Transform& t1, const Transform& t2, float amount, Tra
Float3::Lerp(t1.Scale, t2.Scale, amount, result.Scale);
}
-inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
+inline Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
{
- Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ Quaternion rot = Quaternion::GetRotationFromNormal(InNormal, InRelativeTo);
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
}
-inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
+inline Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
{
- Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ Quaternion rot = Quaternion::GetRotationFromNormal(InNormal, InRelativeTo);
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3::One);
}
-inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
+inline Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
{
- Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ Quaternion rot = Quaternion::GetRotationFromNormal(InNormal, InRelativeTo);
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
}
-inline Transform Transform::AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
+inline Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
{
- Quaternion rot = Quaternion::GetRotacionFromNormal(InNormal, InRelativeTo);
+ Quaternion rot = Quaternion::GetRotationFromNormal(InNormal, InRelativeTo);
return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3::One);
}
diff --git a/Source/Engine/Core/Math/Transform.cs b/Source/Engine/Core/Math/Transform.cs
index 844625514..ba86c1a6d 100644
--- a/Source/Engine/Core/Math/Transform.cs
+++ b/Source/Engine/Core/Math/Transform.cs
@@ -478,12 +478,12 @@ namespace FlaxEngine
Float3.Lerp(ref start.Scale, ref end.Scale, amount, out result.Scale);
}
///
- /// combines funcions
+ /// Combines the functions:
/// ,
- ///
+ /// .
/// Example code:
///
- /// AlignRotacionToObjectAndSnapToGridExample :
+ /// AlignRotationToObjectAndSnapToGridExample :
/// Offset = 50.0f;
/// GridSize = * 20.0f;
/// RayOrgin;
@@ -495,7 +495,7 @@ namespace FlaxEngine
/// transform = Hit.Collider.Transform;
/// point = Hit.Point;
/// normal = Hit.Normal;
- /// SomeObject.Transform = .AlignRotacionToNormalAndSnapToGrid
+ /// SomeObject.Transform = .AlignRotationToNormalAndSnapToGrid
/// (
/// point,
/// normal,
@@ -512,24 +512,24 @@ namespace FlaxEngine
///
/// The position to snap.
/// The size of the grid.
- /// The local Z grid offset to applay after snaping
- /// Normal vector
- /// Realative transform
- /// return scale
- /// InRefrenceTransform
- /// rotated and snaped transform
- public static Transform AlignRotacionToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, float InNormalOffset, Transform InRelativeTo, Float3 InReturnScale, Vector3 InGridSize)
+ /// The local Z grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The scale to apply to the transform.
+ /// The rotated and snapped transform.
+ public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, float InNormalOffset, Transform InRelativeTo, Float3 InReturnScale, Vector3 InGridSize)
{
- Quaternion rot = Quaternion.GetRotacionFromNormal(InNormal, InRelativeTo);
+ Quaternion rot = Quaternion.GetRotationFromNormal(InNormal, InRelativeTo);
return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, new Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
}
+
///
- /// combines funcions
+ /// Combines the functions:
/// ,
- ///
+ /// .
/// Example code:
///
- /// AlignRotacionToObjectAndSnapToGridExample :
+ /// AlignRotationToObjectAndSnapToGridExample :
/// Offset = 50.0f;
/// GridSize = * 20.0f;
/// RayOrgin;
@@ -541,7 +541,7 @@ namespace FlaxEngine
/// transform = Hit.Collider.Transform;
/// point = Hit.Point;
/// normal = Hit.Normal;
- /// SomeObject.Transform = .AlignRotacionToNormalAndSnapToGrid
+ /// SomeObject.Transform = .AlignRotationToNormalAndSnapToGrid
/// (
/// point,
/// normal,
@@ -557,23 +557,23 @@ namespace FlaxEngine
///
/// The position to snap.
/// The size of the grid.
- /// The local Z grid offset to applay after snaping
- /// Normal vector
- /// Realative transform
- /// InRefrenceTransform
- /// rotated and snaped transform with scale
- public static Transform AlignRotacionToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, float InNormalOffset, Transform InRelativeTo, Vector3 InGridSize)
+ /// The local Z grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The rotated and snapped transform with scale .
+ public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, float InNormalOffset, Transform InRelativeTo, Vector3 InGridSize)
{
- Quaternion rot = Quaternion.GetRotacionFromNormal(InNormal, InRelativeTo);
+ Quaternion rot = Quaternion.GetRotationFromNormal(InNormal, InRelativeTo);
return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, new Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3.One);
}
+
///
- /// combines funcions
+ /// Combines the functions:
/// ,
- ///
+ /// .
/// Example code:
///
- /// AlignRotacionToObjectAndSnapToGridExample :
+ /// AlignRotationToObjectAndSnapToGridExample :
/// Offset = new Vector3(0, 0, 50f);
/// GridSize = * 20.0f;
/// RayOrgin;
@@ -585,7 +585,7 @@ namespace FlaxEngine
/// transform = Hit.Collider.Transform;
/// point = Hit.Point;
/// normal = Hit.Normal;
- /// SomeObject.Transform = .AlignRotacionToNormalAndSnapToGrid
+ /// SomeObject.Transform = .AlignRotationToNormalAndSnapToGrid
/// (
/// point,
/// normal,
@@ -602,25 +602,24 @@ namespace FlaxEngine
///
/// The position to snap.
/// The size of the grid.
- /// The local Z grid offset to applay after snaping
- /// Normal vector
- /// Realative transform
- /// return scale
- /// InRefrenceTransform
- /// rotated and snaped transform
- public static Transform AlignRotacionToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, Vector3 InNormalOffset, Transform InRelativeTo, Float3 InReturnScale, Vector3 InGridSize)
+ /// The local Z grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The scale to apply to the transform.
+ /// The rotated and snapped transform.
+ public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, Vector3 InNormalOffset, Transform InRelativeTo, Float3 InReturnScale, Vector3 InGridSize)
{
- Quaternion rot = Quaternion.GetRotacionFromNormal(InNormal, InRelativeTo);
+ Quaternion rot = Quaternion.GetRotationFromNormal(InNormal, InRelativeTo);
return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
}
///
- /// combines funcions
+ /// Combines the functions:
/// ,
- ///
+ /// .
/// Example code:
///
- /// AlignRotacionToObjectAndSnapToGridExample :
+ /// AlignRotationToObjectAndSnapToGridExample :
/// Offset = new Vector3(0, 0, 50f);
/// GridSize = * 20.0f;
/// RayOrgin;
@@ -632,7 +631,7 @@ namespace FlaxEngine
/// transform = Hit.Collider.Transform;
/// point = Hit.Point;
/// normal = Hit.Normal;
- /// SomeObject.Transform = .AlignRotacionToNormalAndSnapToGrid
+ /// SomeObject.Transform = .AlignRotationToNormalAndSnapToGrid
/// (
/// point,
/// normal,
@@ -648,14 +647,13 @@ namespace FlaxEngine
///
/// The position to snap.
/// The size of the grid.
- /// The local grid offset to applay after snaping
- /// Normal vector
- /// Realative transform
- /// InRefrenceTransform
- /// rotated and snaped transform with scale
- public static Transform AlignRotacionToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, Vector3 InNormalOffset, Transform InRelativeTo, Vector3 InGridSize)
+ /// The local Z grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The rotated and snapped transform with scale .
+ public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, Vector3 InNormalOffset, Transform InRelativeTo, Vector3 InGridSize)
{
- Quaternion rot = Quaternion.GetRotacionFromNormal(InNormal, InRelativeTo);
+ Quaternion rot = Quaternion.GetRotationFromNormal(InNormal, InRelativeTo);
return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3.One);
}
diff --git a/Source/Engine/Core/Math/Transform.h b/Source/Engine/Core/Math/Transform.h
index 7d76f3432..f170ce7a9 100644
--- a/Source/Engine/Core/Math/Transform.h
+++ b/Source/Engine/Core/Math/Transform.h
@@ -18,20 +18,20 @@ API_STRUCT() struct FLAXENGINE_API Transform
///
/// The translation vector of the transform.
///
- API_FIELD(Attributes="EditorOrder(10), EditorDisplay(null, \"Position\"), ValueCategory(Utils.ValueCategory.Distance)")
- Vector3 Translation;
+ API_FIELD(Attributes = "EditorOrder(10), EditorDisplay(null, \"Position\"), ValueCategory(Utils.ValueCategory.Distance)")
+ Vector3 Translation;
///
/// The rotation of the transform.
///
- API_FIELD(Attributes="EditorOrder(20), EditorDisplay(null, \"Rotation\"), ValueCategory(Utils.ValueCategory.Angle)")
- Quaternion Orientation;
+ API_FIELD(Attributes = "EditorOrder(20), EditorDisplay(null, \"Rotation\"), ValueCategory(Utils.ValueCategory.Angle)")
+ Quaternion Orientation;
///
/// The scale vector of the transform.
///
- API_FIELD(Attributes="EditorOrder(30), Limit(float.MinValue, float.MaxValue, 0.01f)")
- Float3 Scale;
+ API_FIELD(Attributes = "EditorOrder(30), Limit(float.MinValue, float.MaxValue, 0.01f)")
+ Float3 Scale;
public:
///
@@ -291,63 +291,61 @@ public:
return result;
}
- ///
- /// combines funcions
- /// ,
- ///
- ///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to applay after snaping
- /// Normal vector
- /// Realative transform
- /// return scale
- /// InRefrenceTransform
- /// rotated and snaped transform
- inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize);
-
- ///
- /// combines funcions
- /// ,
- ///
- ///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to applay after snaping
- /// Normal vector
- /// Realative transform
- /// InRefrenceTransform
- /// rotated and snaped transform with scale
- inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize);
-
- ///
- /// combines funcions
- /// ,
- ///
- ///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to applay after snaping
- /// Normal vector
- /// Realative transform
- /// return scale
- /// InRefrenceTransform
- /// rotated and snaped transform
- inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo,const Float3& InReturnScale,const Vector3& InGridSize);
///
- /// combines funcions
+ /// Combines the functions:
/// ,
- ///
+ /// .
///
/// The position to snap.
/// The size of the grid.
- /// The local grid offset to applay after snaping
- /// Normal vector
- /// Realative transform
- /// InRefrenceTransform
- /// rotated and snaped transform with scale
- inline static Transform AlignRotacionToNormalAndSnapToGrid(const Vector3& InPoint,const Vector3& InNormal,const Vector3& InNormalOffset, const Transform& InRelativeTo,const Vector3& InGridSize);
+ /// The local Z grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The scale to apply to the transform.
+ /// The rotated and snapped transform.
+ static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize);
+
+ ///
+ /// Combines the functions:
+ /// ,
+ /// .
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The rotated and snapped transform with scale .
+ static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize);
+
+ ///
+ /// Combines the functions:
+ /// ,
+ /// .
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The scale to apply to the transform.
+ /// The rotated and snapped transform.
+ static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize);
+
+ ///
+ /// Combines the functions:
+ /// ,
+ /// .
+ ///
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local Z grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The rotated and snapped transform with scale .
+ static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize);
+
public:
FORCE_INLINE Transform operator*(const Transform& other) const
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index 9cda11544..5e50dd07c 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1672,7 +1672,7 @@ namespace FlaxEngine
}
///
- /// Snaps the input position into the grid.
+ /// Snaps the input position onto the grid.
///
/// The position to snap.
/// The size of the grid.
@@ -1686,8 +1686,8 @@ namespace FlaxEngine
}
///
- /// Snaps the on to rotate grid.
- /// for world aligned grid snapping use instead
+ /// Snaps the onto the rotated grid.
+ /// For world aligned grid snapping use instead.
/// Example code:
///
/// SnapToRotatedGridExample :
@@ -1723,7 +1723,7 @@ namespace FlaxEngine
return (SnapToGrid(p, InGridSize) * InOrientation) + InCenterPoint;
}
///
- /// The same as but with local offset applied after point is spapend
+ /// The same as but with local offset applied after point is snapped.
/// Example code:
///
/// SnapToRotatedGridWithOffsetExample :
@@ -1739,7 +1739,7 @@ namespace FlaxEngine
/// transform = Hit.Collider.Transform;
/// point = Hit.Point;
/// normal = Hit.Normal;
- /// rot = .GetRotacionFromNormal(normal,transform);
+ /// rot = .GetRotationFromNormal(normal,transform);
/// point = .SnapToRotatedGridWithOffset(point,position,Offset,rot,GridSize);
/// SomeObject.Position = point;
/// }
@@ -1752,8 +1752,8 @@ namespace FlaxEngine
/// The center point.
/// The rotation of the grid.
/// The size of the grid.
- /// The local grid offset to applay after snaping
- ///
+ /// The local grid offset to apply after snapping.
+ /// The position snapped to the grid, with offset applied.
public static Vector3 SnapToRotatedGridWithOffset(Vector3 InPoint, Vector3 InCenterPoint, Vector3 InOffset, Quaternion InOrientation, Vector3 InGridSize)
{
return ((SnapToGrid((InPoint - InCenterPoint) * InOrientation.Conjugated(), InGridSize) + InOffset) * InOrientation) + InCenterPoint;
diff --git a/Source/Engine/Core/Math/Vector3.h b/Source/Engine/Core/Math/Vector3.h
index 7850411f9..4160bf5d4 100644
--- a/Source/Engine/Core/Math/Vector3.h
+++ b/Source/Engine/Core/Math/Vector3.h
@@ -929,33 +929,34 @@ public:
static FLAXENGINE_API T Angle(const Vector3Base& from, const Vector3Base& to);
///
- /// Snaps the input position into the grid.
+ /// Snaps the input position onto the grid.
///
/// The position to snap.
/// The size of the grid.
/// The position snapped to the grid.
- static Vector3Base SnapToGrid(const Vector3Base& pos,const Vector3Base& gridSize);
+ static FLAXENGINE_API Vector3Base SnapToGrid(const Vector3Base& pos, const Vector3Base& gridSize);
///
- /// Snaps the on to rotate grid.
- /// for world aligned grid snapping use instead
+ /// Snaps the onto the rotated grid.
+ /// For world aligned grid snapping use instead.
///
/// The position to snap.
/// The center point.
/// The rotation of the grid.
/// The size of the grid.
/// The position snapped to the grid.
- static Vector3Base SnapToRotatedGrid(const Vector3Base& InPoint, const Vector3Base& InCenterPoint, const Quaternion& InOrientation, const Vector3Base& InGridSize);
+ static FLAXENGINE_API Vector3Base SnapToRotatedGrid(const Vector3Base& InPoint, const Vector3Base& InCenterPoint, const Quaternion& InOrientation, const Vector3Base& InGridSize);
+
///
- /// The same as but with local offset applied after point is spapend
+ /// The same as but with local offset applied after point is snapped.
///
/// The position to snap.
/// The center point.
/// The rotation of the grid.
/// The size of the grid.
- /// The local grid offset to applay after snaping
- ///
- static Vector3Base SnapToRotatedGridWithOffset(const Vector3Base& InPoint, const Vector3Base& InCenterPoint, const Vector3Base& InOffset, const Quaternion& InOrientation, const Vector3Base& InGridSize);
+ /// The local grid offset to apply after snapping.
+ /// The position snapped to the grid, with offset applied.
+ static FLAXENGINE_API Vector3Base SnapToRotatedGridWithOffset(const Vector3Base& InPoint, const Vector3Base& InCenterPoint, const Vector3Base& InOffset, const Quaternion& InOrientation, const Vector3Base& InGridSize);
};
template
From 92b35ab3e7ed626e8d2cf0417ce94c9a534ddd0a Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Sun, 7 Apr 2024 02:40:35 +0200
Subject: [PATCH 030/114] GetClosest for vectos
---
Source/Engine/Core/Math/Vector3.cs | 88 ++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index 5e50dd07c..23b4b5368 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1759,6 +1759,94 @@ namespace FlaxEngine
return ((SnapToGrid((InPoint - InCenterPoint) * InOrientation.Conjugated(), InGridSize) + InOffset) * InOrientation) + InCenterPoint;
}
+ ///
+ /// Gets the closest vector id to
+ ///
+ ///
+ ///
+ /// index or -1 if all vectors in array are outside of
+ private int GetClosest(ref Vector3[] InArray, float Tolerance)
+ {
+ Vector3 self = this;
+ int FinalID = -1;
+ for (int i = 0; InArray.Length < 0; i++)
+ {
+ if (Distance(self, InArray[i]) <= Tolerance)
+ {
+ FinalID = i;
+ self = InArray[i];
+ }
+ }
+ return FinalID;
+ }
+
+ ///
+ /// Gets the closest vector id to
+ ///
+ ///
+ ///
+ /// index or -1 if all vectors in array are outside of
+ private int GetClosest(ref System.Collections.Generic.List InList, float Tolerance)
+ {
+ Vector3 self = this;
+ int FinalID = -1;
+ for (int i = 0; InList.Count < 0; i++)
+ {
+ if (Distance(self, InList[i]) <= Tolerance)
+ {
+ FinalID = i;
+ self = InList[i];
+ }
+ }
+ return FinalID;
+ }
+
+ ///
+ /// Gets the closest vector to
+ ///
+ ///
+ ///
+ ///
+ private void GetClosest(ref Vector3[] InArray, ref Vector3 OutVector, ref float OutDistance)
+ {
+ Vector3 self = this;
+ float LastDistance = float.MaxValue;
+ for (int i = 0; InArray.Length < 0; i++)
+ {
+ var d = Distance(self, InArray[i]);
+ if (d <= LastDistance)
+ {
+ self = InArray[i];
+ LastDistance = d;
+ }
+ }
+ OutDistance = LastDistance;
+ OutVector = self;
+ }
+
+ ///
+ /// Gets the closest vector to
+ ///
+ ///
+ ///
+ ///
+ private void GetClosest(ref System.Collections.Generic.List InList, ref Vector3 OutVector, ref float OutDistance)
+ {
+ Vector3 self = this;
+ float LastDistance = float.MaxValue;
+ for (int i = 0; InList.Count < 0; i++)
+ {
+ var d = Vector3.Distance(self, InList[i]);
+ if (d <= LastDistance)
+ {
+ self = InList[i];
+ LastDistance = d;
+ }
+ }
+ OutDistance = LastDistance;
+ OutVector = self;
+ }
+
///
/// Adds two vectors.
///
From 0b19d8639b7ee5395dd06080b07f6fccc6fb2122 Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Sun, 7 Apr 2024 03:02:47 +0200
Subject: [PATCH 031/114] changed float to Real
---
Source/Engine/Core/Math/Vector3.cs | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index 23b4b5368..3cb19fbaf 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1765,7 +1765,7 @@ namespace FlaxEngine
///
///
/// index or -1 if all vectors in array are outside of
- private int GetClosest(ref Vector3[] InArray, float Tolerance)
+ private int GetClosest(ref Vector3[] InArray, Real Tolerance)
{
Vector3 self = this;
int FinalID = -1;
@@ -1786,7 +1786,7 @@ namespace FlaxEngine
///
///
/// index or -1 if all vectors in array are outside of
- private int GetClosest(ref System.Collections.Generic.List InList, float Tolerance)
+ private int GetClosest(ref System.Collections.Generic.List InList, Real Tolerance)
{
Vector3 self = this;
int FinalID = -1;
@@ -1807,7 +1807,7 @@ namespace FlaxEngine
///
///
///
- private void GetClosest(ref Vector3[] InArray, ref Vector3 OutVector, ref float OutDistance)
+ private void GetClosest(ref Vector3[] InArray, ref Vector3 OutVector, ref Real OutDistance)
{
Vector3 self = this;
float LastDistance = float.MaxValue;
@@ -1830,7 +1830,7 @@ namespace FlaxEngine
///
///
///
- private void GetClosest(ref System.Collections.Generic.List InList, ref Vector3 OutVector, ref float OutDistance)
+ private void GetClosest(ref System.Collections.Generic.List InList, ref Vector3 OutVector, ref Real OutDistance)
{
Vector3 self = this;
float LastDistance = float.MaxValue;
From 55be82a2c4af9e4e3710d51ca9921a4ef3aaa698 Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Sun, 7 Apr 2024 03:23:52 +0200
Subject: [PATCH 032/114] Update Vector3.cs
---
Source/Engine/Core/Math/Vector3.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index 3cb19fbaf..a745bc5c6 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1810,7 +1810,7 @@ namespace FlaxEngine
private void GetClosest(ref Vector3[] InArray, ref Vector3 OutVector, ref Real OutDistance)
{
Vector3 self = this;
- float LastDistance = float.MaxValue;
+ Real LastDistance = float.MaxValue;
for (int i = 0; InArray.Length < 0; i++)
{
var d = Distance(self, InArray[i]);
@@ -1833,7 +1833,7 @@ namespace FlaxEngine
private void GetClosest(ref System.Collections.Generic.List InList, ref Vector3 OutVector, ref Real OutDistance)
{
Vector3 self = this;
- float LastDistance = float.MaxValue;
+ Real LastDistance = float.MaxValue;
for (int i = 0; InList.Count < 0; i++)
{
var d = Vector3.Distance(self, InList[i]);
From 85f3fdd4381c4eaeec352ede64746b49ceecfb0b Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Sun, 7 Apr 2024 23:29:19 +0200
Subject: [PATCH 033/114] Update Vector3.cs
---
Source/Engine/Core/Math/Vector3.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index a745bc5c6..d0974874a 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1765,7 +1765,7 @@ namespace FlaxEngine
///
///
/// index or -1 if all vectors in array are outside of
- private int GetClosest(ref Vector3[] InArray, Real Tolerance)
+ public int GetClosest(ref Vector3[] InArray, Real Tolerance)
{
Vector3 self = this;
int FinalID = -1;
@@ -1786,7 +1786,7 @@ namespace FlaxEngine
///
///
/// index or -1 if all vectors in array are outside of
- private int GetClosest(ref System.Collections.Generic.List InList, Real Tolerance)
+ public int GetClosest(ref System.Collections.Generic.List InList, Real Tolerance)
{
Vector3 self = this;
int FinalID = -1;
@@ -1807,10 +1807,10 @@ namespace FlaxEngine
///
///
///
- private void GetClosest(ref Vector3[] InArray, ref Vector3 OutVector, ref Real OutDistance)
+ public void GetClosest(ref Vector3[] InArray, ref Vector3 OutVector, ref Real OutDistance)
{
Vector3 self = this;
- Real LastDistance = float.MaxValue;
+ Real LastDistance = Real.MaxValue;
for (int i = 0; InArray.Length < 0; i++)
{
var d = Distance(self, InArray[i]);
@@ -1830,10 +1830,10 @@ namespace FlaxEngine
///
///
///
- private void GetClosest(ref System.Collections.Generic.List InList, ref Vector3 OutVector, ref Real OutDistance)
+ public void GetClosest(ref System.Collections.Generic.List InList, ref Vector3 OutVector, ref Real OutDistance)
{
Vector3 self = this;
- Real LastDistance = float.MaxValue;
+ Real LastDistance = Real.MaxValue;
for (int i = 0; InList.Count < 0; i++)
{
var d = Vector3.Distance(self, InList[i]);
From 137de0a8b22b1e6cd243864b1dcd2ba21414f7ba Mon Sep 17 00:00:00 2001
From: Norite SC <162097313+cNori@users.noreply.github.com>
Date: Mon, 8 Apr 2024 01:27:58 +0200
Subject: [PATCH 034/114] forgotten how to do loops :bug: :laughing:
---
Source/Engine/Core/Math/Vector3.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index d0974874a..8294eaf64 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1769,7 +1769,7 @@ namespace FlaxEngine
{
Vector3 self = this;
int FinalID = -1;
- for (int i = 0; InArray.Length < 0; i++)
+ for (int i = 0; i < InArray.Length; i++)
{
if (Distance(self, InArray[i]) <= Tolerance)
{
@@ -1790,7 +1790,7 @@ namespace FlaxEngine
{
Vector3 self = this;
int FinalID = -1;
- for (int i = 0; InList.Count < 0; i++)
+ for (int i = 0; i < InList.Count; i++)
{
if (Distance(self, InList[i]) <= Tolerance)
{
@@ -1811,7 +1811,7 @@ namespace FlaxEngine
{
Vector3 self = this;
Real LastDistance = Real.MaxValue;
- for (int i = 0; InArray.Length < 0; i++)
+ for (int i = 0; i < InArray.Length; i++)
{
var d = Distance(self, InArray[i]);
if (d <= LastDistance)
@@ -1834,9 +1834,9 @@ namespace FlaxEngine
{
Vector3 self = this;
Real LastDistance = Real.MaxValue;
- for (int i = 0; InList.Count < 0; i++)
+ for (int i = 0; i < InList.Count; i++)
{
- var d = Vector3.Distance(self, InList[i]);
+ var d = Distance(self, InList[i]);
if (d <= LastDistance)
{
self = InList[i];
From ad8bec40bbab560775bb8019c70b5b5da112a170 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Wed, 10 Apr 2024 05:04:36 -0400
Subject: [PATCH 035/114] Add creating particle systems from particle emitters.
---
.../Content/Proxy/ParticleEmitterProxy.cs | 56 +++++++++++++++++++
1 file changed, 56 insertions(+)
diff --git a/Source/Editor/Content/Proxy/ParticleEmitterProxy.cs b/Source/Editor/Content/Proxy/ParticleEmitterProxy.cs
index 8c1204128..9ac4d698c 100644
--- a/Source/Editor/Content/Proxy/ParticleEmitterProxy.cs
+++ b/Source/Editor/Content/Proxy/ParticleEmitterProxy.cs
@@ -3,6 +3,9 @@
using System;
using FlaxEditor.Content.Create;
using FlaxEditor.Content.Thumbnails;
+using FlaxEditor.GUI.ContextMenu;
+using FlaxEditor.GUI.Timeline;
+using FlaxEditor.GUI.Timeline.Tracks;
using FlaxEditor.Viewport.Previews;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
@@ -48,6 +51,59 @@ namespace FlaxEditor.Content
Editor.Instance.ContentImporting.Create(new ParticleEmitterCreateEntry(outputPath));
}
+ ///
+ public override void OnContentWindowContextMenu(ContextMenu menu, ContentItem item)
+ {
+ base.OnContentWindowContextMenu(menu, item);
+
+ if (item is BinaryAssetItem binaryAssetItem)
+ {
+ var button = menu.AddButton("Create Particle System", CreateParticleSystemClicked);
+ button.Tag = binaryAssetItem;
+ }
+ }
+
+ private void CreateParticleSystemClicked(ContextMenuButton obj)
+ {
+ var binaryAssetItem = (BinaryAssetItem)obj.Tag;
+ CreateParticleSystem(binaryAssetItem);
+ }
+
+ ///
+ /// Creates the particle system from the given particle emitter.
+ ///
+ /// The particle emitter item to use as a base for the particle system.
+ public static void CreateParticleSystem(BinaryAssetItem emitterItem)
+ {
+ var particleSystemName = emitterItem.ShortName + " Particle System";
+ var particleSystemProxy = Editor.Instance.ContentDatabase.GetProxy();
+ Editor.Instance.Windows.ContentWin.NewItem(particleSystemProxy, null, item => OnParticleSystemCreated(item, emitterItem), particleSystemName);
+ }
+
+ private static void OnParticleSystemCreated(ContentItem item, BinaryAssetItem particleItem)
+ {
+ var assetItem = (AssetItem)item;
+ var particleSystem = FlaxEngine.Content.LoadAsync(assetItem.ID);
+ if (particleSystem == null || particleSystem.WaitForLoaded())
+ {
+ Editor.LogError("Failed to load created particle system.");
+ return;
+ }
+
+ ParticleEmitter emitter = FlaxEngine.Content.LoadAsync(particleItem.ID);
+
+ ParticleSystemPreview tempPreview = new ParticleSystemPreview(false);
+ ParticleSystemTimeline timeline = new ParticleSystemTimeline(tempPreview);
+ timeline.Load(particleSystem);
+
+ var track = (ParticleEmitterTrack)timeline.NewTrack(ParticleEmitterTrack.GetArchetype());
+ track.Asset = emitter;
+ track.TrackMedia.DurationFrames = timeline.DurationFrames;
+ track.Rename(particleItem.ShortName);
+ timeline.AddTrack(track);
+ timeline.Save(particleSystem);
+ }
+
///
public override void OnThumbnailDrawPrepare(ThumbnailRequest request)
{
From 48400ff5cea79ae637e602508def16e2830594b2 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Wed, 10 Apr 2024 16:26:29 -0400
Subject: [PATCH 036/114] Add better error handling to particle system
creation. Add skinned model -> animation graph workflow, though a bit hacky.
---
.../Content/Proxy/ParticleEmitterProxy.cs | 4 ++
.../Editor/Content/Proxy/SkinnedModelProxy.cs | 55 +++++++++++++++++++
.../Windows/Assets/AnimationGraphWindow.cs | 9 +++
3 files changed, 68 insertions(+)
diff --git a/Source/Editor/Content/Proxy/ParticleEmitterProxy.cs b/Source/Editor/Content/Proxy/ParticleEmitterProxy.cs
index 9ac4d698c..be2530efa 100644
--- a/Source/Editor/Content/Proxy/ParticleEmitterProxy.cs
+++ b/Source/Editor/Content/Proxy/ParticleEmitterProxy.cs
@@ -91,6 +91,10 @@ namespace FlaxEditor.Content
}
ParticleEmitter emitter = FlaxEngine.Content.LoadAsync(particleItem.ID);
+ if (emitter == null || emitter.WaitForLoaded())
+ {
+ Editor.LogError("Failed to load base particle emitter.");
+ }
ParticleSystemPreview tempPreview = new ParticleSystemPreview(false);
ParticleSystemTimeline timeline = new ParticleSystemTimeline(tempPreview);
diff --git a/Source/Editor/Content/Proxy/SkinnedModelProxy.cs b/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
index e05ca80d9..97e423a2d 100644
--- a/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
+++ b/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
@@ -2,6 +2,10 @@
using System;
using FlaxEditor.Content.Thumbnails;
+using FlaxEditor.GUI.ContextMenu;
+using FlaxEditor.GUI.Docking;
+using FlaxEditor.Options;
+using FlaxEditor.Surface;
using FlaxEditor.Viewport.Previews;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
@@ -39,6 +43,57 @@ namespace FlaxEditor.Content
///
public override Type AssetType => typeof(SkinnedModel);
+ ///
+ public override void OnContentWindowContextMenu(ContextMenu menu, ContentItem item)
+ {
+ base.OnContentWindowContextMenu(menu, item);
+
+ if (item is BinaryAssetItem binaryAssetItem)
+ {
+ var button = menu.AddButton("Create Animation Graph", CreateAnimationGraphClicked);
+ button.Tag = binaryAssetItem;
+ }
+ }
+
+ private void CreateAnimationGraphClicked(ContextMenuButton obj)
+ {
+ var binaryAssetItem = (BinaryAssetItem)obj.Tag;
+ CreateAnimationGraph(binaryAssetItem);
+ }
+
+ ///
+ /// Creates the animation graph from the given particle emitter.
+ ///
+ /// The skinned model item to use as the base model for the animation graph.
+ public static void CreateAnimationGraph(BinaryAssetItem skinnedModelItem)
+ {
+ var animationGraphName = skinnedModelItem.ShortName + " Graph";
+ var animationGraphProxy = Editor.Instance.ContentDatabase.GetProxy();
+ Editor.Instance.Windows.ContentWin.NewItem(animationGraphProxy, null, item => OnAnimationGraphCreated(item, skinnedModelItem), animationGraphName);
+ }
+
+ private static void OnAnimationGraphCreated(ContentItem item, BinaryAssetItem skinnedModelItem)
+ {
+ var skinnedModel = FlaxEngine.Content.LoadAsync(skinnedModelItem.ID);
+ if (skinnedModel == null || skinnedModel.WaitForLoaded())
+ {
+ Editor.LogError("Failed to load base skinned model.");
+ }
+
+ // Hack the animation graph window to modify the base model of the animation graph.
+ AnimationGraphWindow win = new AnimationGraphWindow(Editor.Instance, item as AssetItem);
+ win.Show();
+
+ // Ensure the window knows the asset is loaded so we can save it later.
+ win.Asset.WaitForLoaded();
+ win.Update(0); // Call Update() to refresh the loaded flag.
+
+ win.SetBaseModel(skinnedModel);
+ win.Surface.MarkAsEdited();
+ win.Save();
+ win.Close();
+ }
+
///
public override void OnThumbnailDrawPrepare(ThumbnailRequest request)
{
diff --git a/Source/Editor/Windows/Assets/AnimationGraphWindow.cs b/Source/Editor/Windows/Assets/AnimationGraphWindow.cs
index 9d65e5f7b..e75becf72 100644
--- a/Source/Editor/Windows/Assets/AnimationGraphWindow.cs
+++ b/Source/Editor/Windows/Assets/AnimationGraphWindow.cs
@@ -295,6 +295,15 @@ namespace FlaxEditor.Windows.Assets
base.SetParameter(index, value);
}
+ ///
+ /// Sets the base model of the animation graph this window is editing.
+ ///
+ /// The new base model.
+ public void SetBaseModel(SkinnedModel baseModel)
+ {
+ _properties.BaseModel = baseModel;
+ }
+
///
protected override void UnlinkItem()
{
From 873ac347d4b81fa1a65e7daeaf7dbe3588558ad5 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Wed, 10 Apr 2024 16:30:39 -0400
Subject: [PATCH 037/114] Remove extra usings.
---
Source/Editor/Content/Proxy/SkinnedModelProxy.cs | 3 ---
1 file changed, 3 deletions(-)
diff --git a/Source/Editor/Content/Proxy/SkinnedModelProxy.cs b/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
index 97e423a2d..163df87da 100644
--- a/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
+++ b/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
@@ -3,9 +3,6 @@
using System;
using FlaxEditor.Content.Thumbnails;
using FlaxEditor.GUI.ContextMenu;
-using FlaxEditor.GUI.Docking;
-using FlaxEditor.Options;
-using FlaxEditor.Surface;
using FlaxEditor.Viewport.Previews;
using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
From 8ef38178e6e16e52c823275fd048c4bbd838752f Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Wed, 10 Apr 2024 18:13:27 -0400
Subject: [PATCH 038/114] Allow the user to pick prefab type upon creation of a
prefab.
---
.../Content/Create/PrefabCreateEntry.cs | 72 +++++++++++++++++++
Source/Editor/Content/Proxy/PrefabProxy.cs | 16 ++---
2 files changed, 76 insertions(+), 12 deletions(-)
create mode 100644 Source/Editor/Content/Create/PrefabCreateEntry.cs
diff --git a/Source/Editor/Content/Create/PrefabCreateEntry.cs b/Source/Editor/Content/Create/PrefabCreateEntry.cs
new file mode 100644
index 000000000..b307f09dd
--- /dev/null
+++ b/Source/Editor/Content/Create/PrefabCreateEntry.cs
@@ -0,0 +1,72 @@
+// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
+
+using System;
+using FlaxEditor.Scripting;
+using FlaxEngine;
+using Object = FlaxEngine.Object;
+
+namespace FlaxEditor.Content.Create
+{
+ ///
+ /// Visual Script asset creating handler. Allows to specify base class to inherit from.
+ ///
+ ///
+ public class PrefabCreateEntry : CreateFileEntry
+ {
+ ///
+ /// The create options.
+ ///
+ public class Options
+ {
+ ///
+ /// The root actor.
+ ///
+ [TypeReference(typeof(FlaxEngine.Actor), nameof(IsValid))]
+ [Tooltip("The actor type of the root of the new Prefab.")]
+ public Type RootActorType = typeof(EmptyActor);
+
+ private static bool IsValid(Type type)
+ {
+ return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType;
+ }
+ }
+
+ private readonly Options _options = new Options();
+
+ ///
+ public override object Settings => _options;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The result file url.
+ public PrefabCreateEntry(string resultUrl)
+ : base("Settings", resultUrl)
+ {
+ }
+
+ ///
+ public override bool Create()
+ {
+ if (_options.RootActorType == null)
+ _options.RootActorType = typeof(EmptyActor);
+
+ ScriptType actorType = new ScriptType(_options.RootActorType);
+
+ Actor actor = null;
+ try
+ {
+ actor = actorType.CreateInstance() as Actor;
+ Object.Destroy(actor, 20.0f);
+ }
+ catch (Exception ex)
+ {
+ Editor.LogError("Failed to create prefab with root actor type: " + actorType.Name);
+ Editor.LogWarning(ex);
+ return true;
+ }
+
+ return PrefabManager.CreatePrefab(actor, ResultUrl, true);
+ }
+ }
+}
diff --git a/Source/Editor/Content/Proxy/PrefabProxy.cs b/Source/Editor/Content/Proxy/PrefabProxy.cs
index 18860995e..a97b6232f 100644
--- a/Source/Editor/Content/Proxy/PrefabProxy.cs
+++ b/Source/Editor/Content/Proxy/PrefabProxy.cs
@@ -2,6 +2,7 @@
using System;
using System.IO;
+using FlaxEditor.Content.Create;
using FlaxEditor.Content.Thumbnails;
using FlaxEditor.Viewport.Previews;
using FlaxEditor.Windows;
@@ -76,30 +77,21 @@ namespace FlaxEditor.Content
///
public override void Create(string outputPath, object arg)
{
- bool resetTransform = false;
var transform = Transform.Identity;
if (!(arg is Actor actor))
{
- // Create default prefab root object
- actor = new EmptyActor
- {
- Name = "Root"
- };
-
- // Cleanup it after usage
- Object.Destroy(actor, 20.0f);
+ Editor.Instance.ContentImporting.Create(new PrefabCreateEntry(outputPath));
+ return;
}
else if (actor.Scene != null)
{
// Create prefab with identity transform so the actor instance on a level will have it customized
- resetTransform = true;
transform = actor.LocalTransform;
actor.LocalTransform = Transform.Identity;
}
PrefabManager.CreatePrefab(actor, outputPath, true);
- if (resetTransform)
- actor.LocalTransform = transform;
+ actor.LocalTransform = transform;
}
///
From fe6c254a2496889fce842e42cdcab864ba3e9600 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Wed, 10 Apr 2024 18:47:01 -0400
Subject: [PATCH 039/114] Support displaying "Widget" instead of "Prefab" in
the type description.
---
Source/Editor/Content/Items/PrefabItem.cs | 26 +++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/Source/Editor/Content/Items/PrefabItem.cs b/Source/Editor/Content/Items/PrefabItem.cs
index a61e07e7c..6394ed52c 100644
--- a/Source/Editor/Content/Items/PrefabItem.cs
+++ b/Source/Editor/Content/Items/PrefabItem.cs
@@ -42,6 +42,32 @@ namespace FlaxEditor.Content
///
public override SpriteHandle DefaultThumbnail => SpriteHandle.Invalid;
+ private string _cachedTypeDescription = null;
+
+ ///
+ public override string TypeDescription
+ {
+ get
+ {
+ if (_cachedTypeDescription != null)
+ return _cachedTypeDescription;
+
+ Prefab prefab = FlaxEngine.Content.LoadAsync(ID);
+ if (prefab.WaitForLoaded(5000))
+ {
+ _cachedTypeDescription = "Prefab";
+ }
+
+ Actor root = prefab.GetDefaultInstance();
+ if (root is UIControl or UICanvas)
+ _cachedTypeDescription = "Widget";
+ else
+ _cachedTypeDescription = "Prefab";
+
+ return _cachedTypeDescription;
+ }
+ }
+
///
public override bool IsOfType(Type type)
{
From 019230f6d9077ec025a5c6a84cc5bf4d8a9013f3 Mon Sep 17 00:00:00 2001
From: Menotdan <32620310+Menotdan@users.noreply.github.com>
Date: Thu, 11 Apr 2024 00:03:04 -0400
Subject: [PATCH 040/114] Allow users to choose what type of widget they want
to create.
---
.../Content/Create/PrefabCreateEntry.cs | 111 +++++++++++++++++-
Source/Editor/Content/Proxy/PrefabProxy.cs | 14 +--
2 files changed, 112 insertions(+), 13 deletions(-)
diff --git a/Source/Editor/Content/Create/PrefabCreateEntry.cs b/Source/Editor/Content/Create/PrefabCreateEntry.cs
index b307f09dd..e207343a5 100644
--- a/Source/Editor/Content/Create/PrefabCreateEntry.cs
+++ b/Source/Editor/Content/Create/PrefabCreateEntry.cs
@@ -3,12 +3,13 @@
using System;
using FlaxEditor.Scripting;
using FlaxEngine;
+using FlaxEngine.GUI;
using Object = FlaxEngine.Object;
namespace FlaxEditor.Content.Create
{
///
- /// Visual Script asset creating handler. Allows to specify base class to inherit from.
+ /// Prefab asset creating handler. Allows to specify base actor to use as the root.
///
///
public class PrefabCreateEntry : CreateFileEntry
@@ -69,4 +70,112 @@ namespace FlaxEditor.Content.Create
return PrefabManager.CreatePrefab(actor, ResultUrl, true);
}
}
+
+ ///
+ /// Widget asset creating handler. Allows to specify base UIControl to use as the root.
+ ///
+ ///
+ public class WidgetCreateEntry : CreateFileEntry
+ {
+ ///
+ /// The create options.
+ ///
+ public class Options
+ {
+ ///
+ /// Which mode is used to initialize this widget.
+ ///
+ public enum WidgetMode
+ {
+ ///
+ /// Initialize the widget with a UICanvas.
+ ///
+ Canvas,
+
+ ///
+ /// Initialize the widget with a UIControl.
+ ///
+ Control
+ }
+
+ ///
+ /// The mode used to initialize the widget.
+ ///
+ [Tooltip("Whether to initialize the widget with a canvas or a control.")]
+ public WidgetMode WidgetInitializationMode = WidgetMode.Canvas;
+
+ bool ShowRoot => WidgetInitializationMode == WidgetMode.Control;
+
+ ///
+ /// The root control.
+ ///
+ [TypeReference(typeof(Control), nameof(IsValid))]
+ [Tooltip("The control type of the root of the new Widget's root control."), VisibleIf(nameof(ShowRoot))]
+ public Type RootControlType = typeof(Panel);
+
+ private static bool IsValid(Type type)
+ {
+ return (type.IsPublic || type.IsNestedPublic) && !type.IsAbstract && !type.IsGenericType;
+ }
+ }
+
+ private readonly Options _options = new Options();
+
+ ///
+ public override object Settings => _options;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The result file url.
+ public WidgetCreateEntry(string resultUrl)
+ : base("Settings", resultUrl)
+ {
+ }
+
+ ///
+ public override bool Create()
+ {
+ Actor actor = null;
+
+ if (_options.WidgetInitializationMode == Options.WidgetMode.Control)
+ {
+ if (_options.RootControlType == null)
+ _options.RootControlType = typeof(Control);
+
+ ScriptType controlType = new ScriptType(_options.RootControlType);
+
+ Control control = null;
+ try
+ {
+ control = controlType.CreateInstance() as Control;
+ }
+ catch (Exception ex)
+ {
+ Editor.LogError("Failed to create widget with root control type: " + controlType.Name);
+ Editor.LogWarning(ex);
+ return true;
+ }
+
+ UIControl newControl = new UIControl();
+ newControl.Control = control;
+
+ actor = newControl;
+ }
+ else if (_options.WidgetInitializationMode == Options.WidgetMode.Canvas)
+ {
+ actor = new UICanvas();
+ }
+
+ if (actor == null)
+ {
+ Editor.LogError("Failed to create widget. Final actor was null.");
+ return true;
+ }
+
+ Object.Destroy(actor, 20.0f);
+
+ return PrefabManager.CreatePrefab(actor, ResultUrl, true);
+ }
+ }
}
diff --git a/Source/Editor/Content/Proxy/PrefabProxy.cs b/Source/Editor/Content/Proxy/PrefabProxy.cs
index a97b6232f..fd4eefdf2 100644
--- a/Source/Editor/Content/Proxy/PrefabProxy.cs
+++ b/Source/Editor/Content/Proxy/PrefabProxy.cs
@@ -233,18 +233,8 @@ namespace FlaxEditor.Content
///
public override void Create(string outputPath, object arg)
{
- // Create prefab with UI Control
- var actor = new UIControl
- {
- Name = Path.GetFileNameWithoutExtension(outputPath),
- StaticFlags = StaticFlags.None,
- };
- actor.Control = new Button
- {
- Text = "Button",
- };
- PrefabManager.CreatePrefab(actor, outputPath, false);
- Object.Destroy(actor, 20.0f);
+ Editor.Instance.ContentImporting.Create(new WidgetCreateEntry(outputPath));
+ return;
}
}
}
From c22f8e3607cc01f53af0605132e076eabfe6bd23 Mon Sep 17 00:00:00 2001
From: Gary M
Date: Fri, 31 May 2024 18:38:38 -0700
Subject: [PATCH 041/114] Initial AGX Impl
---
Source/Engine/Graphics/PostProcessSettings.h | 5 ++
Source/Shaders/ColorGrading.shader | 58 ++++++++++++++++++++
2 files changed, 63 insertions(+)
diff --git a/Source/Engine/Graphics/PostProcessSettings.h b/Source/Engine/Graphics/PostProcessSettings.h
index 525da3f36..4f3e4e080 100644
--- a/Source/Engine/Graphics/PostProcessSettings.h
+++ b/Source/Engine/Graphics/PostProcessSettings.h
@@ -52,6 +52,11 @@ API_ENUM() enum class ToneMappingMode
/// The ACES Filmic reference tonemapper (approximation).
///
ACES = 2,
+
+ ///
+ /// The AGX tonemapper.
+ ///
+ AGX = 3,
};
///
diff --git a/Source/Shaders/ColorGrading.shader b/Source/Shaders/ColorGrading.shader
index ae4067b18..eea9c59e3 100644
--- a/Source/Shaders/ColorGrading.shader
+++ b/Source/Shaders/ColorGrading.shader
@@ -191,6 +191,60 @@ float3 TonemapACES(float3 linearColor)
return saturate(color);
}
+#ifdef TONE_MAPPING_MODE_AGX
+
+float3 agxAscCdl(float3 color, float3 slope, float3 offset, float3 power, float sat) {
+ const float3 lw = float3(0.2126, 0.7152, 0.0722);
+ float luma = dot(color, lw);
+ float3 c = pow(color * slope + offset, power);
+ return luma + sat * (c - luma);
+}
+
+float3 TonemapAGX(float3 linearColor)
+{
+ static const float3x3 AgXInsetMatrix = {
+ 0.8566, 0.1373, 0.1119,
+ 0.0951, 0.7612, 0.0768,
+ 0.0483, 0.1014, 0.8113
+ };
+
+ static const float3x3 AgXOutsetMatrix = {
+ 1.1271, -0.1413, -0.1413,
+ -0.1106, 1.1578, -0.1106,
+ -0.0165, -0.0165, 1.2519
+ };
+
+ static const float AgxMinEv = -12.47393;
+ static const float AgxMaxEv = 4.026069;
+
+ float3 color = linearColor;
+ color = mul(color, AgXInsetMatrix);
+ color = max(color, 1e-10);
+ color = clamp(log2(color), AgxMinEv, AgxMaxEv);
+ color = (color - AgxMinEv) / (AgxMaxEv - AgxMinEv);
+
+ color = clamp(color, 0.0, 1.0);
+
+ float3 x2 = color * color;
+ float3 x4 = x2 * x2;
+
+ color = + 15.5 * x4 * x2
+ - 40.14 * x4 * color
+ + 31.96 * x4
+ - 6.868 * x2 * color
+ + 0.4298 * x2
+ + 0.1191 * color
+ - 0.00232;
+
+ color = agxAscCdl(color, float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0), float3(1.35, 1.35, 1.35), 1.4);
+
+ color = mul(color, AgXOutsetMatrix);
+
+ color = clamp(color, 0.0, 1.0);
+
+ return color;
+}
+
#endif
// Perfoms the tonemapping on the input linear color
@@ -202,6 +256,8 @@ float3 Tonemap(float3 linearColor)
return TonemapNeutral(linearColor);
#elif defined(TONE_MAPPING_MODE_ACES)
return TonemapACES(linearColor);
+#elif defined(TONE_MAPPING_MODE_AGX)
+ return TonemapAGX(linearColor);
#else
return float3(0, 0, 0);
#endif
@@ -292,6 +348,7 @@ META_PS(true, FEATURE_LEVEL_ES2)
META_PERMUTATION_1(TONE_MAPPING_MODE_NONE=1)
META_PERMUTATION_1(TONE_MAPPING_MODE_NEUTRAL=1)
META_PERMUTATION_1(TONE_MAPPING_MODE_ACES=1)
+META_PERMUTATION_1(TONE_MAPPING_MODE_AGX=1)
float4 PS_Lut2D(Quad_VS2PS input) : SV_Target
{
return CombineLUTs(input.TexCoord, 0);
@@ -301,6 +358,7 @@ META_PS(true, FEATURE_LEVEL_ES2)
META_PERMUTATION_1(TONE_MAPPING_MODE_NONE=1)
META_PERMUTATION_1(TONE_MAPPING_MODE_NEUTRAL=1)
META_PERMUTATION_1(TONE_MAPPING_MODE_ACES=1)
+META_PERMUTATION_1(TONE_MAPPING_MODE_AGX=1)
float4 PS_Lut3D(Quad_GS2PS input) : SV_Target
{
return CombineLUTs(input.Vertex.TexCoord, input.LayerIndex);
From 1de395bc7befd963b0eaf7ac1cae5fcfdae0aa16 Mon Sep 17 00:00:00 2001
From: Gary M
Date: Fri, 31 May 2024 19:04:07 -0700
Subject: [PATCH 042/114] returned lost #endif
---
Source/Shaders/ColorGrading.shader | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Source/Shaders/ColorGrading.shader b/Source/Shaders/ColorGrading.shader
index eea9c59e3..fb36c4aa1 100644
--- a/Source/Shaders/ColorGrading.shader
+++ b/Source/Shaders/ColorGrading.shader
@@ -191,7 +191,9 @@ float3 TonemapACES(float3 linearColor)
return saturate(color);
}
-#ifdef TONE_MAPPING_MODE_AGX
+#endif
+
+#ifdef TONE_MAPPING_MODE_NEUTRAL
float3 agxAscCdl(float3 color, float3 slope, float3 offset, float3 power, float sat) {
const float3 lw = float3(0.2126, 0.7152, 0.0722);
From 063a5d1ae48bd513b5d6fafa21435356dc29c377 Mon Sep 17 00:00:00 2001
From: Gary M
Date: Fri, 31 May 2024 19:40:50 -0700
Subject: [PATCH 043/114] Disable "punchy" correction and add gamma correction
---
Source/Shaders/ColorGrading.shader | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Source/Shaders/ColorGrading.shader b/Source/Shaders/ColorGrading.shader
index fb36c4aa1..cd5d0faf6 100644
--- a/Source/Shaders/ColorGrading.shader
+++ b/Source/Shaders/ColorGrading.shader
@@ -238,10 +238,12 @@ float3 TonemapAGX(float3 linearColor)
+ 0.1191 * color
- 0.00232;
- color = agxAscCdl(color, float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0), float3(1.35, 1.35, 1.35), 1.4);
+ // color = agxAscCdl(color, float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0), float3(1.35, 1.35, 1.35), 1.4);
color = mul(color, AgXOutsetMatrix);
+ color = pow(max(float3(0.0, 0.0, 0.0), color), float3(2.2, 2.2, 2.2));
+
color = clamp(color, 0.0, 1.0);
return color;
From 5800dd2448c51d8a3b00532b54fa7f2be03fe364 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Thu, 22 Aug 2024 16:06:13 -0500
Subject: [PATCH 044/114] Shrink listen button in input editors.
---
.../Editors/BindableButtonEditor.cs | 24 ++++++++++++-------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/Source/Editor/CustomEditors/Editors/BindableButtonEditor.cs b/Source/Editor/CustomEditors/Editors/BindableButtonEditor.cs
index f8323bb49..91c508a33 100644
--- a/Source/Editor/CustomEditors/Editors/BindableButtonEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/BindableButtonEditor.cs
@@ -1,3 +1,4 @@
+using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.GUI;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -39,20 +40,27 @@ namespace FlaxEditor.CustomEditors.Editors
public override void Initialize(LayoutElementsContainer layout)
{
Window = layout.Control.RootWindow.Window;
+ var panelElement = layout.CustomContainer();
+ var panel = panelElement.ContainerControl as Panel;
- var panel = layout.CustomContainer();
- panel.CustomControl.SlotsHorizontally = 2;
- panel.CustomControl.SlotsVertically = 1;
-
- var button = panel.Button("Listen", "Press to listen for input events");
+ var button = panelElement.Button("Listen", "Press to listen for input events");
_button = button.Button;
+ _button.Width = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText("Listening...").X + 8;
+ _button.Height = ComboBox.DefaultHeight;
_button.Clicked += OnButtonClicked;
ResetButton();
- var padding = panel.CustomControl.SlotPadding;
- panel.CustomControl.Height = ComboBox.DefaultHeight + padding.Height;
+ panel.Height = ComboBox.DefaultHeight;
- base.Initialize(panel);
+ base.Initialize(panelElement);
+
+ if (panelElement.Children.Find(x => x is EnumElement) is EnumElement comboBoxElement)
+ {
+ var comboBox = comboBoxElement.ComboBox;
+ comboBox.AnchorPreset = AnchorPresets.StretchAll;
+ comboBox.Offsets = new Margin(0, _button.Width + 2, 0, 0);
+ comboBox.LocalX += _button.Width + 2;
+ }
}
///
From 5b42100581f4b0653556779704ba2ee13a5527c1 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 23 Aug 2024 10:12:43 -0500
Subject: [PATCH 045/114] Moved material instance override opetions into
setting button.
---
.../Windows/Assets/MaterialInstanceWindow.cs | 31 ++++++++++---------
1 file changed, 17 insertions(+), 14 deletions(-)
diff --git a/Source/Editor/Windows/Assets/MaterialInstanceWindow.cs b/Source/Editor/Windows/Assets/MaterialInstanceWindow.cs
index 28a4273b3..6e1f4c86b 100644
--- a/Source/Editor/Windows/Assets/MaterialInstanceWindow.cs
+++ b/Source/Editor/Windows/Assets/MaterialInstanceWindow.cs
@@ -9,10 +9,12 @@ using FlaxEditor.CustomEditors;
using FlaxEditor.CustomEditors.Editors;
using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.GUI;
+using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.Surface;
using FlaxEditor.Viewport.Previews;
using FlaxEngine;
using FlaxEngine.GUI;
+using FlaxEngine.Utilities;
namespace FlaxEditor.Windows.Assets
{
@@ -247,21 +249,9 @@ namespace FlaxEditor.Windows.Assets
if (parameters.Length == 0)
return;
- // Utility buttons
- {
- var buttons = layout.CustomContainer();
- var gridControl = buttons.CustomControl;
- gridControl.ClipChildren = false;
- gridControl.Height = Button.DefaultHeight;
- gridControl.SlotsHorizontally = 2;
- gridControl.SlotsVertically = 1;
- var rebuildButton = buttons.Button("Remove overrides", "Unchecks all overrides for parameters.").Button;
- rebuildButton.Clicked += OnRemoveOverrides;
- var removeButton = buttons.Button("Override all", "Checks all parameters overrides.").Button;
- removeButton.Clicked += OnOverrideAll;
- }
-
var parametersGroup = layout.Group("Parameters");
+ var settingButton = parametersGroup.AddSettingsButton();
+ settingButton.Clicked += (image, button) => OnSettingsButtonClicked(image, button, proxy.Window);
var baseMaterial = materialInstance.BaseMaterial;
var material = baseMaterial;
if (material)
@@ -323,6 +313,19 @@ namespace FlaxEditor.Windows.Assets
itemLayout.Property(label, valueContainer, null, e.Tooltip?.Text);
});
}
+
+ private void OnSettingsButtonClicked(Image image, MouseButton mouseButton, MaterialInstanceWindow window)
+ {
+ if (mouseButton != MouseButton.Left)
+ return;
+
+ var cm = new ContextMenu();
+ if (window != null)
+ cm.AddButton("Revert All Parameters", window.OnRevertAllParameters).TooltipText = "Reverts all the overridden parameters to the default values.";
+ cm.AddButton("Override All Parameters", OnOverrideAll).TooltipText = "Checks all parameters overrides.";
+ cm.AddButton("Remove Parameter Overrides", OnRemoveOverrides).TooltipText = "Unchecks all overrides for parameters.";
+ cm.Show(image, image.Size);
+ }
private void OnRemoveOverrides()
{
From 9c31a35f6b79afd4125d1441154c82f05bd1f536 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 23 Aug 2024 10:24:05 -0500
Subject: [PATCH 046/114] Remove revert button.
---
Source/Editor/Windows/Assets/MaterialInstanceWindow.cs | 2 --
1 file changed, 2 deletions(-)
diff --git a/Source/Editor/Windows/Assets/MaterialInstanceWindow.cs b/Source/Editor/Windows/Assets/MaterialInstanceWindow.cs
index 6e1f4c86b..fa2dba572 100644
--- a/Source/Editor/Windows/Assets/MaterialInstanceWindow.cs
+++ b/Source/Editor/Windows/Assets/MaterialInstanceWindow.cs
@@ -392,8 +392,6 @@ namespace FlaxEditor.Windows.Assets
_undoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Undo64, _undo.PerformUndo).LinkTooltip($"Undo ({inputOptions.Undo})");
_redoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Redo64, _undo.PerformRedo).LinkTooltip($"Redo ({inputOptions.Redo})");
_toolstrip.AddSeparator();
- _toolstrip.AddButton(Editor.Icons.Rotate64, OnRevertAllParameters).LinkTooltip("Revert all the parameters to the default values");
- _toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/graphics/materials/instanced-materials/index.html")).LinkTooltip("See documentation to learn more");
// Split Panel
From 21b187ab9f694e25b5ba1068eeab18aee8c408c1 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 23 Aug 2024 11:37:08 -0500
Subject: [PATCH 047/114] Use nameof for adding new Modules to build targets.
---
Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index 93296b766..bca6195b0 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -382,7 +382,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
// Get editor target and target files and add module
var files = Directory.GetFiles(path);
- var targetModuleText = $"Modules.Add(\"{moduleName}\");\n ";
+ var targetModuleText = $"Modules.Add(nameof({moduleName}));\n ";
foreach (var file in files)
{
if (!file.Contains(".Build.cs", StringComparison.OrdinalIgnoreCase))
From 5307ea85b533c208a5fa9f8a7602b910d1dc7c88 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 23 Aug 2024 16:27:32 -0500
Subject: [PATCH 048/114] Have new projects use nameof(Game).
---
Source/Editor/Editor.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Editor/Editor.cpp b/Source/Editor/Editor.cpp
index 4da379fac..b9b0f1fd8 100644
--- a/Source/Editor/Editor.cpp
+++ b/Source/Editor/Editor.cpp
@@ -476,7 +476,7 @@ int32 Editor::LoadProduct()
" base.Init();\n"
"\n"
" // Reference the modules for game\n"
- " Modules.Add(\"Game\");\n"
+ " Modules.Add(nameof(Game));\n"
" }\n"
"}\n"), Encoding::UTF8);
failed |= File::WriteAllText(projectPath / TEXT("Source/GameEditorTarget.Build.cs"),TEXT(
@@ -490,7 +490,7 @@ int32 Editor::LoadProduct()
" base.Init();\n"
"\n"
" // Reference the modules for editor\n"
- " Modules.Add(\"Game\");\n"
+ " Modules.Add(nameof(Game));\n"
" }\n"
"}\n"), Encoding::UTF8);
failed |= File::WriteAllText(projectPath / TEXT("Source/Game/Game.Build.cs"),TEXT(
From 22cf2570f583f79db1420803f93a38f5dbcb2000 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 23 Aug 2024 16:31:33 -0500
Subject: [PATCH 049/114] Add more nameof for finding and template code.
---
Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs | 2 +-
Source/Editor/Editor.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs
index 852fd99c5..d2aa85269 100644
--- a/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs
+++ b/Source/Editor/CustomEditors/Dedicated/ScriptsEditor.cs
@@ -261,7 +261,7 @@ namespace FlaxEditor.CustomEditors.Dedicated
if (!file.Contains("GameProjectTarget"))
continue; // Skip
- if (file.Contains("Modules.Add(\"Game\")"))
+ if (file.Contains("Modules.Add(\"Game\")") || file.Contains("Modules.Add(nameof(Game))"))
{
// Assume Game represents the main game module
moduleName = "Game";
diff --git a/Source/Editor/Editor.cpp b/Source/Editor/Editor.cpp
index b9b0f1fd8..09253851c 100644
--- a/Source/Editor/Editor.cpp
+++ b/Source/Editor/Editor.cpp
@@ -226,7 +226,7 @@ bool Editor::CheckProjectUpgrade()
" base.Init();\n"
"\n"
" // Reference the modules for game\n"
- " Modules.Add(\"{0}\");\n"
+ " Modules.Add(nameof({0}));\n"
" }}\n"
"}}\n"
), codeName), Encoding::UTF8);
@@ -242,7 +242,7 @@ bool Editor::CheckProjectUpgrade()
" base.Init();\n"
"\n"
" // Reference the modules for editor\n"
- " Modules.Add(\"{0}\");\n"
+ " Modules.Add(nameof({0}));\n"
"{1}"
" }}\n"
"}}\n"
From 9ebf98ce77f1ab1a41649cb0657904a768873163 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Mon, 26 Aug 2024 21:03:04 -0500
Subject: [PATCH 050/114] Fix null reference in Visject CM if there are no
elements associated with a node.
---
Source/Editor/Surface/ContextMenu/VisjectCM.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Surface/ContextMenu/VisjectCM.cs b/Source/Editor/Surface/ContextMenu/VisjectCM.cs
index 526c24fae..1f70cd645 100644
--- a/Source/Editor/Surface/ContextMenu/VisjectCM.cs
+++ b/Source/Editor/Surface/ContextMenu/VisjectCM.cs
@@ -875,7 +875,7 @@ namespace FlaxEditor.Surface.ContextMenu
AddInputOutputElement(archetype, output.Type, true, $"{output.Name} ({output.Type.Name})");
}
}
- else
+ else if (archetype.Elements != null) // Skip if no Elements (ex: Comment node)
{
foreach (var element in archetype.Elements)
{
From 0b3835f593e7bf3c063442fe5cdb2969ff994942 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Tue, 27 Aug 2024 15:12:58 +0200
Subject: [PATCH 051/114] Fix turbulence module in GPU particles far away from
world origin
#1944
---
Source/Engine/Particles/Graph/GPU/GPUParticles.cpp | 8 +++++---
Source/Shaders/Noise.hlsl | 14 ++++++++------
2 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/Source/Engine/Particles/Graph/GPU/GPUParticles.cpp b/Source/Engine/Particles/Graph/GPU/GPUParticles.cpp
index fae5e807a..8a995b595 100644
--- a/Source/Engine/Particles/Graph/GPU/GPUParticles.cpp
+++ b/Source/Engine/Particles/Graph/GPU/GPUParticles.cpp
@@ -66,12 +66,14 @@ bool GPUParticles::Init(ParticleEmitter* owner, MemoryReadStream& shaderCacheStr
LOG(Warning, "Missing valid GPU particles constant buffer.");
return true;
}
- if (cb0->GetSize() < sizeof(GPUParticlesData))
+ const int32 cbSize = cb0->GetSize();
+ if (cbSize < sizeof(GPUParticlesData))
{
- LOG(Warning, "Invalid size GPU particles constant buffer. required {0} bytes but got {1}", sizeof(GPUParticlesData), cb0->GetSize());
+ LOG(Warning, "Invalid size GPU particles constant buffer. required {0} bytes but got {1}", sizeof(GPUParticlesData), cbSize);
return true;
}
- _cbData.Resize(cb0->GetSize());
+ _cbData.Resize(cbSize);
+ Platform::MemoryClear(_cbData.Get(), cbSize);
// Load material parameters
if (_params.Load(materialParamsStream))
diff --git a/Source/Shaders/Noise.hlsl b/Source/Shaders/Noise.hlsl
index 7297145d4..742a95ce3 100644
--- a/Source/Shaders/Noise.hlsl
+++ b/Source/Shaders/Noise.hlsl
@@ -321,23 +321,25 @@ float3 CustomNoise3D(float3 p)
float c = CustomNoise(p + float3(0.0f, 0.0f, 0.0001f));
float3 grad = float3(o - a, o - b, o - c);
- float3 other = abs(grad.zxy);
- return normalize(cross(grad,other));
+ float3 ret = cross(grad, abs(grad.zxy));
+ if (length(ret) <= 0.0001f) return float3(0.0f, 0.0f, 0.0f);
+ return normalize(ret);
}
float3 CustomNoise3D(float3 position, int octaves, float roughness)
{
float weight = 0.0f;
- float3 noise = float3(0.0, 0.0, 0.0);
+ float3 noise = float3(0.0f, 0.0f, 0.0f);
float scale = 1.0f;
+ roughness = lerp(2.0f, 0.2f, roughness);
for (int i = 0; i < octaves; i++)
{
- float curWeight = pow((1.0 - ((float)i / octaves)), lerp(2.0, 0.2, roughness));
+ float curWeight = pow((1.0f - ((float)i / (float)octaves)), roughness);
noise += CustomNoise3D(position * scale) * curWeight;
weight += curWeight;
- scale *= 1.72531;
+ scale *= 1.72531f;
}
- return noise / weight;
+ return noise / max(weight, 0.0001f);
}
#endif
From 6930139f9af67158846a544eb0e20d17ad73e1f5 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 11:27:09 -0500
Subject: [PATCH 052/114] Add saving collection groups. Add open all and close
all menu buttons for collections.
---
.../CustomEditors/Editors/CollectionEditor.cs | 104 +++++++++++++++++-
.../Elements/Container/GroupElement.cs | 7 ++
.../CustomEditors/LayoutElementsContainer.cs | 5 +-
3 files changed, 113 insertions(+), 3 deletions(-)
diff --git a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
index 7c0670010..3c91d1575 100644
--- a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
@@ -2,14 +2,18 @@
using System;
using System.Collections;
+using System.Collections.Generic;
using System.Linq;
using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.GUI.Input;
using FlaxEditor.Content;
+using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Drag;
using FlaxEditor.SceneGraph;
using FlaxEditor.Scripting;
+using FlaxEditor.Windows;
+using FlaxEditor.Windows.Assets;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Utilities;
@@ -228,7 +232,38 @@ namespace FlaxEditor.CustomEditors.Editors
ArrowImageClosed = new SpriteBrush(icons.ArrowRight12);
ArrowImageOpened = new SpriteBrush(icons.ArrowDown12);
HeaderText = $"Element {index}";
- IsClosed = false;
+
+ string saveName = string.Empty;
+ if (editor.Presenter?.Owner is PropertiesWindow propertiesWindow)
+ {
+ var selection = FlaxEditor.Editor.Instance.SceneEditing.Selection[0];
+ if (selection != null)
+ {
+ saveName += $"{selection.ID},";
+ }
+ }
+ else if (editor.Presenter?.Owner is PrefabWindow prefabWindow)
+ {
+ var selection = prefabWindow.Selection[0];
+ if (selection != null)
+ {
+ saveName += $"{selection.ID},";
+ }
+ }
+ if (editor.ParentEditor?.Layout.ContainerControl is DropPanel pdp)
+ {
+ saveName += $"{pdp.HeaderText},";
+ }
+ if (editor.Layout.ContainerControl is DropPanel mainGroup)
+ {
+ saveName += $"{mainGroup.HeaderText}";
+ IsClosed = FlaxEditor.Editor.Instance.ProjectCache.IsGroupToggled($"{saveName}:{index}");
+ }
+ else
+ {
+ IsClosed = false;
+ }
+
Editor = editor;
Index = index;
Offsets = new Margin(7, 7, 0, 0);
@@ -239,6 +274,37 @@ namespace FlaxEditor.CustomEditors.Editors
HeaderTextMargin = new Margin(18, 0, 0, 0);
_arrangeButtonRect = new Rectangle(16, 3, 12, 12);
}
+ IsClosedChanged += OnIsClosedChanged;
+ }
+
+ private void OnIsClosedChanged(DropPanel panel)
+ {
+ string saveName = string.Empty;
+ if (Editor.Presenter?.Owner is PropertiesWindow pw)
+ {
+ var selection = FlaxEditor.Editor.Instance.SceneEditing.Selection[0];
+ if (selection != null)
+ {
+ saveName += $"{selection.ID},";
+ }
+ }
+ else if (Editor.Presenter?.Owner is PrefabWindow prefabWindow)
+ {
+ var selection = prefabWindow.Selection[0];
+ if (selection != null)
+ {
+ saveName += $"{selection.ID},";
+ }
+ }
+ if (Editor.ParentEditor?.Layout.ContainerControl is DropPanel pdp)
+ {
+ saveName += $"{pdp.HeaderText},";
+ }
+ if (Editor.Layout.ContainerControl is DropPanel mainGroup)
+ {
+ saveName += $"{mainGroup.HeaderText}";
+ FlaxEditor.Editor.Instance.ProjectCache.SetGroupToggle($"{saveName}:{Index}", panel.IsClosed);
+ }
}
private bool ArrangeAreaCheck(out int index, out Rectangle rect)
@@ -377,6 +443,7 @@ namespace FlaxEditor.CustomEditors.Editors
private bool _canResize;
private bool _canReorderItems;
private CollectionAttribute.DisplayType _displayType;
+ private List _cachedDropPanels = new List();
///
/// Gets the length of the collection.
@@ -519,6 +586,12 @@ namespace FlaxEditor.CustomEditors.Editors
(elementType.GetProperties().Length == 1 && elementType.GetFields().Length == 0) ||
elementType.Equals(new ScriptType(typeof(JsonAsset))) ||
elementType.Equals(new ScriptType(typeof(SettingsBase)));
+
+ if (_cachedDropPanels == null)
+ _cachedDropPanels = new List();
+ else
+ _cachedDropPanels.Clear();
+
for (int i = 0; i < size; i++)
{
// Apply spacing
@@ -542,6 +615,7 @@ namespace FlaxEditor.CustomEditors.Editors
else if (_displayType == CollectionAttribute.DisplayType.Header || (_displayType == CollectionAttribute.DisplayType.Default && !single))
{
var cdp = panel.CustomContainer();
+ _cachedDropPanels.Add(cdp.CustomControl);
cdp.CustomControl.Setup(this, i, _canReorderItems);
var itemLayout = cdp.VerticalPanel();
cdp.CustomControl.LinkedEditor = itemLayout.Object(new ListValueContainer(elementType, i, Values, attributes), overrideEditor);
@@ -549,6 +623,12 @@ namespace FlaxEditor.CustomEditors.Editors
GenericEditor.OnReadOnlyProperty(itemLayout);
}
}
+
+ if (_displayType == CollectionAttribute.DisplayType.Header || (_displayType == CollectionAttribute.DisplayType.Default && !single))
+ {
+ if (Layout is GroupElement g)
+ g.SetupContextMenu += OnSetupContextMenu;
+ }
}
_elementsCount = size;
@@ -583,6 +663,28 @@ namespace FlaxEditor.CustomEditors.Editors
}
}
+ private void OnSetupContextMenu(ContextMenu menu, DropPanel panel)
+ {
+ if (menu.Items.Any(x => x is ContextMenuButton b && b.Text.Equals("Open All", StringComparison.Ordinal)))
+ return;
+
+ menu.AddSeparator();
+ menu.AddButton("Open All", () =>
+ {
+ foreach (var cachedPanel in _cachedDropPanels)
+ {
+ cachedPanel.IsClosed = false;
+ }
+ });
+ menu.AddButton("Close All", () =>
+ {
+ foreach (var cachedPanel in _cachedDropPanels)
+ {
+ cachedPanel.IsClosed = true;
+ }
+ });
+ }
+
///
protected override void Deinitialize()
{
diff --git a/Source/Editor/CustomEditors/Elements/Container/GroupElement.cs b/Source/Editor/CustomEditors/Elements/Container/GroupElement.cs
index 58f36737c..972f64ba6 100644
--- a/Source/Editor/CustomEditors/Elements/Container/GroupElement.cs
+++ b/Source/Editor/CustomEditors/Elements/Container/GroupElement.cs
@@ -1,5 +1,7 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
+using System;
+using FlaxEditor.GUI.ContextMenu;
using FlaxEngine;
using FlaxEngine.GUI;
@@ -24,6 +26,11 @@ namespace FlaxEditor.CustomEditors.Elements
EnableContainmentLines = true,
};
+ ///
+ /// Event is fired if the group can setup a context menu and the context menu is being setup.
+ ///
+ public Action SetupContextMenu;
+
///
public override ContainerControl ContainerControl => Panel;
diff --git a/Source/Editor/CustomEditors/LayoutElementsContainer.cs b/Source/Editor/CustomEditors/LayoutElementsContainer.cs
index 0ec88238e..26d469434 100644
--- a/Source/Editor/CustomEditors/LayoutElementsContainer.cs
+++ b/Source/Editor/CustomEditors/LayoutElementsContainer.cs
@@ -74,11 +74,11 @@ namespace FlaxEditor.CustomEditors
{
var element = Group(title, useTransparentHeader);
element.Panel.Tag = linkedEditor;
- element.Panel.MouseButtonRightClicked += OnGroupPanelMouseButtonRightClicked;
+ element.Panel.MouseButtonRightClicked += (panel, location) => OnGroupPanelMouseButtonRightClicked(element, panel, location);
return element;
}
- private void OnGroupPanelMouseButtonRightClicked(DropPanel groupPanel, Float2 location)
+ private void OnGroupPanelMouseButtonRightClicked(GroupElement element, DropPanel groupPanel, Float2 location)
{
var linkedEditor = (CustomEditor)groupPanel.Tag;
var menu = new ContextMenu();
@@ -91,6 +91,7 @@ namespace FlaxEditor.CustomEditors
menu.AddButton("Copy", linkedEditor.Copy);
var paste = menu.AddButton("Paste", linkedEditor.Paste);
paste.Enabled = linkedEditor.CanPaste;
+ element.SetupContextMenu?.Invoke(menu, groupPanel);
menu.Show(groupPanel, location);
}
From 3bffc927f6ab4931a63e81fbecbbcf58704b1cdf Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 14:54:21 -0500
Subject: [PATCH 053/114] Add cleaning up modules from target files when
deleted.
---
.../Editor/Modules/ContentDatabaseModule.cs | 4 ++
.../SourceCodeEditing/CodeEditingModule.cs | 68 +++++++++++++++++++
2 files changed, 72 insertions(+)
diff --git a/Source/Editor/Modules/ContentDatabaseModule.cs b/Source/Editor/Modules/ContentDatabaseModule.cs
index aab5d1b39..ee035c809 100644
--- a/Source/Editor/Modules/ContentDatabaseModule.cs
+++ b/Source/Editor/Modules/ContentDatabaseModule.cs
@@ -704,6 +704,10 @@ namespace FlaxEditor.Modules
}
else
{
+ // try to remove module if build.cs file is being deleted
+ if (item.Path.Contains(".Build.cs", StringComparison.Ordinal) && item.ItemType == ContentItemType.Script)
+ Editor.Instance.CodeEditing.RemoveModule(item.Path);
+
// Check if it's an asset
if (item.IsAsset)
{
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index 93296b766..9a1e0e816 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -404,6 +404,74 @@ namespace FlaxEditor.Modules.SourceCodeEditing
}
}
+ internal void RemoveModule(string path)
+ {
+ if (!File.Exists(path))
+ return;
+
+ // Read text, figure out if it is an editor module or game module
+ var editorModule = false;
+ var moduleTextIndex = -1;
+ var fileText = File.ReadAllText(path);
+ if (fileText.Contains("GameModule", StringComparison.Ordinal))
+ {
+ moduleTextIndex = fileText.IndexOf("GameModule", StringComparison.Ordinal);
+ }
+ else if (fileText.Contains("GameEditorModule", StringComparison.Ordinal))
+ {
+ moduleTextIndex = fileText.IndexOf("GameEditorModule", StringComparison.Ordinal);
+ editorModule = true;
+ }
+ else
+ {
+ // If it does not contain a module, then this could be target file and not a module file
+ return;
+ }
+
+ // Get module name
+ var classTextIndex = fileText.IndexOf("class ", StringComparison.Ordinal);
+ var className = fileText.Substring(classTextIndex, moduleTextIndex - classTextIndex).Replace("class ", "").Replace(":", "").Trim();
+ Editor.Log($"Removing Module: {className}");
+
+ // Find target files
+ // Assume Target files are in the source directory that is up 2 levels
+ var sourceDirectoryInfo = Directory.GetParent(path)?.Parent;
+ if (sourceDirectoryInfo != null)
+ {
+ var sourceFiles = Directory.GetFiles(sourceDirectoryInfo.FullName);
+ // Search target files for module name and remove it
+ foreach (var file in sourceFiles)
+ {
+ if (!file.Contains(".Build.cs", StringComparison.OrdinalIgnoreCase))
+ continue;
+ var targetText = File.ReadAllText(file);
+
+ // Skip game project if it is suppose to be an editor module
+ if (editorModule && targetText.Contains("GameProjectTarget", StringComparison.Ordinal))
+ continue;
+
+ var newText = targetText;
+ bool removedModuleText = false;
+ if (targetText.Contains($"Modules.Add(\"{className}\")"))
+ {
+ newText = newText.Replace($"Modules.Add(\"{className}\")\n", "").Replace($"Modules.Add(\"{className}\")", "");
+ removedModuleText = true;
+ }
+
+ if (targetText.Contains($"Modules.Add(nameof({className}))"))
+ {
+ newText = newText.Replace($"Modules.Add(nameof({className}))\n", "").Replace($"Modules.Add(nameof({className}))", "");
+ removedModuleText = true;
+ }
+ if (removedModuleText)
+ {
+ File.WriteAllText(file, newText);
+ Editor.Log($"Removed Module: {className} from {file}");
+ }
+ }
+ }
+ }
+
///
public override void OnUpdate()
{
From dd655d8c8d00c09d56c381b501424ec5133c6053 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 15:19:52 -0500
Subject: [PATCH 054/114] Add removing generated module files.
---
.../SourceCodeEditing/CodeEditingModule.cs | 51 +++++++++++--------
1 file changed, 29 insertions(+), 22 deletions(-)
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index 9a1e0e816..63996519e 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -442,31 +442,38 @@ namespace FlaxEditor.Modules.SourceCodeEditing
// Search target files for module name and remove it
foreach (var file in sourceFiles)
{
- if (!file.Contains(".Build.cs", StringComparison.OrdinalIgnoreCase))
- continue;
- var targetText = File.ReadAllText(file);
-
- // Skip game project if it is suppose to be an editor module
- if (editorModule && targetText.Contains("GameProjectTarget", StringComparison.Ordinal))
- continue;
-
- var newText = targetText;
- bool removedModuleText = false;
- if (targetText.Contains($"Modules.Add(\"{className}\")"))
+ string fileName = Path.GetFileName(file);
+ if (file.Contains(".Build.cs", StringComparison.OrdinalIgnoreCase))
{
- newText = newText.Replace($"Modules.Add(\"{className}\")\n", "").Replace($"Modules.Add(\"{className}\")", "");
- removedModuleText = true;
+ var targetText = File.ReadAllText(file);
+
+ // Skip game project if it is suppose to be an editor module
+ if (editorModule && targetText.Contains("GameProjectTarget", StringComparison.Ordinal))
+ continue;
+
+ var newText = targetText;
+ bool removedModuleText = false;
+ if (targetText.Contains($"Modules.Add(\"{className}\")"))
+ {
+ newText = newText.Replace($"Modules.Add(\"{className}\")\n", "").Replace($"Modules.Add(\"{className}\")", "");
+ removedModuleText = true;
+ }
+
+ if (targetText.Contains($"Modules.Add(nameof({className}))"))
+ {
+ newText = newText.Replace($"Modules.Add(nameof({className}))\n", "").Replace($"Modules.Add(nameof({className}))", "");
+ removedModuleText = true;
+ }
+ if (removedModuleText)
+ {
+ File.WriteAllText(file, newText);
+ Editor.Log($"Removed Module: {className} from {file}");
+ }
}
-
- if (targetText.Contains($"Modules.Add(nameof({className}))"))
+ // remove Generated module files
+ else if (fileName.Contains($"{className}.csproj", StringComparison.OrdinalIgnoreCase) || fileName.Contains($"{className}.Gen.cs", StringComparison.OrdinalIgnoreCase))
{
- newText = newText.Replace($"Modules.Add(nameof({className}))\n", "").Replace($"Modules.Add(nameof({className}))", "");
- removedModuleText = true;
- }
- if (removedModuleText)
- {
- File.WriteAllText(file, newText);
- Editor.Log($"Removed Module: {className} from {file}");
+ File.Delete(file);
}
}
}
From e4e568ae6af1fc71ac4749ae0f03aaf3f3920b5c Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 15:21:49 -0500
Subject: [PATCH 055/114] Code style fix
---
Source/Editor/Modules/ContentDatabaseModule.cs | 2 +-
Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Editor/Modules/ContentDatabaseModule.cs b/Source/Editor/Modules/ContentDatabaseModule.cs
index ee035c809..0bff9ae72 100644
--- a/Source/Editor/Modules/ContentDatabaseModule.cs
+++ b/Source/Editor/Modules/ContentDatabaseModule.cs
@@ -704,7 +704,7 @@ namespace FlaxEditor.Modules
}
else
{
- // try to remove module if build.cs file is being deleted
+ // Try to remove module if build.cs file is being deleted
if (item.Path.Contains(".Build.cs", StringComparison.Ordinal) && item.ItemType == ContentItemType.Script)
Editor.Instance.CodeEditing.RemoveModule(item.Path);
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index 63996519e..cc1649dad 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -470,7 +470,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
Editor.Log($"Removed Module: {className} from {file}");
}
}
- // remove Generated module files
+ // Remove Generated module files
else if (fileName.Contains($"{className}.csproj", StringComparison.OrdinalIgnoreCase) || fileName.Contains($"{className}.Gen.cs", StringComparison.OrdinalIgnoreCase))
{
File.Delete(file);
From 2941ccc93bb17245b3b6d43fd4b7642b7d7dc6e0 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 15:31:27 -0500
Subject: [PATCH 056/114] Add removing generated cpp and h files.
---
.../SourceCodeEditing/CodeEditingModule.cs | 5 +-
Source/Flax.json | 19162 ++++++++++++++++
2 files changed, 19166 insertions(+), 1 deletion(-)
create mode 100644 Source/Flax.json
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index cc1649dad..8f6d4a17f 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -471,7 +471,10 @@ namespace FlaxEditor.Modules.SourceCodeEditing
}
}
// Remove Generated module files
- else if (fileName.Contains($"{className}.csproj", StringComparison.OrdinalIgnoreCase) || fileName.Contains($"{className}.Gen.cs", StringComparison.OrdinalIgnoreCase))
+ else if (fileName.Equals($"{className}.csproj", StringComparison.OrdinalIgnoreCase) ||
+ fileName.Equals($"{className}.Gen.cs", StringComparison.OrdinalIgnoreCase) ||
+ fileName.Equals($"{className}.Gen.cpp", StringComparison.OrdinalIgnoreCase) ||
+ fileName.Equals($"{className}.Gen.h", StringComparison.OrdinalIgnoreCase))
{
File.Delete(file);
}
diff --git a/Source/Flax.json b/Source/Flax.json
new file mode 100644
index 000000000..321899e81
--- /dev/null
+++ b/Source/Flax.json
@@ -0,0 +1,19162 @@
+{
+ "version": 2,
+ "warnings": [
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Parsing.cs",
+ "line": 297,
+ "endLine": 297,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1997543523,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3111",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cache.cs",
+ "line": 107,
+ "endLine": 107,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 96617,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Checking value of \u0027e\u0027 for null will always return false when generic type is instantiated with a value type.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ActorTrack.cs",
+ "line": 190,
+ "endLine": 190,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 572139940,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 394,
+ "endLine": 394,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917384890,
+ "currentLine": 47033653,
+ "nextLine": 917253816,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 811,
+ "endLine": 811,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1347632307,
+ "currentLine": 190804925,
+ "nextLine": 1601225548,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: tangentOutSize \u003d\u003d 0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 731,
+ "endLine": 731,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1336455718,
+ "currentLine": 1853667784,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 311,
+ "endLine": 311,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917384890,
+ "currentLine": 47033653,
+ "nextLine": 917253816,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Cache\\Intermediate\\FlaxEditor\\Windows\\x64\\Development\\Platform\\Platform.Bindings.Gen.cs",
+ "line": 700,
+ "endLine": 700,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 102185,
+ "currentLine": -657814309,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027NetworkSocketState\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\InputAxis.cs",
+ "line": 10,
+ "endLine": 10,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": 1278254139,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\InputAxis.cs",
+ "line": 69,
+ "endLine": 69,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027InputAxis\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 336,
+ "endLine": 336,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917253816,
+ "currentLine": 47033525,
+ "nextLine": 917122750,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
+ "line": 806,
+ "endLine": 806,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1574892352,
+ "currentLine": 593227761,
+ "nextLine": 5607,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027comment\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
+ "line": 119,
+ "endLine": 119,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1365377842,
+ "nextLine": 609264753,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027cam\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3149",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\SkeletonMaskWindow.cs",
+ "line": 171,
+ "endLine": 171,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1606944,
+ "currentLine": 1039555715,
+ "nextLine": -684417925,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\SkeletonMaskWindow.cs",
+ "line": 177,
+ "endLine": 177,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Dereferencing the result of \u0027as\u0027 operator inside method can lead to NullReferenceException. Consider inspecting 1st argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\vorbis.cs",
+ "line": 319,
+ "endLine": 319,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1398780498,
+ "nextLine": 1810511480,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\vorbis.cs",
+ "line": 395,
+ "endLine": 395,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\NativeCpp\\Builder.NativeCpp.cs",
+ "line": 128,
+ "endLine": 128,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1680745514,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027Types\u0027 enum: Custom.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\KeyframesPropertyTrack.cs",
+ "line": 211,
+ "endLine": 211,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": -1065348209,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
+ "line": 220,
+ "endLine": 220,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -991102859,
+ "currentLine": -1890149653,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027enableReflectionScan \u0026\u0026 enableReflection\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3107",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\MainEditorGizmoViewport.cs",
+ "line": 547,
+ "endLine": 547,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1379169572,
+ "currentLine": -1236601848,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Identical expression \u0027trans.Orientation\u0027 to the left and to the right of compound assignment.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
+ "line": 235,
+ "endLine": 235,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -1469447537,
+ "nextLine": -325646387,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027enableReflection || enableStackTrace\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.cs",
+ "line": 165,
+ "endLine": 165,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 661171719,
+ "currentLine": 78685322,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027concurrency \u003d\u003d 1 || headerFiles.Count \u003c 2 * concurrency\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 652,
+ "endLine": 652,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1750909514,
+ "currentLine": 10823529,
+ "nextLine": -1103469594,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 550,
+ "endLine": 550,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 950843304,
+ "currentLine": 10823529,
+ "nextLine": 2038381358,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Constants.cs",
+ "line": 147,
+ "endLine": 147,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1648452085,
+ "currentLine": 857321307,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\UIEditorGizmo.cs",
+ "line": 72,
+ "endLine": 72,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -886791132,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: Get\u003cTransformGizmo\u003e().",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\ContentDatabaseModule.cs",
+ "line": 874,
+ "endLine": 874,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1065558299,
+ "currentLine": 638770021,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027proxy\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3127",
+ "cwe": 682,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Float2.cs",
+ "line": 1150,
+ "endLine": 1150,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 69909699,
+ "currentLine": 69926081,
+ "nextLine": 69893321,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Float2.cs",
+ "line": 1151,
+ "endLine": 1151,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two similar code fragments were found. Perhaps, this is a typo and \u0027x\u0027 variable should be used instead of \u0027y\u0027",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Track.cs",
+ "line": 789,
+ "endLine": 789,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 84360609,
+ "currentLine": 699150524,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027_dragOverMode \u003d\u003d DragItemPositioning.None\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3203",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
+ "line": 203,
+ "endLine": 203,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1060214777,
+ "currentLine": 1566275533,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Method parameter is not used: task.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\ParticleEmitterWindow.cs",
+ "line": 189,
+ "endLine": 189,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3042",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\SceneAnimationWindow.cs",
+ "line": 768,
+ "endLine": 768,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1566164569,
+ "nextLine": 249095867,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\SceneAnimationWindow.cs",
+ "line": 766,
+ "endLine": 766,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible NullReferenceException. The \u0027?.\u0027 and \u0027.\u0027 operators are used for accessing members of the \u0027_timeline.Player\u0027 object",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3149",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\CameraNode.cs",
+ "line": 42,
+ "endLine": 42,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -449019765,
+ "currentLine": -951197349,
+ "nextLine": -1167085765,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\CameraNode.cs",
+ "line": 40,
+ "endLine": 40,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Dereferencing the result of \u0027as\u0027 operator can lead to NullReferenceException. Consider inspecting \u0027c\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
+ "line": 396,
+ "endLine": 396,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1067060564,
+ "currentLine": -683992937,
+ "nextLine": 2024458693,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027rerouteNode\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 244,
+ "endLine": 244,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": -1616879417,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\AppleToolchain.cs",
+ "line": 359,
+ "endLine": 359,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 772883963,
+ "currentLine": 23955995,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useResponseFile\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 178,
+ "endLine": 178,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1879261150,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027base.OnMouseDoubleClick(location, button)\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\NavigationBar.cs",
+ "line": 55,
+ "endLine": 55,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1592926815,
+ "currentLine": 1745567774,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027lastToolstripButton\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Proxy\\PrefabProxy.cs",
+ "line": 83,
+ "endLine": 83,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1265294171,
+ "currentLine": -1964991594,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027prefab\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\History\\IHistoryAction.cs",
+ "line": 8,
+ "endLine": 8,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": -1305851679,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\History\\IHistoryAction.cs",
+ "line": 18,
+ "endLine": 18,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027IHistoryAction\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3171",
+ "cwe": 839,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1655,
+ "endLine": 1655,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5749057,
+ "currentLine": 5757249,
+ "nextLine": 5765441,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Undo\\AddRemoveNodeAction.cs",
+ "line": 67,
+ "endLine": 67,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 71909,
+ "currentLine": -1900546295,
+ "nextLine": -1589389399,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Undo\\AddRemoveNodeAction.cs",
+ "line": 69,
+ "endLine": 69,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_nodeValues\u0027 object was used before it was verified against null. Check lines: 67, 69.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\NativeCpp\\Builder.NativeCpp.cs",
+ "line": 506,
+ "endLine": 506,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1844710205,
+ "currentLine": 1728920059,
+ "nextLine": -206239522,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027project\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
+ "line": 224,
+ "endLine": 224,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 46279265,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027enableReflection\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V010",
+ "cwe": 0,
+ "level": 0,
+ "positions": [
+ {
+ "file": "",
+ "line": 1,
+ "endLine": 1,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 0,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Analysis of \u0027Makefile\u0027 type projects is not supported in this tool. Use direct analyzer integration or compiler monitoring instead.",
+ "projects": [
+ "Flax"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\VisualScriptDebuggerWindow.cs",
+ "line": 213,
+ "endLine": 213,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -132410839,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3039",
+ "cwe": 39,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
+ "line": 551,
+ "endLine": 551,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1086445951,
+ "currentLine": -1477365294,
+ "nextLine": -1343412697,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\IntegerEditor.cs",
+ "line": 53,
+ "endLine": 53,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 12562153,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027_element \u003d\u003d null\u0027 is always true.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingFrustum.cs",
+ "line": 391,
+ "endLine": 391,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 23393097,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027PlaneIntersectionType\u0027 enum: Front.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 1186,
+ "endLine": 1186,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -482191901,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3149",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 193,
+ "endLine": 193,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -304032143,
+ "currentLine": -282995201,
+ "nextLine": -151532762,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\States\\EditorStateMachine.cs",
+ "line": 21,
+ "endLine": 21,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Dereferencing the result of \u0027as\u0027 operator can lead to NullReferenceException. Consider inspecting \u0027state\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
+ "line": 59,
+ "endLine": 59,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 10823529,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\TagEditor.cs",
+ "line": 194,
+ "endLine": 194,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 17181089,
+ "currentLine": 1398977744,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027parentNode\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\MaterialPreview.cs",
+ "line": 353,
+ "endLine": 353,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -569467602,
+ "currentLine": -153681094,
+ "nextLine": -2125177745,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027spriteModuleNode\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3120",
+ "cwe": 835,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
+ "line": 108,
+ "endLine": 108,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 3842573,
+ "currentLine": 2753421,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Potentially infinite loop. The \u0027_window\u0027 variable from the loop exit condition does not change its value between iterations.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 84,
+ "endLine": 84,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1354727761,
+ "currentLine": -345958553,
+ "nextLine": 2044871539,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3097",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Foliage\\Undo\\DeleteInstanceAction.cs",
+ "line": 13,
+ "endLine": 13,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 795687,
+ "currentLine": 1946621399,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Foliage\\Undo\\DeleteInstanceAction.cs",
+ "line": 22,
+ "endLine": 22,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible exception: the \u0027DeleteInstanceAction\u0027 type marked by [Serializable] contains non-serializable members not marked by [NonSerialized].",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 912,
+ "endLine": 912,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1319811754,
+ "currentLine": 1394026345,
+ "nextLine": 1552495049,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceContext.Serialization.cs",
+ "line": 345,
+ "endLine": 345,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1628139666,
+ "currentLine": -948647543,
+ "nextLine": -1987003935,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceContext.Serialization.cs",
+ "line": 346,
+ "endLine": 346,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\ModelPreview.cs",
+ "line": 329,
+ "endLine": 329,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1303271947,
+ "currentLine": 1221769864,
+ "nextLine": -1912373771,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027meshDatas\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 731,
+ "endLine": 731,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -981169433,
+ "currentLine": 210492930,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 758,
+ "endLine": 758,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of \u0027node.GetBox(4 + i)\u0027 method return value at \u0027end.IsOutput\u0027 when it is passed to method as its 1st argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 731,
+ "endLine": 731,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -981169433,
+ "currentLine": 210492930,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\AssetPreview.cs",
+ "line": 237,
+ "endLine": 237,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1575956,
+ "currentLine": 115036043,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: base.HasLoadedAssets.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
+ "line": 362,
+ "endLine": 362,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 477270135,
+ "nextLine": -1736391306,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\RenderOutputControl.cs",
+ "line": 82,
+ "endLine": 82,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside property at \u0027value.Value\u0027. Consider inspecting: new Int2?().",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\BinaryAssetItem.cs",
+ "line": 48,
+ "endLine": 48,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 276427834,
+ "currentLine": 1495628977,
+ "nextLine": 327019768,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
+ "line": 89,
+ "endLine": 89,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1646071808,
+ "currentLine": 1678753311,
+ "nextLine": 1920698375,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
+ "line": 103,
+ "endLine": 103,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 561,
+ "endLine": 561,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1958992846,
+ "currentLine": 10823529,
+ "nextLine": 2080773193,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\VertexPainting.cs",
+ "line": 421,
+ "endLine": 421,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1601147684,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: !_meshDatasCancel.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
+ "line": 559,
+ "endLine": 559,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1018299951,
+ "currentLine": -1198893419,
+ "nextLine": 352987,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027result !\u003d DragDropEffect.None\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3171",
+ "cwe": 839,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1656,
+ "endLine": 1656,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5757249,
+ "currentLine": 5765441,
+ "nextLine": 5626177,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\UIEditorGizmo.cs",
+ "line": 455,
+ "endLine": 455,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1933356753,
+ "currentLine": 1145903921,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: !_mouseMovesControl.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 2262,
+ "endLine": 2262,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1540260113,
+ "currentLine": 131545325,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.cs",
+ "line": 696,
+ "endLine": 696,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027control.IsSelected\u0027. Consider inspecting the 1st argument: node.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
+ "line": 570,
+ "endLine": 570,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -587693723,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\AudioTrack.cs",
+ "line": 472,
+ "endLine": 472,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5607,
+ "currentLine": 39528297,
+ "nextLine": -1065348209,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Platform.cs",
+ "line": 316,
+ "endLine": 316,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -297538142,
+ "currentLine": 1670881306,
+ "nextLine": -1269075105,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Platform.cs",
+ "line": 317,
+ "endLine": 317,
+ "column": 1,
+ "endColumn": 1
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Platform.cs",
+ "line": 319,
+ "endLine": 319,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\NestedAnimationTrack.cs",
+ "line": 177,
+ "endLine": 177,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 113979,
+ "nextLine": -82623097,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
+ "line": 136,
+ "endLine": 136,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside property at \u0027value.ID\u0027. Consider inspecting: null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\DebugLogWindow.cs",
+ "line": 264,
+ "endLine": 264,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1937636774,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027base.OnMouseUp(location, button)\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\BinaryAssetItem.cs",
+ "line": 92,
+ "endLine": 92,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1407233559,
+ "nextLine": -729796814,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 205,
+ "endLine": 205,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -802113753,
+ "currentLine": 850157427,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\MaterialPreview.cs",
+ "line": 87,
+ "endLine": 87,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -117930517,
+ "currentLine": -1983483522,
+ "nextLine": -326728491,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
+ "line": 136,
+ "endLine": 136,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside property at \u0027value.ID\u0027. Consider inspecting: null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 1200,
+ "endLine": 1200,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -482191901,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 541,
+ "endLine": 541,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -945407821,
+ "currentLine": 10823529,
+ "nextLine": 817049312,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3171",
+ "cwe": 839,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1654,
+ "endLine": 1654,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 45620,
+ "currentLine": 5749057,
+ "nextLine": 5757249,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\MaterialPreview.cs",
+ "line": 343,
+ "endLine": 343,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 241683675,
+ "currentLine": -271159745,
+ "nextLine": -1900181717,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027srcAsset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 134,
+ "endLine": 134,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 341518184,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ModelPrefabEditor.cs",
+ "line": 69,
+ "endLine": 69,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5607,
+ "currentLine": -1644576124,
+ "nextLine": 2896105,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027prefab\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ModelPrefabEditor.cs",
+ "line": 43,
+ "endLine": 43,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 549198917,
+ "currentLine": 1398253532,
+ "nextLine": 937466013,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027prefab\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ActorTrack.cs",
+ "line": 158,
+ "endLine": 158,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 681367489,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProjectGenerator.cs",
+ "line": 167,
+ "endLine": 167,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 52,
+ "endLine": 52,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 341518184,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
+ "line": 223,
+ "endLine": 223,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2065136559,
+ "currentLine": 1871790118,
+ "nextLine": -329606304,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027node\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3203",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Panels\\ScrollBar.cs",
+ "line": 255,
+ "endLine": 255,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 830098888,
+ "currentLine": 1063502971,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Method parameter is not used: max.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
+ "line": 231,
+ "endLine": 231,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 12257,
+ "nextLine": 22343,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: a \u003d\u003d b. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\IntValueBox.cs",
+ "line": 103,
+ "endLine": 103,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -659238342,
+ "nextLine": -1872144505,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Min \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3086",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\CollisionsHelper.cs",
+ "line": 596,
+ "endLine": 596,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 86090946,
+ "currentLine": 28973,
+ "nextLine": 252169,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\CollisionsHelper.cs",
+ "line": 582,
+ "endLine": 582,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Variables dets, dett are initialized through the evaluation of the same expression. It\u0027s probably an error or un-optimized code.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 764,
+ "endLine": 764,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 809476614,
+ "currentLine": -230847274,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: keyframe.TangentIn.Translation.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Modes\\EditorGizmoMode.cs",
+ "line": 16,
+ "endLine": 16,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": 710495647,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Modes\\EditorGizmoMode.cs",
+ "line": 47,
+ "endLine": 47,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027EditorGizmoMode\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3025",
+ "cwe": 685,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 3117,
+ "endLine": 3117,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -768460759,
+ "currentLine": -1251748987,
+ "nextLine": -253666044,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Incorrect format. A different number of format items is expected while calling \u0027AppendFormat\u0027 function. Arguments not used: fullName.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3025",
+ "cwe": 685,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Utilities\\Utilities.cs",
+ "line": 714,
+ "endLine": 714,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1029047321,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Incorrect format. A different number of format items is expected while calling \u0027Format\u0027 function. Arguments not used: path.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Cache\\Intermediate\\FlaxEditor\\Windows\\x64\\Development\\Graphics\\Graphics.Bindings.Gen.cs",
+ "line": 211,
+ "endLine": 211,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 102185,
+ "currentLine": 382158780,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027MSAALevel\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Import\\TextureImportEntry.cs",
+ "line": 18,
+ "endLine": 18,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1046587151,
+ "currentLine": 764165609,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027CustomMaxSizes\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3203",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Plugins\\NetworkingPlugin.cs",
+ "line": 552,
+ "endLine": 552,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 808273516,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Method parameters are not used: buildData, buildOptions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3056",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\OutputBox.cs",
+ "line": 145,
+ "endLine": 145,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1436553138,
+ "currentLine": 715916849,
+ "nextLine": 1432809015,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\OutputBox.cs",
+ "line": 144,
+ "endLine": 144,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Consider reviewing the correctness of \u0027control1\u0027 item\u0027s usage.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
+ "line": 113,
+ "endLine": 113,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 43838773,
+ "nextLine": 1228134307,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
+ "line": 137,
+ "endLine": 137,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_model\u0027 object was used before it was verified against null. Check lines: 113, 137.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
+ "line": 532,
+ "endLine": 532,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2135264825,
+ "currentLine": -1198893419,
+ "nextLine": 352987,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027result !\u003d DragDropEffect.None\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3105",
+ "cwe": 690,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\ContextMenu\\VisjectCM.cs",
+ "line": 720,
+ "endLine": 720,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -153208074,
+ "currentLine": -1962351054,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The \u0027parameters\u0027 variable was used after it was assigned through null-conditional operator. NullReferenceException is possible.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3072",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\JsonAssetWindow.cs",
+ "line": 20,
+ "endLine": 20,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1559036708,
+ "currentLine": 87338991,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\JsonAssetWindow.cs",
+ "line": 73,
+ "endLine": 73,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027JsonAssetWindow\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: _undo.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3196",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
+ "line": 636,
+ "endLine": 636,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 4738,
+ "currentLine": -531989313,
+ "nextLine": 1113546383,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The \u0027index\u0027 parameter is not utilized inside the method body, but an identifier with a similar name is used inside the same method.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.Contents.cs",
+ "line": 495,
+ "endLine": 495,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 10823529,
+ "nextLine": -1201432042,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3130",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\GenericEditor.cs",
+ "line": 356,
+ "endLine": 356,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -836308064,
+ "nextLine": 5607,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Priority of the \u0027\u0026\u0026\u0027 operator is higher than that of the \u0027||\u0027 operator. Possible missing parentheses.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 1970,
+ "endLine": 1970,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -914723996,
+ "currentLine": -2068070354,
+ "nextLine": -857331011,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetChildMenu(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\GUI\\PropertyNameLabel.cs",
+ "line": 128,
+ "endLine": 128,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1018145523,
+ "currentLine": 39528297,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3105",
+ "cwe": 690,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\MaterialInstanceWindow.cs",
+ "line": 83,
+ "endLine": 83,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1329709269,
+ "nextLine": -1932899431,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The \u0027asset\u0027 variable was used after it was assigned through null-conditional operator. NullReferenceException is possible.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\AssetEditorWindow.cs",
+ "line": 241,
+ "endLine": 241,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
+ "line": 281,
+ "endLine": 281,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 513015315,
+ "currentLine": 777233000,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetProxy(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3152",
+ "cwe": 369,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Network.cs",
+ "line": 150,
+ "endLine": 150,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -309189763,
+ "currentLine": -1430248771,
+ "nextLine": -1014941719,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Network.cs",
+ "line": 139,
+ "endLine": 139,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Potential division by zero. The variable was compared with a range of values which includes zero before it was used as a divisor. Check lines: 150, 139.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceComment.cs",
+ "line": 413,
+ "endLine": 413,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 1553034043,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
+ "line": 504,
+ "endLine": 504,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 1147,
+ "endLine": 1147,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 212704437,
+ "currentLine": 265143054,
+ "nextLine": -1858752701,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The \u0027functionNode._signature.Parameters\u0027 object was used before it was verified against null. Check lines: 1147, 1147.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 83,
+ "endLine": 83,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1606151089,
+ "currentLine": -1354727761,
+ "nextLine": -345958553,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
+ "line": 994,
+ "endLine": 994,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 729209,
+ "nextLine": 176405,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: modulo \u003d\u003d 0d. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Undo\\Undo.cs",
+ "line": 81,
+ "endLine": 81,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": 1903579551,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: PeekReverse().",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Plugins\\NetworkingPlugin.cs",
+ "line": 201,
+ "endLine": 201,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1097603240,
+ "currentLine": 791895499,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Plugins\\NetworkingPlugin.cs",
+ "line": 169,
+ "endLine": 169,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027functions\u0027 object was used after it was verified against null. Check lines: 201, 169.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 651,
+ "endLine": 651,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -181350934,
+ "currentLine": 1203842468,
+ "nextLine": 7681346,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 682,
+ "endLine": 682,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027functionInfo.Glue.CustomParameters\u0027 object was used before it was verified against null. Check lines: 651, 682.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.cs",
+ "line": 263,
+ "endLine": 263,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 493009245,
+ "currentLine": 1479913,
+ "nextLine": 17733,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027token \u003d\u003d null\u0027 is always false.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
+ "line": 560,
+ "endLine": 560,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -1642874294,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Search\\SearchItem.cs",
+ "line": 192,
+ "endLine": 192,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1187127343,
+ "currentLine": 10823529,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\EngineTarget.cs",
+ "line": 213,
+ "endLine": 213,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1925438540,
+ "currentLine": 243351986,
+ "nextLine": -495516684,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\EngineTarget.cs",
+ "line": 218,
+ "endLine": 218,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027buildOptions.Toolchain\u0027 object was used before it was verified against null. Check lines: 213, 218.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\BehaviorKnowledgeSelectorEditor.cs",
+ "line": 140,
+ "endLine": 140,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 973826699,
+ "currentLine": 1441633809,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027goalTypeNode\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 373,
+ "endLine": 373,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1598514311,
+ "currentLine": -399833558,
+ "nextLine": 1993854390,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027selected\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
+ "line": 183,
+ "endLine": 183,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1497665152,
+ "currentLine": 9913435,
+ "nextLine": -1989635608,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027cam\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 657,
+ "endLine": 657,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -794166515,
+ "currentLine": 10823529,
+ "nextLine": -179812276,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditGameWindow.cs",
+ "line": 226,
+ "endLine": 226,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1581938311,
+ "currentLine": 1692381612,
+ "nextLine": -1527748050,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027node\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 1066,
+ "endLine": 1066,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -482191901,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
+ "line": 172,
+ "endLine": 172,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1466494548,
+ "currentLine": 17261119,
+ "nextLine": -610545991,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027floor\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 616,
+ "endLine": 616,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 709828875,
+ "currentLine": 10823529,
+ "nextLine": 862973185,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Scripting\\ScriptType.cs",
+ "line": 419,
+ "endLine": 419,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 551838811,
+ "currentLine": -1201170282,
+ "nextLine": 551838299,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: asFloat \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\BinaryAssetItem.cs",
+ "line": 134,
+ "endLine": 134,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 21931061,
+ "nextLine": -200518841,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\InputBox.cs",
+ "line": 1587,
+ "endLine": 1587,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1543851188,
+ "currentLine": 1620735083,
+ "nextLine": -768147839,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
+ "line": 249,
+ "endLine": 249,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of \u0027TypeUtils.GetDefaultValue(type)\u0027 method return value at \u0027obj.GetType\u0027 when it is passed to method as its 1st argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 82,
+ "endLine": 82,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 761440307,
+ "currentLine": 1606151089,
+ "nextLine": -1354727761,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
+ "line": 567,
+ "endLine": 567,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 516649421,
+ "currentLine": 50015729,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027_middleMouseDown\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 366,
+ "endLine": 366,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5607,
+ "currentLine": 39528297,
+ "nextLine": -2080988043,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Config\\GameSettings.cs",
+ "line": 237,
+ "endLine": 237,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 88071449,
+ "currentLine": -1024348572,
+ "nextLine": 352987,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
+ "line": 761,
+ "endLine": 761,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -995635475,
+ "nextLine": -654660249,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: alpha \u003d\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3041",
+ "cwe": 682,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Overall.cs",
+ "line": 102,
+ "endLine": 102,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -725110232,
+ "currentLine": 1524047024,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The expression was implicitly cast from \u0027ulong\u0027 type to \u0027float\u0027 type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A \u003d (double)(X) / Y;.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 591,
+ "endLine": 591,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 10823529,
+ "nextLine": -1708102394,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\StaticModelNode.cs",
+ "line": 57,
+ "endLine": 57,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -859722645,
+ "currentLine": 1474921,
+ "nextLine": 17733,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027verts \u003d\u003d null\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3041",
+ "cwe": 682,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Overall.cs",
+ "line": 101,
+ "endLine": 101,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 998336950,
+ "currentLine": -725110232,
+ "nextLine": 1524047024,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The expression was implicitly cast from \u0027ulong\u0027 type to \u0027float\u0027 type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A \u003d (double)(X) / Y;.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 833,
+ "endLine": 833,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 855192299,
+ "currentLine": -2000912802,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027_combobox\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3030",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 538,
+ "endLine": 538,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -328655413,
+ "currentLine": -2013950032,
+ "nextLine": 723747042,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 535,
+ "endLine": 535,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Recurring check. The \u0027arrayApiType !\u003d null \u0026\u0026 arrayApiType.MarshalAs !\u003d null\u0027 condition was already verified in line 535.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProjectGenerator.cs",
+ "line": 682,
+ "endLine": 682,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2066758797,
+ "currentLine": 171107081,
+ "nextLine": -1462165522,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027!useResharperBuild\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 1147,
+ "endLine": 1147,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 212704437,
+ "currentLine": 265143054,
+ "nextLine": -1858752701,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027functionNode._signature.Parameters\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Selection.cs",
+ "line": 65,
+ "endLine": 65,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 18744348,
+ "currentLine": 76231288,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Selection.cs",
+ "line": 136,
+ "endLine": 136,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
+ "line": 131,
+ "endLine": 131,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 55870793,
+ "currentLine": 10823529,
+ "nextLine": 2091772829,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\NewtonsoftJson.cs",
+ "line": 87,
+ "endLine": 87,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 2923747,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027TargetPlatform\u0027 enum: Windows, Linux, Android, Mac.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 160,
+ "endLine": 160,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 341518184,
+ "nextLine": 1462175890,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 753,
+ "endLine": 753,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 88117,
+ "currentLine": -482191901,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 85,
+ "endLine": 85,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -345958553,
+ "currentLine": 2044871539,
+ "nextLine": 2120718357,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3042",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\PrefabPreview.cs",
+ "line": 79,
+ "endLine": 79,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 31081123,
+ "currentLine": 2105674638,
+ "nextLine": 241892155,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\PrefabPreview.cs",
+ "line": 78,
+ "endLine": 78,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible NullReferenceException. The \u0027?.\u0027 and \u0027.\u0027 operators are used for accessing members of the \u0027_uiControlLinked.Control\u0027 object",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 201,
+ "endLine": 201,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 578489577,
+ "currentLine": 2133982696,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027settingsPanel\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 320,
+ "endLine": 320,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 770301057,
+ "currentLine": -193071702,
+ "nextLine": 1873025885,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 326,
+ "endLine": 326,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027typeInfo.GenericArgs\u0027 object was used before it was verified against null. Check lines: 320, 326.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 718,
+ "endLine": 718,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 570118381,
+ "currentLine": -1158029995,
+ "nextLine": 176909,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: tangentIn.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 718,
+ "endLine": 718,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 570118381,
+ "currentLine": -1158029995,
+ "nextLine": 176909,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: tangentOut.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Parsing.cs",
+ "line": 254,
+ "endLine": 254,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 365222239,
+ "currentLine": -1752624088,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3057",
+ "cwe": 628,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
+ "line": 457,
+ "endLine": 457,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 36080,
+ "currentLine": -549169312,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanel.cs",
+ "line": 635,
+ "endLine": 635,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The 1st argument \u0027index\u0027 has a possibly negative value, but is expected to be non-negative inside method, in \u0027_tabs.RemoveAt(index)\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3086",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmo.cs",
+ "line": 261,
+ "endLine": 261,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 702463750,
+ "currentLine": 880170182,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmo.cs",
+ "line": 260,
+ "endLine": 260,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Variables _selection.Capacity, _selectionParents.Capacity are initialized through the call to the same function. It\u0027s probably an error or un-optimized code.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorWindow.cs",
+ "line": 199,
+ "endLine": 199,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 569550457,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorWindow.cs",
+ "line": 209,
+ "endLine": 209,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027Root\u0027 object was used before it was verified against null. Check lines: 199, 209.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
+ "line": 796,
+ "endLine": 796,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -1616879417,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.cs",
+ "line": 164,
+ "endLine": 164,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -857294103,
+ "currentLine": 661171719,
+ "nextLine": 78685322,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.cs",
+ "line": 163,
+ "endLine": 163,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027concurrency\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 164, 163.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.cs",
+ "line": 37,
+ "endLine": 37,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 534,
+ "endLine": 534,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 148820372,
+ "currentLine": 10823529,
+ "nextLine": -1629205590,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 178,
+ "endLine": 178,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 341518184,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Proxy\\ModelProxy.cs",
+ "line": 59,
+ "endLine": 59,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -616306443,
+ "currentLine": -2124448256,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027collisionDataProxy\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.Contents.cs",
+ "line": 207,
+ "endLine": 207,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1769094030,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027UseMode\u0027 enum: Off.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 838,
+ "endLine": 838,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1648452085,
+ "currentLine": -1998013372,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
+ "line": 1289,
+ "endLine": 1289,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1668948979,
+ "nextLine": 5710891,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: value \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Animation.cs",
+ "line": 359,
+ "endLine": 359,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 183841,
+ "currentLine": 907932904,
+ "nextLine": 1413683,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027function\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Undo\\Undo.cs",
+ "line": 76,
+ "endLine": 76,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": 1950634399,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: PeekHistory().",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
+ "line": 602,
+ "endLine": 602,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -960642272,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
+ "line": 610,
+ "endLine": 610,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 215,
+ "endLine": 215,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 120237815,
+ "currentLine": 365083,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027DockState\u0027 enum: Unknown, Float, Hidden.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
+ "line": 525,
+ "endLine": 525,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -950259181,
+ "nextLine": 17733,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027v\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 692,
+ "endLine": 692,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -585249428,
+ "currentLine": -810421351,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
+ "line": 956,
+ "endLine": 956,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1147875507,
+ "currentLine": 10823529,
+ "nextLine": -1496796900,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 327,
+ "endLine": 327,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -184086016,
+ "currentLine": -228972198,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: _anchorMin.X !\u003d _anchorMax.X. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 459,
+ "endLine": 459,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1766757655,
+ "currentLine": -228939432,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: _anchorMin.Y !\u003d _anchorMax.Y. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 200,
+ "endLine": 200,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1928423521,
+ "nextLine": 736268498,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
+ "line": 1309,
+ "endLine": 1309,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5710891,
+ "currentLine": -1640001903,
+ "nextLine": 11507755,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: value \u003d\u003d double.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\LocalizedStringTableWindow.cs",
+ "line": 83,
+ "endLine": 83,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 63545421,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\LocalizedStringTableWindow.cs",
+ "line": 61,
+ "endLine": 61,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_isRefreshing\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 83, 61.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 134,
+ "endLine": 134,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 804049877,
+ "currentLine": -1298447892,
+ "nextLine": -1938424211,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027settingsPanel\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
+ "line": 160,
+ "endLine": 160,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 349661452,
+ "currentLine": 1501555,
+ "nextLine": -497407807,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027sky\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.ContextMenu.cs",
+ "line": 365,
+ "endLine": 365,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 39528297,
+ "nextLine": 12248860,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Utilities\\WinAPI.cs",
+ "line": 127,
+ "endLine": 127,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 47763396,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027Modal\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\ogg.cs",
+ "line": 171,
+ "endLine": 171,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1229564923,
+ "currentLine": 921564413,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\ogg.cs",
+ "line": 184,
+ "endLine": 184,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProjectGenerator.cs",
+ "line": 186,
+ "endLine": 186,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CurvePropertyTrack.cs",
+ "line": 140,
+ "endLine": 140,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5607,
+ "currentLine": 39528297,
+ "nextLine": -1065348209,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Packing.cs",
+ "line": 124,
+ "endLine": 124,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1806220712,
+ "nextLine": -280515095,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 910,
+ "endLine": 910,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2023746505,
+ "currentLine": -958505552,
+ "nextLine": -308074854,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: param.IsOut.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\TagEditor.cs",
+ "line": 77,
+ "endLine": 77,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1805399038,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\TagEditor.cs",
+ "line": 436,
+ "endLine": 436,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027values.Contains\u0027. Consider inspecting the 2nd argument: null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 122,
+ "endLine": 122,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 341518184,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\Vector3Editor.cs",
+ "line": 306,
+ "endLine": 306,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -129380671,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\NestedSceneAnimationTrack.cs",
+ "line": 136,
+ "endLine": 136,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 113979,
+ "nextLine": -82623097,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
+ "line": 136,
+ "endLine": 136,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside property at \u0027value.ID\u0027. Consider inspecting: null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3111",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Animations\\Curve.cs",
+ "line": 511,
+ "endLine": 511,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1693415997,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Checking value of \u0027Value\u0027 for null will always return false when generic type is instantiated with a value type.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Timeline.cs",
+ "line": 1952,
+ "endLine": 1952,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 39528297,
+ "nextLine": 583430797,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
+ "line": 783,
+ "endLine": 783,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1685148725,
+ "currentLine": 296247372,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditGameWindow.cs",
+ "line": 190,
+ "endLine": 190,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027actor.Transform\u0027. Consider inspecting the 1st argument: camera.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Downloader.cs",
+ "line": 34,
+ "endLine": 34,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1821042116,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027ProgressDisplay.CanUseConsole\u0027 is always false.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\CustomEditorsUtil.cs",
+ "line": 121,
+ "endLine": 121,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 495479285,
+ "nextLine": -1306520469,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027targetTypeType\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 74,
+ "endLine": 74,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 395643378,
+ "nextLine": -1955931886,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 76,
+ "endLine": 76,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1955931886,
+ "currentLine": -1171952459,
+ "nextLine": 1703961276,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\DoubleEditor.cs",
+ "line": 41,
+ "endLine": 41,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -1752236365,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 75,
+ "endLine": 75,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 395643378,
+ "currentLine": -1955931886,
+ "nextLine": -1171952459,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\PhysX.cs",
+ "line": 373,
+ "endLine": 373,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 2923747,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027TargetPlatform\u0027 enum: UWP.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3156",
+ "cwe": 628,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Constants.cs",
+ "line": 248,
+ "endLine": 248,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1370870601,
+ "currentLine": 1201184428,
+ "nextLine": -674564252,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The first argument of the \u0027CreateInstance\u0027 method is not expected to be null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3140",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 140,
+ "endLine": 140,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1758909173,
+ "currentLine": 2008308374,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Property accessors use different backing fields.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
+ "line": 1339,
+ "endLine": 1339,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1641017583,
+ "nextLine": 5710891,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: value \u003d\u003d double.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\AssetItem.cs",
+ "line": 83,
+ "endLine": 83,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1299948362,
+ "currentLine": -506980510,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: typeNamespaces.Length !\u003d 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\PrefabWindow.Hierarchy.cs",
+ "line": 329,
+ "endLine": 329,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 341518184,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 57,
+ "endLine": 57,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -611626063,
+ "currentLine": -165540884,
+ "nextLine": 1838316247,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 56,
+ "endLine": 56,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027b\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 57, 56.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3148",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Timeline.Data.cs",
+ "line": 162,
+ "endLine": 162,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 735378707,
+ "nextLine": 59739899,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Casting potential \u0027null\u0027 value of \u0027_tracks[i].Tag\u0027 to a value type can lead to NullReferenceException.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 1521,
+ "endLine": 1521,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5610543,
+ "currentLine": 371137,
+ "nextLine": 1393007,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027separator\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
+ "line": 187,
+ "endLine": 187,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 765916315,
+ "currentLine": -1855944585,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027audioListener\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3202",
+ "cwe": 561,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
+ "line": 1051,
+ "endLine": 1051,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1653609520,
+ "nextLine": -1476040214,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Unreachable code detected. The \u0027case\u0027 value \u0027TargetArchitecture.AnyCPU\u0027 is out of range of the match expression \u0027Architecture\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix3x3.cs",
+ "line": 1091,
+ "endLine": 1091,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 442745701,
+ "currentLine": 392183861,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: Math.Abs(det) \u003d\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3140",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 120,
+ "endLine": 120,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1758909173,
+ "currentLine": -1143329758,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Property accessors use different backing fields.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 415,
+ "endLine": 415,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917253816,
+ "currentLine": 47033525,
+ "nextLine": 917122750,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 484,
+ "endLine": 484,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1928423521,
+ "nextLine": 736268498,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 228,
+ "endLine": 228,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -195352578,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonCustomSerializers\\ExtendedSerializationBinder.cs",
+ "line": 200,
+ "endLine": 200,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1968057933,
+ "nextLine": -352437663,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027assemblyDelimiterIndex\u0027 is always not null. The operator \u0027??\u0027 is excessive.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
+ "line": 565,
+ "endLine": 565,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -1164210896,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3171",
+ "cwe": 839,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1657,
+ "endLine": 1657,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5765441,
+ "currentLine": 5626177,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\CustomEditorsUtil.cs",
+ "line": 102,
+ "endLine": 102,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1782977694,
+ "currentLine": 1977974109,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027checkType\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProject.cs",
+ "line": 33,
+ "endLine": 33,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1318808814,
+ "currentLine": -1743171661,
+ "nextLine": -1659549911,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProject.cs",
+ "line": 34,
+ "endLine": 34,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 437,
+ "endLine": 437,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 492474833,
+ "nextLine": -1745936841,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027functionNode._signature.Name\u0027 is always not null. The operator \u0027??\u0027 is excessive.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 1503,
+ "endLine": 1503,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1663377667,
+ "nextLine": -967068673,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027functionInfo.Parameters.Count !\u003d 0\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 606,
+ "endLine": 606,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 436880779,
+ "nextLine": -160722735,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
+ "line": 122,
+ "endLine": 122,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1601147684,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: !_meshDatasCancel.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 1077,
+ "endLine": 1077,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -723493914,
+ "currentLine": -522167326,
+ "nextLine": 128610637,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027_output\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3111",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Animations\\Curve.cs",
+ "line": 794,
+ "endLine": 794,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1693415997,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Checking value of \u0027Value\u0027 for null will always return false when generic type is instantiated with a value type.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 201,
+ "endLine": 201,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1928423521,
+ "currentLine": 736268498,
+ "nextLine": -2052846777,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\EditTrackAction.cs",
+ "line": 37,
+ "endLine": 37,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1559596790,
+ "nextLine": -631706400,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\EditTrackAction.cs",
+ "line": 45,
+ "endLine": 45,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_timeline\u0027 object was used before it was verified against null. Check lines: 37, 45.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3053",
+ "cwe": 0,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Utilities\\StringUtils.cs",
+ "line": 147,
+ "endLine": 147,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1370551408,
+ "currentLine": 342638576,
+ "nextLine": 85659065,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An excessive expression. Examine the substrings \u0027\\\\\\\\\u0027 and \u0027\\\\\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 175,
+ "endLine": 175,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 804049877,
+ "currentLine": -1938424211,
+ "nextLine": 45361529,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027settingsPanel\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3066",
+ "cwe": 683,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Connecting.cs",
+ "line": 213,
+ "endLine": 213,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 321004459,
+ "currentLine": 1422733554,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible incorrect order of arguments passed to \u0027CanUseDirectCastStatic\u0027 method: \u0027to\u0027 and \u0027from\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\BinaryAssetItem.cs",
+ "line": 185,
+ "endLine": 185,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 21931061,
+ "nextLine": -200518841,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceNode.cs",
+ "line": 979,
+ "endLine": 979,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 13351001,
+ "currentLine": -723230773,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceNode.cs",
+ "line": 981,
+ "endLine": 981,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027Surface\u0027 object was used before it was verified against null. Check lines: 979, 981.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SourceCodeEditing\\CodeEditingModule.cs",
+ "line": 39,
+ "endLine": 39,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 976826205,
+ "currentLine": -1528170778,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Scripting\\TypeUtils.cs",
+ "line": 395,
+ "endLine": 395,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027type.BaseType\u0027. Consider inspecting the 1st argument: managedType.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\CollectionEditor.cs",
+ "line": 338,
+ "endLine": 338,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 1643,
+ "endLine": 1643,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -109909640,
+ "currentLine": 435035580,
+ "nextLine": -249367255,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027impulseBox\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\DepsBuilder.cs",
+ "line": 51,
+ "endLine": 51,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1407453452,
+ "currentLine": 1140927853,
+ "nextLine": 1407453216,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027Platform.IsPlatformSupported(platform, TargetArchitecture.ARM)\u0027 is always false.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3156",
+ "cwe": 628,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\ProjectInfo.cs",
+ "line": 58,
+ "endLine": 58,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 670425,
+ "currentLine": 1451645841,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The first argument of the \u0027Add\u0027 method is not expected to be null. Potential null value: key.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 531,
+ "endLine": 531,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 866780861,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027base.OnMouseDown(location, button)\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
+ "line": 607,
+ "endLine": 607,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -2026453746,
+ "nextLine": -654660249,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: alpha \u003d\u003d 1d. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\KeyframesEditor.cs",
+ "line": 444,
+ "endLine": 444,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 10823529,
+ "nextLine": 2093001723,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ScreenFadeTrack.cs",
+ "line": 111,
+ "endLine": 111,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1379687950,
+ "currentLine": 39528297,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 1632,
+ "endLine": 1632,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 953406156,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3013",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\GUI\\ContentView.cs",
+ "line": 622,
+ "endLine": 622,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1575956,
+ "currentLine": -1880017052,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\GUI\\ContentView.cs",
+ "line": 639,
+ "endLine": 639,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "It is odd that the body of \u0027OnItemDeleted\u0027 function is fully equivalent to the body of \u0027OnItemDispose\u0027 function (622, line 639).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
+ "line": 581,
+ "endLine": 581,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\ClothPainting.cs",
+ "line": 171,
+ "endLine": 171,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 526957875,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\ClothPainting.cs",
+ "line": 167,
+ "endLine": 167,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_clothPaint\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 171, 167.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\UIntValueBox.cs",
+ "line": 104,
+ "endLine": 104,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1042995749,
+ "currentLine": -848030463,
+ "nextLine": 240213,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 133,
+ "endLine": 133,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 263235661,
+ "currentLine": 804049877,
+ "nextLine": -1298447892,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027panel\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3149",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\ContentItem.cs",
+ "line": 678,
+ "endLine": 678,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2057880341,
+ "currentLine": 1054095729,
+ "nextLine": 1148180646,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\ContentItem.cs",
+ "line": 677,
+ "endLine": 677,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Dereferencing the result of \u0027as\u0027 operator can lead to NullReferenceException. Consider inspecting \u0027view\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\CustomEditor.cs",
+ "line": 567,
+ "endLine": 567,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 188594871,
+ "currentLine": 742633,
+ "nextLine": 11432169,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027text \u003d\u003d null\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
+ "line": 711,
+ "endLine": 711,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 385755756,
+ "currentLine": 11982701,
+ "nextLine": 2561913,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useSeparatePdb\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 485,
+ "endLine": 485,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1928423521,
+ "currentLine": 736268498,
+ "nextLine": 280341319,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3164",
+ "cwe": 544,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
+ "line": 50,
+ "endLine": 50,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1522224669,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Exception classes should be publicly accessible.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\LayoutElementsContainer.cs",
+ "line": 90,
+ "endLine": 90,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2051990601,
+ "currentLine": 39528297,
+ "nextLine": 30041699,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3107",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\MainEditorGizmoViewport.cs",
+ "line": 466,
+ "endLine": 466,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1236601848,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Identical expression \u0027trans.Orientation\u0027 to the left and to the right of compound assignment.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Double3.cs",
+ "line": 1068,
+ "endLine": 1068,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1269595245,
+ "currentLine": -707124304,
+ "nextLine": 353151,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: distanceSq \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ActorEditor.cs",
+ "line": 421,
+ "endLine": 421,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1144615958,
+ "currentLine": 1249357355,
+ "nextLine": -804782807,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027restored\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 726,
+ "endLine": 726,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1661559441,
+ "nextLine": -1916998495,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 778,
+ "endLine": 778,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1648452085,
+ "currentLine": 1518035767,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
+ "line": 965,
+ "endLine": 965,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 772883963,
+ "currentLine": 23955995,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useResponseFile\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 174,
+ "endLine": 174,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 263235661,
+ "currentLine": 804049877,
+ "nextLine": -1938424211,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027panel\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3140",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 130,
+ "endLine": 130,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1758909173,
+ "currentLine": -1359574238,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Property accessors use different backing fields.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
+ "line": 598,
+ "endLine": 598,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1100788788,
+ "nextLine": -654660249,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: alpha \u003d\u003d 0d. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 66,
+ "endLine": 66,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 925697897,
+ "currentLine": -1558843815,
+ "nextLine": 128753,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027_assetPicker\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\XCode.cs",
+ "line": 42,
+ "endLine": 42,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Search\\SearchItem.cs",
+ "line": 169,
+ "endLine": 169,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 915311765,
+ "currentLine": 10823529,
+ "nextLine": -1293890430,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingSphere.cs",
+ "line": 495,
+ "endLine": 495,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -970503635,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: Radius \u003d\u003d value.Radius. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 356,
+ "endLine": 356,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917253816,
+ "currentLine": 47033525,
+ "nextLine": 917122750,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 72,
+ "endLine": 72,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2251402,
+ "currentLine": 1523929501,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3039",
+ "cwe": 39,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
+ "line": 550,
+ "endLine": 550,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1822310347,
+ "currentLine": 1086445951,
+ "nextLine": -1477365294,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Consider inspecting the \u0027ReadAllText\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3149",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 871,
+ "endLine": 871,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -304032143,
+ "currentLine": -927344800,
+ "nextLine": -151532762,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\States\\EditorStateMachine.cs",
+ "line": 21,
+ "endLine": 21,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Dereferencing the result of \u0027as\u0027 operator can lead to NullReferenceException. Consider inspecting \u0027state\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 810,
+ "endLine": 810,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 564361869,
+ "currentLine": 446008417,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 791,
+ "endLine": 791,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027Surface\u0027 object was used after it was verified against null. Check lines: 810, 791.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
+ "line": 642,
+ "endLine": 642,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 269156361,
+ "currentLine": 178988905,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\VisualScriptItem.cs",
+ "line": 250,
+ "endLine": 250,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": -1303790518,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Items\\VisualScriptItem.cs",
+ "line": 316,
+ "endLine": 316,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027VisualScriptType\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3039",
+ "cwe": 39,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
+ "line": 549,
+ "endLine": 549,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1822310347,
+ "nextLine": 1086445951,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3068",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\KeyframesEditor.cs",
+ "line": 724,
+ "endLine": 724,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 16507361,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Calling overrideable class member \u0027UpdateKeyframes\u0027 from constructor is dangerous.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudioCode\\VisualStudioCodeProjectGenerator.cs",
+ "line": 220,
+ "endLine": 220,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1366209773,
+ "nextLine": 574082057,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudioCode\\VisualStudioCodeProjectGenerator.cs",
+ "line": 249,
+ "endLine": 249,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 309,
+ "endLine": 309,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 10971609,
+ "currentLine": 47033781,
+ "nextLine": 917384890,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\JsonAssetWindow.cs",
+ "line": 283,
+ "endLine": 283,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1226623640,
+ "currentLine": -39245975,
+ "nextLine": -964178879,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 352,
+ "endLine": 352,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 10971609,
+ "currentLine": 47033781,
+ "nextLine": 917384890,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3030",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\UIEditorGizmo.cs",
+ "line": 455,
+ "endLine": 455,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1933356753,
+ "currentLine": 1145903921,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\UIEditorGizmo.cs",
+ "line": 451,
+ "endLine": 451,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Recurring check. The \u0027!_mouseMovesControl\u0027 condition was already verified in line 451.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
+ "line": 351,
+ "endLine": 351,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": 1203811881,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
+ "line": 500,
+ "endLine": 500,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027CameraCutThumbnailRenderer\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
+ "line": 600,
+ "endLine": 600,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 157486043,
+ "currentLine": 39528297,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3029",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 261,
+ "endLine": 261,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 790041313,
+ "currentLine": -835424742,
+ "nextLine": 88269261,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 265,
+ "endLine": 265,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The conditional expressions of the \u0027if\u0027 statements situated alongside each other are identical. Check lines: 261, 265.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 2190,
+ "endLine": 2190,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1397750670,
+ "currentLine": 243702634,
+ "nextLine": 1496862126,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027buildData.Target\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3053",
+ "cwe": 0,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Import\\TextureImportEntry.cs",
+ "line": 157,
+ "endLine": 157,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1428602097,
+ "currentLine": 178575189,
+ "nextLine": 357150269,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An excessive expression. Examine the substrings \u0027diffuse\u0027 and \u0027diff\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
+ "line": 185,
+ "endLine": 185,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 176909,
+ "currentLine": -447451525,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetProxy(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
+ "line": 843,
+ "endLine": 843,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1143881272,
+ "currentLine": -604565202,
+ "nextLine": 2739481,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027prevNode\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
+ "line": 1291,
+ "endLine": 1291,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5710891,
+ "currentLine": -1669194355,
+ "nextLine": 11507755,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: value \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingFrustum.cs",
+ "line": 508,
+ "endLine": 508,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 23393097,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027PlaneIntersectionType\u0027 enum: Front.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
+ "line": 842,
+ "endLine": 842,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1606483777,
+ "currentLine": 1143881272,
+ "nextLine": -604565202,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027decorator\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Search\\ContentFinder.cs",
+ "line": 224,
+ "endLine": 224,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -93992793,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _selectedItem \u003d\u003d null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
+ "line": 1064,
+ "endLine": 1064,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 182363,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027AlphaBlendMode\u0027 enum: Linear.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Terrain\\EditTab.cs",
+ "line": 344,
+ "endLine": 344,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 168429147,
+ "nextLine": 381865773,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
+ "line": 136,
+ "endLine": 136,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside property at \u0027value.ID\u0027. Consider inspecting: null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 691,
+ "endLine": 691,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 7686011,
+ "currentLine": 39528297,
+ "nextLine": 1088437068,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 1171,
+ "endLine": 1171,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -482191901,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\CSProjectGenerator.cs",
+ "line": 118,
+ "endLine": 118,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -996537579,
+ "currentLine": -1212021550,
+ "nextLine": 1888515591,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027defaultConfiguration \u003d\u003d TargetConfiguration.Debug\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 783,
+ "endLine": 783,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 809476614,
+ "currentLine": -985997806,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
+ "line": 166,
+ "endLine": 166,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1427277804,
+ "currentLine": -1146641289,
+ "nextLine": 1438308755,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027skyLight\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3203",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
+ "line": 418,
+ "endLine": 418,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 482073176,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Method parameter is not used: options.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 392,
+ "endLine": 392,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 10971609,
+ "currentLine": 47033781,
+ "nextLine": 917384890,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Proxy\\ContentProxy.cs",
+ "line": 14,
+ "endLine": 14,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": -984925133,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Proxy\\ContentProxy.cs",
+ "line": 133,
+ "endLine": 133,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027ContentProxy\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\ULongValueBox.cs",
+ "line": 92,
+ "endLine": 92,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2103144105,
+ "currentLine": 1277656863,
+ "nextLine": 174178098,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\VisualScriptDebuggerWindow.cs",
+ "line": 280,
+ "endLine": 280,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": 780372472,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
+ "line": 201,
+ "endLine": 201,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 12257,
+ "nextLine": 22339,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: a \u003d\u003d b. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3072",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
+ "line": 31,
+ "endLine": 31,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1465749763,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
+ "line": 37,
+ "endLine": 37,
+ "column": 1,
+ "endColumn": 1
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
+ "line": 39,
+ "endLine": 39,
+ "column": 1,
+ "endColumn": 1
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
+ "line": 40,
+ "endLine": 40,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027SerializerCache\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: JsonWriter, MemoryStream, Reader.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Parsing.cs",
+ "line": 253,
+ "endLine": 253,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -416984432,
+ "currentLine": 365222239,
+ "nextLine": -1752624088,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3149",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 203,
+ "endLine": 203,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1332457099,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 31,
+ "endLine": 31,
+ "column": 1,
+ "endColumn": 1
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 201,
+ "endLine": 201,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Dereferencing the result of \u0027as\u0027 operator inside method can lead to NullReferenceException. Consider inspecting 1st argument: floatingPanelToMove.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\NvCloth.cs",
+ "line": 64,
+ "endLine": 64,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 2923747,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027TargetPlatform\u0027 enum: UWP.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\AnimationTimeline.cs",
+ "line": 133,
+ "endLine": 133,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 42453709,
+ "currentLine": 3748497,
+ "nextLine": 12359529,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\AnimationTimeline.cs",
+ "line": 134,
+ "endLine": 134,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_preview\u0027 object was used before it was verified against null. Check lines: 133, 134.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
+ "line": 112,
+ "endLine": 112,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1379507481,
+ "currentLine": 679093,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027isValid\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 737,
+ "endLine": 737,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1336455718,
+ "currentLine": -621594802,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: keyframe.TangentIn.Translation.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 578,
+ "endLine": 578,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -815184543,
+ "currentLine": 10823529,
+ "nextLine": -1997867322,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 538,
+ "endLine": 538,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 76,
+ "currentLine": -1122324043,
+ "nextLine": 30638,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: _shear.X \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 332,
+ "endLine": 332,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 10971609,
+ "currentLine": 47033781,
+ "nextLine": 917384890,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ToolboxWindow.cs",
+ "line": 221,
+ "endLine": 221,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1357389608,
+ "nextLine": 747625,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetChild\u003cPanel\u003e().",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 1152,
+ "endLine": 1152,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1964492651,
+ "currentLine": 23965673,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useSeparateImpl\u0027 is always false.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3127",
+ "cwe": 682,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Float4.cs",
+ "line": 1003,
+ "endLine": 1003,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 69893321,
+ "currentLine": 69909711,
+ "nextLine": 69942487,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Float4.cs",
+ "line": 1004,
+ "endLine": 1004,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two similar code fragments were found. Perhaps, this is a typo and \u0027y\u0027 variable should be used instead of \u0027z\u0027",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3083",
+ "cwe": 367,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\ComboBox.cs",
+ "line": 495,
+ "endLine": 495,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 98761577,
+ "currentLine": 727380077,
+ "nextLine": 506307384,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Unsafe invocation of event \u0027PopupCreate\u0027, NullReferenceException is possible. Consider assigning event to a local variable before invoking it.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
+ "line": 704,
+ "endLine": 704,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1711997833,
+ "currentLine": 178988905,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 1903,
+ "endLine": 1903,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5607,
+ "currentLine": 39528297,
+ "nextLine": -2080988043,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\OutputLogWindow.cs",
+ "line": 244,
+ "endLine": 244,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\KeyframesEditor.cs",
+ "line": 432,
+ "endLine": 432,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1557903299,
+ "currentLine": 10823529,
+ "nextLine": 1850767881,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3110",
+ "cwe": 674,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\SceneGraphNode.cs",
+ "line": 69,
+ "endLine": 69,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": -1672575161,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible infinite recursion inside \u0027Root\u0027 property.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 411,
+ "endLine": 411,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 10971609,
+ "currentLine": 47033781,
+ "nextLine": 917384890,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\ModelPreview.cs",
+ "line": 295,
+ "endLine": 295,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1303271947,
+ "currentLine": 1221769864,
+ "nextLine": -1912373771,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027meshDatas\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3130",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Special\\RadialMenu.cs",
+ "line": 277,
+ "endLine": 277,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1628710754,
+ "currentLine": 1948501713,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Priority of the \u0027\u0026\u0026\u0027 operator is higher than that of the \u0027||\u0027 operator. Possible missing parentheses.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ScriptTrack.cs",
+ "line": 82,
+ "endLine": 82,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 197318112,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceNode.cs",
+ "line": 242,
+ "endLine": 242,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -502484352,
+ "currentLine": 5835243,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027NodeElementType\u0027 enum: Invalid, RotationValue.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 974,
+ "endLine": 974,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 375071993,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\LocalSceneGraph.cs",
+ "line": 12,
+ "endLine": 12,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": -1238757812,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\LocalSceneGraph.cs",
+ "line": 75,
+ "endLine": 75,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027LocalSceneGraph\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\IntValueBox.cs",
+ "line": 115,
+ "endLine": 115,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -659238342,
+ "currentLine": -1872144505,
+ "nextLine": 174178098,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\Vector3Editor.cs",
+ "line": 104,
+ "endLine": 104,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -129380671,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Editor.cs",
+ "line": 474,
+ "endLine": 474,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 2244993,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
+ "line": 433,
+ "endLine": 433,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 976826205,
+ "currentLine": -1528170778,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Scripting\\TypeUtils.cs",
+ "line": 395,
+ "endLine": 395,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027type.BaseType\u0027. Consider inspecting the 1st argument: managedType.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3039",
+ "cwe": 39,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudioCode\\VisualStudioCodeInstance.cs",
+ "line": 62,
+ "endLine": 62,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 673572251,
+ "currentLine": 97066987,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Config\\GameSettings.cs",
+ "line": 378,
+ "endLine": 378,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 724967055,
+ "currentLine": -690222631,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027gameSettingsAsset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3056",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Quaternion.cs",
+ "line": 1480,
+ "endLine": 1480,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1934659121,
+ "currentLine": -844137002,
+ "nextLine": 711843,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Quaternion.cs",
+ "line": 1481,
+ "endLine": 1481,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Consider reviewing the correctness of \u0027q2\u0027 item\u0027s usage.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
+ "line": 611,
+ "endLine": 611,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 351157817,
+ "currentLine": 1823992940,
+ "nextLine": -1307562784,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027node\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
+ "line": 718,
+ "endLine": 718,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 702470641,
+ "currentLine": 39528297,
+ "nextLine": 988165128,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3097",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\MemberComparison.cs",
+ "line": 14,
+ "endLine": 14,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2071185932,
+ "currentLine": -610243914,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\MemberComparison.cs",
+ "line": 19,
+ "endLine": 19,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible exception: the \u0027MemberComparison\u0027 type marked by [Serializable] contains non-serializable members not marked by [NonSerialized].",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 963,
+ "endLine": 963,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 887313387,
+ "currentLine": -482191901,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3072",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 20,
+ "endLine": 20,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1607007810,
+ "currentLine": -1757088885,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 26,
+ "endLine": 26,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027EditorOptionsWindow\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: _undo.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
+ "line": 598,
+ "endLine": 598,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 772883963,
+ "currentLine": 23955995,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useResponseFile\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
+ "line": 510,
+ "endLine": 510,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 2923747,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027TargetPlatform\u0027 enum: PS4, PS5, iOS.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Cache\\Intermediate\\FlaxEditor\\Windows\\x64\\Development\\Graphics\\Graphics.Bindings.Gen.cs",
+ "line": 1367,
+ "endLine": 1367,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 102185,
+ "currentLine": -1900850423,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027ProbeCubemapResolution\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
+ "line": 480,
+ "endLine": 480,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2056525725,
+ "currentLine": -1678791597,
+ "nextLine": 21299795,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027!string.IsNullOrEmpty(localRepoPath)\u0027 is always false.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3105",
+ "cwe": 690,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
+ "line": 78,
+ "endLine": 78,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 671389989,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
+ "line": 151,
+ "endLine": 151,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The result of null-conditional operator is dereferenced inside the \u0027ShowDialog\u0027 method. NullReferenceException is possible. Inspect the first argument \u0027parentWindow?.Window\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Tags.cs",
+ "line": 245,
+ "endLine": 245,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1830805086,
+ "nextLine": 730945,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 3166,
+ "endLine": 3166,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1017315024,
+ "currentLine": 1091083042,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027project\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3203",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\NativeInterop.Marshallers.cs",
+ "line": 617,
+ "endLine": 617,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1710695258,
+ "currentLine": 1139822315,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Method parameter is not used: unmanaged.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
+ "line": 845,
+ "endLine": 845,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2739481,
+ "currentLine": -20004525,
+ "nextLine": -502898934,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027newNode\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
+ "line": 237,
+ "endLine": 237,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -325646387,
+ "currentLine": 46270855,
+ "nextLine": 1121432113,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027enableStackTrace\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
+ "line": 470,
+ "endLine": 470,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 772883963,
+ "currentLine": 23955995,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useResponseFile\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 3061,
+ "endLine": 3061,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -912817643,
+ "nextLine": 1715126832,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 3062,
+ "endLine": 3062,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027fieldInfo\u0027 object was used before it was verified against null. Check lines: 3061, 3062.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\KeyframesEditor.cs",
+ "line": 552,
+ "endLine": 552,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1879261150,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027base.OnMouseDoubleClick(location, button)\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Constants.cs",
+ "line": 157,
+ "endLine": 157,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 9488589,
+ "nextLine": 5607,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
+ "line": 253,
+ "endLine": 253,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -391087833,
+ "currentLine": 1024532118,
+ "nextLine": 905,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
+ "line": 52,
+ "endLine": 52,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027parameter.Name\u0027. Consider inspecting the 1st argument: null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceContext.Serialization.cs",
+ "line": 371,
+ "endLine": 371,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 282379743,
+ "nextLine": -946501766,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceContext.Serialization.cs",
+ "line": 383,
+ "endLine": 383,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\PrefabWindow.Hierarchy.cs",
+ "line": 422,
+ "endLine": 422,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 189443829,
+ "nextLine": 947129,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027selection.Count !\u003d 0\u0027 is always true.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\StructureInfo.cs",
+ "line": 36,
+ "endLine": 36,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1034865042,
+ "currentLine": 311722709,
+ "nextLine": -659558605,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027BaseType?.IsPod\u0027 is always not null. The operator \u0027??\u0027 is excessive.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Float3.cs",
+ "line": 1052,
+ "endLine": 1052,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1269595245,
+ "currentLine": -707124304,
+ "nextLine": 353151,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: distanceSq \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Module.cs",
+ "line": 78,
+ "endLine": 78,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1649239448,
+ "currentLine": 229365757,
+ "nextLine": 1811700297,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Module.cs",
+ "line": 79,
+ "endLine": 79,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027options.Platform\u0027 object was used before it was verified against null. Check lines: 78, 79.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3105",
+ "cwe": 690,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\MainMenu.cs",
+ "line": 111,
+ "endLine": 111,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1059705045,
+ "currentLine": -1664767524,
+ "nextLine": -1499494381,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Render2D\\FontReference.cs",
+ "line": 62,
+ "endLine": 62,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The result of null-conditional operator is dereferenced inside the \u0027FontReference\u0027 constructor. NullReferenceException is possible. Inspect the first argument \u0027iconFont\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 78,
+ "endLine": 78,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1703961276,
+ "currentLine": -1549833035,
+ "nextLine": 1343251132,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
+ "line": 137,
+ "endLine": 137,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -259076084,
+ "nextLine": -1233683840,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
+ "line": 120,
+ "endLine": 120,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027b\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 137, 120.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 2338,
+ "endLine": 2338,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1392610829,
+ "currentLine": 31952928,
+ "nextLine": 183867,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027instanceBox\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3108",
+ "cwe": 684,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Content\\JsonAssetReference.cs",
+ "line": 128,
+ "endLine": 128,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 727987121,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "It is not recommended to return \u0027null\u0027 from \u0027ToString()\u0027 method.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
+ "line": 175,
+ "endLine": 175,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 712831774,
+ "currentLine": 23771791,
+ "nextLine": -538169749,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027parts.Length \u003e\u003d 1\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Plugins\\PluginUtils.cs",
+ "line": 90,
+ "endLine": 90,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1637641127,
+ "currentLine": -1135161342,
+ "nextLine": 1356979630,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027gameAssembly\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioInstance.cs",
+ "line": 156,
+ "endLine": 156,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\ClassInfo.cs",
+ "line": 61,
+ "endLine": 61,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 539,
+ "currentLine": -145929746,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: BaseType !\u003d null.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3140",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 44,
+ "endLine": 44,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -648321897,
+ "currentLine": 5965805,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Property accessors use different backing fields.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3106",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Tree\\Tree.cs",
+ "line": 392,
+ "endLine": 392,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1864877080,
+ "currentLine": 185634144,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 234,
+ "endLine": 234,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The 1st argument \u0027myIndex - 1\u0027 is potentially used inside method to point beyond collection\u0027s bounds.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\ShuntingYardParser.cs",
+ "line": 304,
+ "endLine": 304,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 739673,
+ "nextLine": -1843498572,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\ShuntingYardParser.cs",
+ "line": 293,
+ "endLine": 293,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027previous\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 304, 293.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
+ "line": 485,
+ "endLine": 485,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 263955,
+ "currentLine": -1678798269,
+ "nextLine": -801243803,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027string.IsNullOrEmpty(localRepoPath)\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 229,
+ "endLine": 229,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 770301057,
+ "currentLine": 362645215,
+ "nextLine": 48143759,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 232,
+ "endLine": 232,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027typeInfo.GenericArgs\u0027 object was used before it was verified against null. Check lines: 229, 232.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.cs",
+ "line": 11,
+ "endLine": 11,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": 1718355659,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.cs",
+ "line": 385,
+ "endLine": 385,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027Control\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
+ "line": 480,
+ "endLine": 480,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 712623027,
+ "currentLine": 1484687436,
+ "nextLine": 1632047724,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useResponseFile\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 204,
+ "endLine": 204,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 279127005,
+ "currentLine": 137822682,
+ "nextLine": 235798474,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 206,
+ "endLine": 206,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\IntValueBox.cs",
+ "line": 114,
+ "endLine": 114,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -659238342,
+ "nextLine": -1872144505,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Min \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Tree\\TreeNode.cs",
+ "line": 720,
+ "endLine": 720,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 43273173,
+ "currentLine": 1142970671,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: topOffset !\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 448,
+ "endLine": 448,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1251199518,
+ "currentLine": -228972198,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: _anchorMin.X !\u003d _anchorMax.X. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.Projects.cs",
+ "line": 350,
+ "endLine": 350,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 77,
+ "endLine": 77,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1171952459,
+ "currentLine": 1703961276,
+ "nextLine": -1549833035,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 79,
+ "endLine": 79,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1549833035,
+ "currentLine": 1343251132,
+ "nextLine": -954625549,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3088",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\LocalizationSettingsEditor.cs",
+ "line": 78,
+ "endLine": 78,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -2116319254,
+ "nextLine": 195772833,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
+ "line": 608,
+ "endLine": 608,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 712622643,
+ "currentLine": 1484687436,
+ "nextLine": -248916132,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useResponseFile\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3087",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
+ "line": 818,
+ "endLine": 818,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -407398261,
+ "nextLine": 1295412209,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Type of variable enumerated in \u0027foreach\u0027 is not guaranteed to be castable to the type of collection\u0027s elements.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\freetype.cs",
+ "line": 195,
+ "endLine": 195,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1840624356,
+ "currentLine": 921564413,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\freetype.cs",
+ "line": 208,
+ "endLine": 208,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Scripting\\ScriptType.cs",
+ "line": 586,
+ "endLine": 586,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 703,
+ "endLine": 703,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 442407125,
+ "currentLine": 435035580,
+ "nextLine": -249367255,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027impulseBox\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
+ "line": 1426,
+ "endLine": 1426,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 2917173,
+ "nextLine": 176405,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: modulo \u003d\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.cs",
+ "line": 47,
+ "endLine": 47,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3056",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
+ "line": 600,
+ "endLine": 600,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 700891,
+ "currentLine": 700635,
+ "nextLine": 702617,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
+ "line": 599,
+ "endLine": 599,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Consider reviewing the correctness of \u0027countX\u0027 item\u0027s usage.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\ModelPreview.cs",
+ "line": 312,
+ "endLine": 312,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1303271947,
+ "currentLine": 1221769864,
+ "nextLine": -1912373771,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027meshDatas\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 376,
+ "endLine": 376,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": 191671173,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 509,
+ "endLine": 509,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027Proxy\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\SceneAnimationWindow.cs",
+ "line": 946,
+ "endLine": 946,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -542125327,
+ "currentLine": -1313442982,
+ "nextLine": 498098177,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027OriginalAsset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\LongValueBox.cs",
+ "line": 90,
+ "endLine": 90,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 553804151,
+ "nextLine": 1711550716,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Min \u003d\u003d int.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.CopyPaste.cs",
+ "line": 287,
+ "endLine": 287,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 71909,
+ "currentLine": 1501632040,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.CopyPaste.cs",
+ "line": 289,
+ "endLine": 289,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027node.Values\u0027 object was used before it was verified against null. Check lines: 287, 289.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 756,
+ "endLine": 756,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1949931990,
+ "currentLine": -873819578,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 849,
+ "endLine": 849,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of method return value when it is passed to method as its 2nd argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3065",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Panels\\ScrollBar.cs",
+ "line": 255,
+ "endLine": 255,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 830098888,
+ "currentLine": 1063502971,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Parameter \u0027max\u0027 is not utilized inside method\u0027s body.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3137",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Selection.cs",
+ "line": 169,
+ "endLine": 169,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 65878795,
+ "currentLine": 1815740855,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The \u0027closestIntersection\u0027 variable is assigned but is not used by the end of the function.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 774,
+ "endLine": 774,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1949931990,
+ "currentLine": -873819578,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 849,
+ "endLine": 849,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of method return value when it is passed to method as its 2nd argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deploy\\VCEnvironment.cs",
+ "line": 304,
+ "endLine": 304,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
+ "line": 126,
+ "endLine": 126,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 10823529,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.CopyPaste.cs",
+ "line": 289,
+ "endLine": 289,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -414337831,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: node.Values !\u003d null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\UICanvas.cs",
+ "line": 527,
+ "endLine": 527,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 76173129,
+ "currentLine": 1051379438,
+ "nextLine": 13812,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\UI\\UICanvas.cs",
+ "line": 529,
+ "endLine": 529,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_guiRoot\u0027 object was used before it was verified against null. Check lines: 527, 529.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3106",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
+ "line": 457,
+ "endLine": 457,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 36080,
+ "currentLine": -549169312,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanel.cs",
+ "line": 634,
+ "endLine": 634,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The 1st argument \u0027index\u0027 is potentially used inside method to point beyond collection\u0027s bounds.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\CollectionEditor.cs",
+ "line": 72,
+ "endLine": 72,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 197296703,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.ContextMenu.cs",
+ "line": 324,
+ "endLine": 324,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 84667522,
+ "currentLine": 39528297,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 595,
+ "endLine": 595,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 10823529,
+ "nextLine": 1019178747,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\UIntValueBox.cs",
+ "line": 115,
+ "endLine": 115,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1042995749,
+ "currentLine": -848030463,
+ "nextLine": 174178098,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
+ "line": 209,
+ "endLine": 209,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 34656253,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
+ "line": 218,
+ "endLine": 218,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027scene.IsEdited\u0027. Consider inspecting the 1st argument: GetActorNode(scene) as SceneNode.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 1297,
+ "endLine": 1297,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 887313387,
+ "currentLine": -482191901,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Platform.cs",
+ "line": 57,
+ "endLine": 57,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 2244993,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Tree\\TreeNode.cs",
+ "line": 344,
+ "endLine": 344,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1054762423,
+ "currentLine": -1918622443,
+ "nextLine": 754910666,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _opened.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\ActorTransformEditor.cs",
+ "line": 132,
+ "endLine": 132,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": 762899,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3110",
+ "cwe": 674,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.cs",
+ "line": 289,
+ "endLine": 289,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": -1600349245,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible infinite recursion inside \u0027RootWindow\u0027 property.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ActorTrack.cs",
+ "line": 162,
+ "endLine": 162,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 197318112,
+ "currentLine": 39528297,
+ "nextLine": 2091046699,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Parsing.cs",
+ "line": 288,
+ "endLine": 288,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1895773223,
+ "currentLine": 219069897,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
+ "line": 718,
+ "endLine": 718,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 5951337,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027pdbFile !\u003d null\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\AnimationGraphWindow.cs",
+ "line": 290,
+ "endLine": 290,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\SceneAnimationWindow.cs",
+ "line": 475,
+ "endLine": 475,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -146923666,
+ "currentLine": 410114888,
+ "nextLine": -1484736164,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\RenderOutputControl.cs",
+ "line": 82,
+ "endLine": 82,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside property at \u0027value.Value\u0027. Consider inspecting: null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix3x3.cs",
+ "line": 1648,
+ "endLine": 1648,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1823335671,
+ "nextLine": 2091507959,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: shearAngles.X \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
+ "line": 115,
+ "endLine": 115,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 2244993,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
+ "line": 315,
+ "endLine": 315,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1265294171,
+ "currentLine": -1068793631,
+ "nextLine": 2638153,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027prefab\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonCustomSerializers\\ExtendedDefaultContractResolver.cs",
+ "line": 66,
+ "endLine": 66,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 338,
+ "endLine": 338,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2055388090,
+ "currentLine": -228939432,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: _anchorMin.Y !\u003d _anchorMax.Y. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3066",
+ "cwe": 683,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Special\\RadialMenu.cs",
+ "line": 374,
+ "endLine": 374,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -945172612,
+ "currentLine": -380482562,
+ "nextLine": 497174469,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible incorrect order of arguments passed to \u0027Atan2\u0027 method: \u0027p.X\u0027 and \u0027p.Y\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
+ "line": 1214,
+ "endLine": 1214,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -482191901,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonCustomSerializers\\ExtendedSerializationBinder.cs",
+ "line": 201,
+ "endLine": 201,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1968057933,
+ "currentLine": -352437663,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027assemblyDelimiterIndex\u0027 is always not null. The operator \u0027??\u0027 is excessive.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\InputEvent.cs",
+ "line": 10,
+ "endLine": 10,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": -285293576,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\InputEvent.cs",
+ "line": 104,
+ "endLine": 104,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027InputEvent\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
+ "line": 379,
+ "endLine": 379,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -1891950664,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Undo\\AddRemoveNodeAction.cs",
+ "line": 26,
+ "endLine": 26,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027node.Surface\u0027. Consider inspecting the 1st argument: rerouteNode.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\RenameTrackAction.cs",
+ "line": 21,
+ "endLine": 21,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1943407749,
+ "currentLine": 199585797,
+ "nextLine": 1992334457,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027track\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 709,
+ "endLine": 709,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 6205027,
+ "nextLine": 5607,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027SaveSurface()\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\TimelineEdge.cs",
+ "line": 73,
+ "endLine": 73,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 866780861,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027base.OnMouseDown(location, button)\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 570,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Tree\\TreeNode.cs",
+ "line": 365,
+ "endLine": 365,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1054762423,
+ "currentLine": -1918622443,
+ "nextLine": 754910666,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always false if it is evaluated: _opened.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Foliage\\PaintTab.cs",
+ "line": 296,
+ "endLine": 296,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -1621785026,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Popups\\AssetSearchPopup.cs",
+ "line": 85,
+ "endLine": 85,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027item.ShortName\u0027. Consider inspecting the 1st argument: asset.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 12,
+ "endLine": 12,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": 1528060217,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
+ "line": 92,
+ "endLine": 92,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027DockHintWindow\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Editor.cs",
+ "line": 351,
+ "endLine": 351,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 2244993,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 809,
+ "endLine": 809,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 252577269,
+ "currentLine": 95399869,
+ "nextLine": -1347632307,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: tangentInSize \u003d\u003d 0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\AnimationEventTrack.cs",
+ "line": 350,
+ "endLine": 350,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": -851102447,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3151",
+ "cwe": 369,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Panels\\UniformGridPanel.cs",
+ "line": 116,
+ "endLine": 116,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 553968331,
+ "nextLine": 1459729373,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Panels\\UniformGridPanel.cs",
+ "line": 119,
+ "endLine": 119,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Potential division by zero. The variable was used as a divisor before it was compared with a range of values which includes zero. Check lines: 116, 119.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 790,
+ "endLine": 790,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 526031993,
+ "nextLine": 111057780,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 791,
+ "endLine": 791,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027Surface\u0027 object was used before it was verified against null. Check lines: 790, 791.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
+ "line": 1341,
+ "endLine": 1341,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5710891,
+ "currentLine": -1640001903,
+ "nextLine": 11507755,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: value \u003d\u003d double.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 502,
+ "endLine": 502,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -350140321,
+ "nextLine": 176909,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 500,
+ "endLine": 500,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027parameter.Type\u0027 object was used after it was verified against null. Check lines: 502, 500.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\ContextMenu\\ContextMenuBase.cs",
+ "line": 227,
+ "endLine": 227,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1634962527,
+ "currentLine": 30928389,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\ContextMenu\\ContextMenuBase.cs",
+ "line": 231,
+ "endLine": 231,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_window\u0027 object was used before it was verified against null. Check lines: 227, 231.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3029",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 382,
+ "endLine": 382,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -584423831,
+ "currentLine": 24847635,
+ "nextLine": 23049677,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 384,
+ "endLine": 384,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The conditional expressions of the \u0027if\u0027 statements situated alongside each other are identical. Check lines: 382, 384.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.ContextMenu.cs",
+ "line": 336,
+ "endLine": 336,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": 189443607,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\MaterialWindow.cs",
+ "line": 307,
+ "endLine": 307,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
+ "line": 544,
+ "endLine": 544,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -39666730,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
+ "line": 529,
+ "endLine": 529,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027token\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 544, 529.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 2082,
+ "endLine": 2082,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 157384315,
+ "currentLine": 1808342346,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: string.IsNullOrEmpty(entryInfo.Value).",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\vorbis.cs",
+ "line": 215,
+ "endLine": 215,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 330357201,
+ "currentLine": 1547435535,
+ "nextLine": 21508477,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\vorbis.cs",
+ "line": 222,
+ "endLine": 222,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Proxy\\CollisionDataProxy.cs",
+ "line": 96,
+ "endLine": 96,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -539491647,
+ "currentLine": -372324272,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027collisionData\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 890,
+ "endLine": 890,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1598514311,
+ "currentLine": -399833558,
+ "nextLine": 1993854390,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027selected\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\ActorTransformEditor.cs",
+ "line": 126,
+ "endLine": 126,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1863041,
+ "currentLine": 816021088,
+ "nextLine": -1896027599,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\ActorTransformEditor.cs",
+ "line": 128,
+ "endLine": 128,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027LinkedLabel\u0027 object was used before it was verified against null. Check lines: 126, 128.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Progress\\Handlers\\BuildingGameProgress.cs",
+ "line": 42,
+ "endLine": 42,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 406951278,
+ "currentLine": 12713,
+ "nextLine": 2337,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Progress\\Handlers\\BuildingGameProgress.cs",
+ "line": 45,
+ "endLine": 45,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix2x2.cs",
+ "line": 309,
+ "endLine": 309,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1823335671,
+ "nextLine": 2091507959,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: shearAngles.X \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 883,
+ "endLine": 883,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5607,
+ "currentLine": 39528297,
+ "nextLine": -2080988043,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\SkinnedModelWindow.cs",
+ "line": 1247,
+ "endLine": 1247,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1601147684,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: !_meshDatasCancel.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisualScriptSurface.cs",
+ "line": 610,
+ "endLine": 610,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 413,
+ "currentLine": -2012781934,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027node\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
+ "line": 1324,
+ "endLine": 1324,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1668948979,
+ "nextLine": 5710891,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: value \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
+ "line": 1326,
+ "endLine": 1326,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 5710891,
+ "currentLine": -1669194355,
+ "nextLine": 11507755,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: value \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\NvCloth.cs",
+ "line": 83,
+ "endLine": 83,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 330356367,
+ "currentLine": 2030477402,
+ "nextLine": 2337,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\NvCloth.cs",
+ "line": 90,
+ "endLine": 90,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneEditingModule.cs",
+ "line": 585,
+ "endLine": 585,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -38636684,
+ "currentLine": 761041674,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetActorNode(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
+ "line": 975,
+ "endLine": 975,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 431268495,
+ "currentLine": 1484687436,
+ "nextLine": 1535220865,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useResponseFile\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.Contents.cs",
+ "line": 484,
+ "endLine": 484,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1557903299,
+ "currentLine": 10823529,
+ "nextLine": 995216132,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3106",
+ "cwe": 787,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1688,
+ "endLine": 1688,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 238209197,
+ "nextLine": 162442199,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible negative index value. The value of \u0027n - 1\u0027 index could reach -2.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3106",
+ "cwe": 125,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1688,
+ "endLine": 1688,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 238209197,
+ "nextLine": 162442199,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible negative index value. The value of \u0027n - 1\u0027 index could reach -2.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\BehaviorTreeWindow.cs",
+ "line": 326,
+ "endLine": 326,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 6205027,
+ "nextLine": 5607,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027SaveSurface()\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
+ "line": 1307,
+ "endLine": 1307,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1641017583,
+ "nextLine": 5710891,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: value \u003d\u003d double.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 405,
+ "endLine": 405,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 133090825,
+ "currentLine": -1769919241,
+ "nextLine": -262631924,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027_outputBox\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3039",
+ "cwe": 39,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
+ "line": 238,
+ "endLine": 238,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 796411036,
+ "currentLine": 1006372371,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\AnimationWindow.cs",
+ "line": 165,
+ "endLine": 165,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1075373889,
+ "currentLine": 16018491,
+ "nextLine": 232955,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\AnimationWindow.cs",
+ "line": 135,
+ "endLine": 135,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside property at \u0027value.WaitForLoaded\u0027. Consider inspecting: null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3013",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\AssetEditorWindow.cs",
+ "line": 249,
+ "endLine": 249,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1575956,
+ "currentLine": -1921583599,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\AssetEditorWindow.cs",
+ "line": 272,
+ "endLine": 272,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "It is odd that the body of \u0027OnItemDeleted\u0027 function is fully equivalent to the body of \u0027OnItemDispose\u0027 function (249, line 272).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
+ "line": 770,
+ "endLine": 770,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 801783139,
+ "nextLine": -654660249,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: alpha \u003d\u003d 1.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3097",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingFrustum.cs",
+ "line": 44,
+ "endLine": 44,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1324312541,
+ "currentLine": -1041514531,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingFrustum.cs",
+ "line": 46,
+ "endLine": 46,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible exception: the \u0027BoundingFrustum\u0027 type marked by [Serializable] contains non-serializable members not marked by [NonSerialized].",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Media.cs",
+ "line": 545,
+ "endLine": 545,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1377895587,
+ "currentLine": 1238651214,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Media.cs",
+ "line": 541,
+ "endLine": 541,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_durationFrames\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 545, 541.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ActorEditor.cs",
+ "line": 391,
+ "endLine": 391,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 599963879,
+ "currentLine": 39528297,
+ "nextLine": -2077034023,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 209,
+ "endLine": 209,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1860286649,
+ "currentLine": 707560414,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
+ "line": 208,
+ "endLine": 208,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027childCM\u0027 object was used after it was verified against null. Check lines: 209, 208.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\ViewportDebugDrawData.cs",
+ "line": 14,
+ "endLine": 14,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": -1960715312,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\ViewportDebugDrawData.cs",
+ "line": 167,
+ "endLine": 167,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027ViewportDebugDrawData\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Values\\ValueContainer.cs",
+ "line": 306,
+ "endLine": 306,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Flow.cs",
+ "line": 127,
+ "endLine": 127,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1030593,
+ "currentLine": 541961746,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
+ "line": 1535,
+ "endLine": 1535,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 182363,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027AlphaBlendMode\u0027 enum: Linear.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3013",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\Logger.cs",
+ "line": 210,
+ "endLine": 210,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1575956,
+ "currentLine": 217846910,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\Logger.cs",
+ "line": 222,
+ "endLine": 222,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "It is odd that the body of \u0027LogFormat\u0027 function is fully equivalent to the body of \u0027Log\u0027 function (210, line 222).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 570,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
+ "line": 1078,
+ "endLine": 1078,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -39666730,
+ "currentLine": 34376685,
+ "nextLine": 2337,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always false if it is evaluated: token \u003d\u003d null.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
+ "line": 13,
+ "endLine": 13,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": 764061601,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
+ "line": 82,
+ "endLine": 82,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027MeshDataCache\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 334,
+ "endLine": 334,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917384890,
+ "currentLine": 47033653,
+ "nextLine": 917253816,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 374,
+ "endLine": 374,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917384890,
+ "currentLine": 47033653,
+ "nextLine": 917253816,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\VisualScriptDebuggerWindow.cs",
+ "line": 294,
+ "endLine": 294,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 413,
+ "currentLine": 39528297,
+ "nextLine": 12248860,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix2x2.cs",
+ "line": 310,
+ "endLine": 310,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1823335671,
+ "currentLine": 2091507959,
+ "nextLine": 405504822,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: shearAngles.Y \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Search\\SearchItem.cs",
+ "line": 184,
+ "endLine": 184,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 10823529,
+ "nextLine": -614800267,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\DebugLogWindow.cs",
+ "line": 705,
+ "endLine": 705,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2005067434,
+ "currentLine": -1357183362,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: scrollView.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 157,
+ "endLine": 157,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 263235661,
+ "currentLine": 804049877,
+ "nextLine": -1938424211,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027panel\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 396,
+ "endLine": 396,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917253816,
+ "currentLine": 47033525,
+ "nextLine": 917122750,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\AppleToolchain.cs",
+ "line": 369,
+ "endLine": 369,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1331431438,
+ "currentLine": 1484687436,
+ "nextLine": -248916132,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useResponseFile\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 795,
+ "endLine": 795,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1979095821,
+ "nextLine": 5607,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 849,
+ "endLine": 849,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of \u0027Surface.FindNode(flowInfo.NodeId)\u0027 method return value at \u0027node.Title\u0027 when it is passed to method as its 2nd argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 1517,
+ "endLine": 1517,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 21464287,
+ "currentLine": 243702634,
+ "nextLine": 2069386033,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027buildData.Target\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3107",
+ "cwe": 0,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.cs",
+ "line": 159,
+ "endLine": 159,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -439898606,
+ "currentLine": -1530603393,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Identical expression \u0027position\u0027 to the left and to the right of compound assignment.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 903,
+ "endLine": 903,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1598514311,
+ "currentLine": 944350635,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027selected\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\FloatEditor.cs",
+ "line": 60,
+ "endLine": 60,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": 54737797,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\GenericEditor.cs",
+ "line": 449,
+ "endLine": 449,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 3063,
+ "endLine": 3063,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1715126832,
+ "currentLine": 889615882,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 3062,
+ "endLine": 3062,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027fieldInfo\u0027 object was used after it was verified against null. Check lines: 3063, 3062.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 386,
+ "endLine": 386,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1598514311,
+ "currentLine": 944350635,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027selected\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3152",
+ "cwe": 369,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Network.cs",
+ "line": 149,
+ "endLine": 149,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -309189763,
+ "nextLine": -1430248771,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Network.cs",
+ "line": 139,
+ "endLine": 139,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Potential division by zero. The variable was compared with a range of values which includes zero before it was used as a divisor. Check lines: 149, 139.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Render2D\\FontReference.cs",
+ "line": 99,
+ "endLine": 99,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 3098695,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: _size !\u003d value. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 613,
+ "endLine": 613,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -302305083,
+ "currentLine": 10823529,
+ "nextLine": 943806282,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3146",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\EngineTarget.cs",
+ "line": 191,
+ "endLine": 191,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 595270419,
+ "currentLine": -600957687,
+ "nextLine": 471057516,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.Rules.cs",
+ "line": 99,
+ "endLine": 99,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of \u0027mainModule\u0027. The \u0027Modules.FirstOrDefault\u0027 can return default null value.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\IntValueBox.cs",
+ "line": 104,
+ "endLine": 104,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -659238342,
+ "currentLine": -1872144505,
+ "nextLine": 240213,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 556,
+ "endLine": 556,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -635286754,
+ "currentLine": 10823529,
+ "nextLine": -1462959235,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 354,
+ "endLine": 354,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917384890,
+ "currentLine": 47033653,
+ "nextLine": 917253816,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneEditingModule.cs",
+ "line": 635,
+ "endLine": 635,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1368781623,
+ "currentLine": 228174536,
+ "nextLine": -1219728807,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneEditingModule.cs",
+ "line": 664,
+ "endLine": 664,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027customUndoActions\u0027 object was used before it was verified against null. Check lines: 635, 664.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
+ "line": 365,
+ "endLine": 365,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 62999104,
+ "nextLine": -1737709894,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
+ "line": 408,
+ "endLine": 408,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027ScriptsEditor.ParentEditor\u0027 object was used before it was verified against null. Check lines: 365, 408.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3127",
+ "cwe": 682,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\ColorPickerDialog.cs",
+ "line": 149,
+ "endLine": 149,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1087,
+ "currentLine": -1428373212,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\ColorPickerDialog.cs",
+ "line": 142,
+ "endLine": 142,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two similar code fragments were found. Perhaps, this is a typo and \u0027_cGreen\u0027 variable should be used instead of \u0027_cRed\u0027",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
+ "line": 154,
+ "endLine": 154,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -304040429,
+ "currentLine": 1333727,
+ "nextLine": -497407471,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027sun\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 946,
+ "endLine": 946,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 413,
+ "currentLine": 1165436777,
+ "nextLine": 793314458,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3013",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
+ "line": 260,
+ "endLine": 260,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1575956,
+ "currentLine": -1921583599,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
+ "line": 277,
+ "endLine": 277,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "It is odd that the body of \u0027OnItemDeleted\u0027 function is fully equivalent to the body of \u0027OnItemDispose\u0027 function (260, line 277).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\ContentDatabaseModule.cs",
+ "line": 1251,
+ "endLine": 1251,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 79009,
+ "currentLine": 46807243,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027WatcherChangeTypes\u0027 enum: Changed, All.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.cs",
+ "line": 439,
+ "endLine": 439,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 18090888,
+ "currentLine": 527425857,
+ "nextLine": 2337,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.cs",
+ "line": 442,
+ "endLine": 442,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\PrefabWindow.Hierarchy.cs",
+ "line": 317,
+ "endLine": 317,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 341518184,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 483,
+ "endLine": 483,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1259234840,
+ "currentLine": -162743894,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 491,
+ "endLine": 491,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027dialog.RootWindow\u0027 object was used before it was verified against null. Check lines: 483, 491.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 628,
+ "endLine": 628,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 9488589,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3039",
+ "cwe": 39,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
+ "line": 553,
+ "endLine": 553,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1343412697,
+ "currentLine": -493556915,
+ "nextLine": 737934375,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 1519,
+ "endLine": 1519,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 371137,
+ "nextLine": 5610543,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027separator\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 808,
+ "endLine": 808,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 551626601,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
+ "line": 514,
+ "endLine": 514,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 450835468,
+ "currentLine": -39666730,
+ "nextLine": -559846127,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
+ "line": 513,
+ "endLine": 513,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027token\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 514, 513.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Undo\\Undo.cs",
+ "line": 352,
+ "endLine": 352,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2123660189,
+ "currentLine": 142129,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027action\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3053",
+ "cwe": 0,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Import\\TextureImportEntry.cs",
+ "line": 180,
+ "endLine": 180,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1435255155,
+ "currentLine": 1424435228,
+ "nextLine": 714925805,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An excessive expression. Examine the substrings \u0027ambientocclusion\u0027 and \u0027occlusion\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3083",
+ "cwe": 367,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\Image.cs",
+ "line": 132,
+ "endLine": 132,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 956270890,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Unsafe invocation of event \u0027Clicked\u0027, NullReferenceException is possible. Consider assigning event to a local variable before invoking it.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3107",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Foliage\\EditFoliageGizmo.cs",
+ "line": 154,
+ "endLine": 154,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1236601848,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Identical expression \u0027trans.Orientation\u0027 to the left and to the right of compound assignment.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3105",
+ "cwe": 690,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Utilities\\VariantUtils.cs",
+ "line": 917,
+ "endLine": 917,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 514101685,
+ "currentLine": -2084388378,
+ "nextLine": 0,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Utilities\\TypeUtils.cs",
+ "line": 20,
+ "endLine": 20,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The result of null-conditional operator is dereferenced inside the \u0027WriteVariantType\u0027 method. NullReferenceException is possible. Inspect the first argument \u0027type\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3171",
+ "cwe": 839,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1651,
+ "endLine": 1651,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1816897,
+ "currentLine": 1825089,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix3x3.cs",
+ "line": 1649,
+ "endLine": 1649,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1823335671,
+ "currentLine": 2091507959,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: shearAngles.Y \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 81,
+ "endLine": 81,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -954625549,
+ "currentLine": 761440307,
+ "nextLine": 1606151089,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 713,
+ "endLine": 713,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 551626601,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3083",
+ "cwe": 367,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
+ "line": 906,
+ "endLine": 906,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -306282130,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Unsafe invocation of event \u0027ScriptDragChange\u0027, NullReferenceException is possible. Consider assigning event to a local variable before invoking it.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3087",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\AudioTrack.cs",
+ "line": 271,
+ "endLine": 271,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 348699038,
+ "nextLine": 211206031,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Type of variable enumerated in \u0027foreach\u0027 is not guaranteed to be castable to the type of collection\u0027s elements.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Input\\LongValueBox.cs",
+ "line": 91,
+ "endLine": 91,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 553804151,
+ "currentLine": 1711550716,
+ "nextLine": 174178098,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: limits.Max \u003d\u003d int.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3062",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\KeyframesEditorUtils.cs",
+ "line": 42,
+ "endLine": 42,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 539,
+ "currentLine": 2083022370,
+ "nextLine": 152869,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An object \u0027editor\u0027 is used as an argument to its own method. Consider checking the first actual argument of the \u0027OnKeyframesDeselect\u0027 method.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\GameplayGlobalsWindow.cs",
+ "line": 330,
+ "endLine": 330,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1499381263,
+ "currentLine": 39528297,
+ "nextLine": -1653391353,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Undo\\Undo.cs",
+ "line": 338,
+ "endLine": 338,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2123646477,
+ "currentLine": 568945,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027action\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SourceCodeEditing\\CodeDocsModule.cs",
+ "line": 327,
+ "endLine": 327,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Editor.cs",
+ "line": 604,
+ "endLine": 604,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1281022636,
+ "currentLine": 123422025,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Editor.cs",
+ "line": 607,
+ "endLine": 607,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027UI\u0027 object was used before it was verified against null. Check lines: 604, 607.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Particles.cs",
+ "line": 327,
+ "endLine": 327,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 183841,
+ "currentLine": 907932904,
+ "nextLine": 1413683,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027function\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\nethost.cs",
+ "line": 156,
+ "endLine": 156,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 313455271,
+ "nextLine": 2337,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\nethost.cs",
+ "line": 161,
+ "endLine": 161,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Program.cs",
+ "line": 106,
+ "endLine": 106,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -1798325879,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\PrefabWindow.Hierarchy.cs",
+ "line": 302,
+ "endLine": 302,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 341518184,
+ "nextLine": 1542458689,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
+ "line": 469,
+ "endLine": 469,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1971593666,
+ "currentLine": 97990893,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.cs",
+ "line": 696,
+ "endLine": 696,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027control.IsSelected\u0027. Consider inspecting the 1st argument: node.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 86,
+ "endLine": 86,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2044871539,
+ "currentLine": 2120718357,
+ "nextLine": 1020171548,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Log.cs",
+ "line": 11,
+ "endLine": 11,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 216764,
+ "currentLine": 47917697,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Log.cs",
+ "line": 44,
+ "endLine": 44,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027Log\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3105",
+ "cwe": 690,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
+ "line": 130,
+ "endLine": 130,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -939225972,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
+ "line": 151,
+ "endLine": 151,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The result of null-conditional operator is dereferenced inside the \u0027Show\u0027 method. NullReferenceException is possible. Inspect the first argument \u0027parentWindow?.Window\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 87,
+ "endLine": 87,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2120718357,
+ "currentLine": 1020171548,
+ "nextLine": 5607,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
+ "line": 981,
+ "endLine": 981,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1598514311,
+ "currentLine": 563359994,
+ "nextLine": 1834641805,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\SceneEditingModule.cs",
+ "line": 254,
+ "endLine": 254,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1943450911,
+ "nextLine": 1452381854,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
+ "line": 170,
+ "endLine": 170,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 10823529,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3203",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\NativeInterop.Marshallers.cs",
+ "line": 51,
+ "endLine": 51,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 1139822315,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Method parameter is not used: unmanaged.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3086",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\AppleToolchain.cs",
+ "line": 47,
+ "endLine": 47,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -2085537476,
+ "currentLine": -613861060,
+ "nextLine": 378085957,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\AppleToolchain.cs",
+ "line": 46,
+ "endLine": 46,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Variables ClangPath, LinkerPath are initialized through the call to the same function. It\u0027s probably an error or un-optimized code.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3066",
+ "cwe": 683,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix.cs",
+ "line": 3069,
+ "endLine": 3069,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1027954124,
+ "nextLine": 352987,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible incorrect order of arguments passed to \u0027Multiply\u0027 method: \u0027right\u0027 and \u0027left\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3171",
+ "cwe": 839,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1650,
+ "endLine": 1650,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2856205,
+ "currentLine": 1816897,
+ "nextLine": 1825089,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 474,
+ "endLine": 474,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 64671241,
+ "currentLine": -1769920317,
+ "nextLine": 98657769,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027_inputBox\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\glslang.cs",
+ "line": 22,
+ "endLine": 22,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 330357817,
+ "currentLine": 88383,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\glslang.cs",
+ "line": 27,
+ "endLine": 27,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 80,
+ "endLine": 80,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1343251132,
+ "currentLine": -954625549,
+ "nextLine": 761440307,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Proxy\\CollisionDataProxy.cs",
+ "line": 113,
+ "endLine": 113,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -539491615,
+ "currentLine": -1979052924,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027collisionData\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3066",
+ "cwe": 683,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix3x3.cs",
+ "line": 1957,
+ "endLine": 1957,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1366175206,
+ "nextLine": 352987,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible incorrect order of arguments passed to \u0027Multiply\u0027 method: \u0027right\u0027 and \u0027left\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Thumbnails\\ThumbnailRequest.cs",
+ "line": 12,
+ "endLine": 12,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": 1817925791,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Thumbnails\\ThumbnailRequest.cs",
+ "line": 121,
+ "endLine": 121,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027ThumbnailRequest\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Terrain\\EditTerrainGizmo.cs",
+ "line": 71,
+ "endLine": 71,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 93642011,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027Modes\u0027 enum: Export.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3130",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Special\\RadialMenu.cs",
+ "line": 226,
+ "endLine": 226,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1628710754,
+ "currentLine": 1948501713,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Priority of the \u0027\u0026\u0026\u0027 operator is higher than that of the \u0027||\u0027 operator. Possible missing parentheses.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
+ "line": 363,
+ "endLine": 363,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\ParticleModules.cs",
+ "line": 402,
+ "endLine": 402,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 905298217,
+ "currentLine": 928054386,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
+ "line": 419,
+ "endLine": 419,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -75047871,
+ "currentLine": 2112015717,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027_output\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 376,
+ "endLine": 376,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917253816,
+ "currentLine": 47033525,
+ "nextLine": 917122750,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ObjectPropertyTrack.cs",
+ "line": 130,
+ "endLine": 130,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 200020952,
+ "currentLine": 39528297,
+ "nextLine": -1080797340,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 591,
+ "endLine": 591,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1937636774,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027base.OnMouseUp(location, button)\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\SplineNode.cs",
+ "line": 169,
+ "endLine": 169,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1547286084,
+ "currentLine": 187432065,
+ "nextLine": 214668217,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027splineNode\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
+ "line": 572,
+ "endLine": 572,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -196148635,
+ "nextLine": 31800591,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027_mouseMoveAmount \u003e 0 \u0026\u0026 _middleMouseDown\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3106",
+ "cwe": 787,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1696,
+ "endLine": 1696,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -2087586874,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible negative index value. The value of \u0027n - 1\u0027 index could reach -2.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3106",
+ "cwe": 125,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1696,
+ "endLine": 1696,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -2087586874,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible negative index value. The value of \u0027n\u0027 index could reach -1.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3106",
+ "cwe": 125,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 1696,
+ "endLine": 1696,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -2087586874,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible negative index value. The value of \u0027n - 1\u0027 index could reach -2.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\PluginsWindow.cs",
+ "line": 734,
+ "endLine": 734,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1083623338,
+ "currentLine": -169073198,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\PluginsWindow.cs",
+ "line": 692,
+ "endLine": 692,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027pluginVersion\u0027 object was used after it was verified against null. Check lines: 734, 692.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 158,
+ "endLine": 158,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 804049877,
+ "currentLine": -1938424211,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027settingsPanel\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 313,
+ "endLine": 313,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917253816,
+ "currentLine": 47033525,
+ "nextLine": 917122750,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\QuaternionEditor.cs",
+ "line": 66,
+ "endLine": 66,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": 1836050938,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 372,
+ "endLine": 372,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 10971609,
+ "currentLine": 47033781,
+ "nextLine": 917384890,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 752,
+ "endLine": 752,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 925841144,
+ "currentLine": 656591904,
+ "nextLine": 11102239,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027picker\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ActorTrack.cs",
+ "line": 164,
+ "endLine": 164,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2091046699,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\Builder.DotNet.cs",
+ "line": 368,
+ "endLine": 368,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -841402254,
+ "currentLine": -4911802,
+ "nextLine": -1980999885,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027project\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
+ "line": 1008,
+ "endLine": 1008,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 525301392,
+ "currentLine": 163710116,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Foliage\\FoliageTypesTab.cs",
+ "line": 480,
+ "endLine": 480,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1327462052,
+ "currentLine": -1621785026,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Popups\\AssetSearchPopup.cs",
+ "line": 85,
+ "endLine": 85,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027item.ShortName\u0027. Consider inspecting the 1st argument: asset.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 906,
+ "endLine": 906,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\SceneNode.cs",
+ "line": 71,
+ "endLine": 71,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 341518184,
+ "nextLine": 20999091,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 1644,
+ "endLine": 1644,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 435035580,
+ "currentLine": -249367255,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 758,
+ "endLine": 758,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of \u0027node.GetBox(0)\u0027 method return value at \u0027end.IsOutput\u0027 when it is passed to method as its 1st argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Foliage\\FoliageTypesTab.cs",
+ "line": 520,
+ "endLine": 520,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1731770463,
+ "currentLine": 152700762,
+ "nextLine": 746654530,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Tools\\Foliage\\FoliageTypesTab.cs",
+ "line": 521,
+ "endLine": 521,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027foliage\u0027 object was used before it was verified against null. Check lines: 520, 521.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3090",
+ "cwe": 833,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\ProgressDisplay.cs",
+ "line": 134,
+ "endLine": 134,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1331695853,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Unsafe locking on an object of type \u0027Thread\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
+ "line": 2193,
+ "endLine": 2193,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 10823529,
+ "nextLine": 601722951,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 871,
+ "endLine": 871,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1597153265,
+ "currentLine": -1491785879,
+ "nextLine": 628674383,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 729,
+ "endLine": 729,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -249367255,
+ "nextLine": -981169433,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 758,
+ "endLine": 758,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of \u0027node.GetBox(0)\u0027 method return value at \u0027end.IsOutput\u0027 when it is passed to method as its 1st argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 942,
+ "endLine": 942,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 1240,
+ "endLine": 1240,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 663272806,
+ "nextLine": 831015659,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Plugins\\PluginUtils.cs",
+ "line": 91,
+ "endLine": 91,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1135161342,
+ "currentLine": 1356979630,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027gameEditorAssembly\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 710,
+ "endLine": 710,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1336455718,
+ "currentLine": -1816557167,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: keyframe.TangentIn.Translation.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 710,
+ "endLine": 710,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1336455718,
+ "currentLine": -1816557167,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 1106,
+ "endLine": 1106,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -2080195201,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 407,
+ "endLine": 407,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -262631924,
+ "currentLine": 64678804,
+ "nextLine": 98657769,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027_defaultValueBox\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 618,
+ "endLine": 618,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 862973185,
+ "currentLine": 10823529,
+ "nextLine": 529051994,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 727,
+ "endLine": 727,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 413,
+ "currentLine": 435035580,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027impulseBox\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3156",
+ "cwe": 628,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Scripting\\TypeUtils.cs",
+ "line": 375,
+ "endLine": 375,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -460955378,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The first argument of the \u0027CreateInstance\u0027 method is not expected to be null. Potential null value: GetType(elementType).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\GenericEditor.cs",
+ "line": 503,
+ "endLine": 503,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -29049501,
+ "currentLine": 39528297,
+ "nextLine": -387363588,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\DebugLogWindow.cs",
+ "line": 242,
+ "endLine": 242,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 866780861,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027base.OnMouseDown(location, button)\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ToolboxWindow.cs",
+ "line": 267,
+ "endLine": 267,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1357389608,
+ "nextLine": 747625,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetChild\u003cPanel\u003e().",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3013",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Editor.cs",
+ "line": 1447,
+ "endLine": 1447,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 763605136,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Editor.cs",
+ "line": 1452,
+ "endLine": 1452,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "It is odd that the body of \u0027Internal_CanAutoBuildCSG\u0027 function is fully equivalent to the body of \u0027Internal_CanAutoBuildNavMesh\u0027 function.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
+ "line": 714,
+ "endLine": 714,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 148559725,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useSeparatePdb\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
+ "line": 356,
+ "endLine": 356,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 477270135,
+ "nextLine": -868195576,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\RenderOutputControl.cs",
+ "line": 82,
+ "endLine": 82,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside property at \u0027value.Value\u0027. Consider inspecting: new Int2?().",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3072",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\LocalizedStringTableWindow.cs",
+ "line": 19,
+ "endLine": 19,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1559036708,
+ "currentLine": 1019009626,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\LocalizedStringTableWindow.cs",
+ "line": 25,
+ "endLine": 25,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027LocalizedStringTableWindow\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: _undo.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
+ "line": 197,
+ "endLine": 197,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 162935,
+ "currentLine": -341949222,
+ "nextLine": 333,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetChild\u003cPanel\u003e().",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Draw.cs",
+ "line": 205,
+ "endLine": 205,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 791267737,
+ "nextLine": 1207555094,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Draw.cs",
+ "line": 203,
+ "endLine": 203,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_vertexSnapObjectTo\u0027 object was used after it was verified against null. Check lines: 205, 203.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.cs",
+ "line": 773,
+ "endLine": 773,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 552932,
+ "currentLine": 1866730575,
+ "nextLine": 193921971,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027SelectedNode\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Render2D\\FontReference.cs",
+ "line": 146,
+ "endLine": 146,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 2116643121,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: _size \u003d\u003d other._size. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
+ "line": 413,
+ "endLine": 413,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 917384890,
+ "currentLine": 47033653,
+ "nextLine": 917253816,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\ModelWindow.cs",
+ "line": 655,
+ "endLine": 655,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -435003059,
+ "currentLine": 1439476806,
+ "nextLine": 1221769864,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027meshDatas\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3053",
+ "cwe": 0,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Import\\TextureImportEntry.cs",
+ "line": 160,
+ "endLine": 160,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 178573557,
+ "currentLine": 1419438780,
+ "nextLine": 1428601579,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An excessive expression. Examine the substrings \u0027color\u0027 and \u0027basecolor\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\MainEditorGizmoViewport.cs",
+ "line": 236,
+ "endLine": 236,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 17831986,
+ "currentLine": 375071993,
+ "nextLine": -302271028,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 366,
+ "endLine": 366,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1830091254,
+ "currentLine": 1659810392,
+ "nextLine": 1428719,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 286,
+ "endLine": 286,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027typeInfo.GenericArgs[0]\u0027 object was used after it was verified against null. Check lines: 366, 286.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 536,
+ "endLine": 536,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 30636,
+ "currentLine": -1139625551,
+ "nextLine": 76,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: _shear.Y \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Constants.cs",
+ "line": 49,
+ "endLine": 49,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 39528297,
+ "nextLine": 1423272038,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3176",
+ "cwe": 570,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Program.cs",
+ "line": 131,
+ "endLine": 131,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 788124921,
+ "currentLine": -1951352535,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The \u0027|\u003d\u0027 operator is redundant because the right operand \u0027DepsBuilder.Run()\u0027 is always false.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\Previews\\MaterialPreview.cs",
+ "line": 110,
+ "endLine": 110,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 375072814,
+ "nextLine": 171986697,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Tags.cs",
+ "line": 213,
+ "endLine": 213,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1830805086,
+ "nextLine": 730945,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3053",
+ "cwe": 0,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
+ "line": 574,
+ "endLine": 574,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 956869692,
+ "currentLine": -1965392317,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An excessive expression. Examine the substrings \u0027System.Reflection.Emit\u0027 and \u0027System.Reflection.Emit.ILGeneration\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\ReorderTrackAction.cs",
+ "line": 25,
+ "endLine": 25,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1559596790,
+ "currentLine": 1176442518,
+ "nextLine": 398784235,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027track\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Debug\\FloatComparer.cs",
+ "line": 98,
+ "endLine": 98,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 47013437,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: expected \u003d\u003d actual. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3130",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Utilities\\ShuntingYardParser.cs",
+ "line": 237,
+ "endLine": 237,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -619770676,
+ "currentLine": -1025911625,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Priority of the \u0027\u0026\u0026\u0027 operator is higher than that of the \u0027||\u0027 operator. Possible missing parentheses.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3039",
+ "cwe": 39,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependency.cs",
+ "line": 383,
+ "endLine": 383,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1717980449,
+ "currentLine": -2028201774,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3072",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\MaterialInstanceWindow.cs",
+ "line": 25,
+ "endLine": 25,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1559036708,
+ "currentLine": -1382461101,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Assets\\MaterialInstanceWindow.cs",
+ "line": 369,
+ "endLine": 369,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027MaterialInstanceWindow\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: _undo.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
+ "line": 499,
+ "endLine": 499,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 284495266,
+ "currentLine": 11982701,
+ "nextLine": 147527529,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027useSeparatePdb\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3163",
+ "cwe": 1069,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 865,
+ "endLine": 865,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 1094,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3140",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
+ "line": 34,
+ "endLine": 34,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -648321897,
+ "currentLine": 5965804,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Property accessors use different backing fields.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanel.cs",
+ "line": 253,
+ "endLine": 253,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 25472443,
+ "currentLine": 2080896135,
+ "nextLine": 48748425,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: _tabs.Count \u003e 0.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3097",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Undo\\Actions\\TransformObjectsAction.cs",
+ "line": 24,
+ "endLine": 24,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 795687,
+ "currentLine": 383596687,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Undo\\Actions\\TransformObjectsAction.cs",
+ "line": 29,
+ "endLine": 29,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible exception: the \u0027DataStorage\u0027 type marked by [Serializable] contains non-serializable members not marked by [NonSerialized].",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3164",
+ "cwe": 544,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Utilities\\BuildException.cs",
+ "line": 7,
+ "endLine": 7,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1272756102,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Exception classes should be publicly accessible.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 2072,
+ "endLine": 2072,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1619945910,
+ "currentLine": 1915418429,
+ "nextLine": 390613,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027value\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProjectGenerator.cs",
+ "line": 666,
+ "endLine": 666,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 171107081,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027!useResharperBuild\u0027 is always true.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Plane.cs",
+ "line": 590,
+ "endLine": 590,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 196442114,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: D \u003d\u003d value.D. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Particles.cs",
+ "line": 308,
+ "endLine": 308,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -1584616506,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\GradientEditor.cs",
+ "line": 132,
+ "endLine": 132,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1879261150,
+ "nextLine": 88117,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027base.OnMouseDoubleClick(location, button)\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3146",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\ProjectInfo.cs",
+ "line": 263,
+ "endLine": 263,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 358568557,
+ "currentLine": 1287588840,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.Rules.cs",
+ "line": 99,
+ "endLine": 99,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of \u0027rules.GetModule(x)\u0027 return value. The \u0027Modules.FirstOrDefault\u0027 can return default null value.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3125",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\CommandLine.cs",
+ "line": 473,
+ "endLine": 473,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -990053914,
+ "currentLine": -1501958204,
+ "nextLine": 1965447114,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\CommandLine.cs",
+ "line": 465,
+ "endLine": 465,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027option.Value\u0027 object was used after it was verified against null. Check lines: 473, 465.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.ContextMenu.cs",
+ "line": 400,
+ "endLine": 400,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": 39528297,
+ "nextLine": 0,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3203",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\UI\\GUI\\Tooltip.cs",
+ "line": 51,
+ "endLine": 51,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 570354633,
+ "currentLine": -987398062,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Method parameter is not used: targetArea.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3008",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Media.cs",
+ "line": 544,
+ "endLine": 544,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1377895587,
+ "nextLine": 1238651214,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Media.cs",
+ "line": 540,
+ "endLine": 540,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027_startFrame\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 544, 540.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Track.cs",
+ "line": 1081,
+ "endLine": 1081,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 39528297,
+ "nextLine": -1054278586,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
+ "line": 425,
+ "endLine": 425,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 976826205,
+ "currentLine": -1528170778,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Scripting\\TypeUtils.cs",
+ "line": 395,
+ "endLine": 395,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference inside method at \u0027type.BaseType\u0027. Consider inspecting the 1st argument: managedType.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3105",
+ "cwe": 690,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\States\\LoadingState.cs",
+ "line": 60,
+ "endLine": 60,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1338394200,
+ "currentLine": 1758154160,
+ "nextLine": -1018788951,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The result of null-conditional operator is passed as the first argument to the \u0027Combine\u0027 method and is not expected to be null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
+ "line": 1815,
+ "endLine": 1815,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -72950041,
+ "nextLine": 890357,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027buildData.Target\u0027.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3117",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\RenameTrackAction.cs",
+ "line": 11,
+ "endLine": 11,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -609472751,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Constructor parameter \u0027track\u0027 is not used.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
+ "line": 2055,
+ "endLine": 2055,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -1425279375,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: b !\u003d null.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\ParticleModules.cs",
+ "line": 367,
+ "endLine": 367,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 125,
+ "currentLine": -1584616506,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3002",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.cs",
+ "line": 144,
+ "endLine": 144,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 532890,
+ "currentLine": 750097643,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The switch statement does not cover all values of the \u0027PivotType\u0027 enum: WorldOrigin.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\SceneGraphNode.cs",
+ "line": 25,
+ "endLine": 25,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 890357,
+ "currentLine": 355346426,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\SceneGraphNode.cs",
+ "line": 450,
+ "endLine": 450,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027SceneGraphNode\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
+ "line": 234,
+ "endLine": 234,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 183841,
+ "currentLine": 907932904,
+ "nextLine": 1413683,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027function\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3139",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\nethost.cs",
+ "line": 339,
+ "endLine": 339,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 330356367,
+ "currentLine": 2030477402,
+ "nextLine": 2337,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\nethost.cs",
+ "line": 342,
+ "endLine": 342,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two or more case-branches perform the same actions.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 606,
+ "endLine": 606,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1059010338,
+ "currentLine": 10823529,
+ "nextLine": -2114483551,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3013",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 465,
+ "endLine": 465,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": 2048639584,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
+ "line": 470,
+ "endLine": 470,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "It is odd that the body of \u0027CanSetAllTangentsSmooth\u0027 function is fully equivalent to the body of \u0027CanSetAllTangentsLinear\u0027 function (465, line 470).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3024",
+ "cwe": 682,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Scripting\\ScriptType.cs",
+ "line": 417,
+ "endLine": 417,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 1617402118,
+ "nextLine": 551838811,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "An odd precise comparison: asFloat \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 538,
+ "endLine": 538,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1108266486,
+ "currentLine": 10823529,
+ "nextLine": 595003537,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3196",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
+ "line": 637,
+ "endLine": 637,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -531989313,
+ "currentLine": 1113546383,
+ "nextLine": 39233,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The \u0027index\u0027 parameter is not utilized inside the method body, but an identifier with a similar name is used inside the same method.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\DictionaryEditor.cs",
+ "line": 50,
+ "endLine": 50,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 46874835,
+ "currentLine": 39528297,
+ "nextLine": -658370295,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\StaticModelNode.cs",
+ "line": 175,
+ "endLine": 175,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 588604617,
+ "currentLine": -529961342,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027collisionDataProxy\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3137",
+ "cwe": 563,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Assets.cs",
+ "line": 289,
+ "endLine": 289,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 26501823,
+ "currentLine": -678375373,
+ "nextLine": -874279451,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The \u0027b\u0027 variable is assigned but is not used by the end of the function.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3022",
+ "cwe": 570,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Tree\\TreeNode.cs",
+ "line": 566,
+ "endLine": 566,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 21252149,
+ "currentLine": 699150524,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Expression \u0027_dragOverMode \u003d\u003d DragItemPositioning.None\u0027 is always false.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3059",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Cache\\Intermediate\\FlaxEditor\\Windows\\x64\\Development\\Core\\Core.Bindings.Gen.cs",
+ "line": 797,
+ "endLine": 797,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 102185,
+ "currentLine": 5970129,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Members of the \u0027LogType\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\EditTrackAction.cs",
+ "line": 41,
+ "endLine": 41,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": -573042562,
+ "nextLine": 148157648,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027track\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 641,
+ "endLine": 641,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 992483961,
+ "currentLine": 10823529,
+ "nextLine": -805283227,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
+ "line": 704,
+ "endLine": 704,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 435035580,
+ "currentLine": -249367255,
+ "nextLine": 125,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
+ "line": 758,
+ "endLine": 758,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Possible null dereference of \u0027node.GetBox(0)\u0027 method return value at \u0027end.IsOutput\u0027 when it is passed to method as its 1st argument.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Animation.StateMachine.cs",
+ "line": 785,
+ "endLine": 785,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 2116578757,
+ "currentLine": 341518184,
+ "nextLine": 1777121892,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3107",
+ "cwe": 0,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Viewport\\PrefabWindowViewport.cs",
+ "line": 392,
+ "endLine": 392,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1379169572,
+ "currentLine": -1236601848,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Identical expression \u0027trans.Orientation\u0027 to the left and to the right of compound assignment.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Content\\Proxy\\AudioClipProxy.cs",
+ "line": 47,
+ "endLine": 47,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 123,
+ "currentLine": 21882333,
+ "nextLine": -108351383,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3074",
+ "cwe": 0,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
+ "line": 29,
+ "endLine": 29,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -1404299080,
+ "nextLine": 123,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
+ "line": 221,
+ "endLine": 221,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027JsonSerializer\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3063",
+ "cwe": 571,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 2257,
+ "endLine": 2257,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -1816815087,
+ "currentLine": 1423458500,
+ "nextLine": -1254532193,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "A part of conditional expression is always true if it is evaluated: useScripting.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3164",
+ "cwe": 544,
+ "level": 3,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Engine\\NativeInterop.cs",
+ "line": 1905,
+ "endLine": 1905,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -1579687328,
+ "nextLine": 123,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Exception classes should be publicly accessible.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 754,
+ "endLine": 754,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -642909595,
+ "currentLine": -195310750,
+ "nextLine": -833661014,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3010",
+ "cwe": 252,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
+ "line": 621,
+ "endLine": 621,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": -34239414,
+ "currentLine": 10823529,
+ "nextLine": -551020075,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3095",
+ "cwe": 476,
+ "level": 1,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 722,
+ "endLine": 722,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 0,
+ "currentLine": -1681340331,
+ "nextLine": 22548713,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
+ "line": 727,
+ "endLine": 727,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "The \u0027typeInfo.GenericArgs\u0027 object was used before it was verified against null. Check lines: 722, 727.",
+ "projects": [
+ "Flax.Build"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3127",
+ "cwe": 682,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Float3.cs",
+ "line": 1357,
+ "endLine": 1357,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 69893321,
+ "currentLine": 69909711,
+ "nextLine": 69942487,
+ "columns": 0
+ }
+ },
+ {
+ "file": "|?|\\Source\\Engine\\Core\\Math\\Float3.cs",
+ "line": 1358,
+ "endLine": 1358,
+ "column": 1,
+ "endColumn": 1
+ }
+ ],
+ "message": "Two similar code fragments were found. Perhaps, this is a typo and \u0027y\u0027 variable should be used instead of \u0027z\u0027",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ },
+ {
+ "code": "V3080",
+ "cwe": 476,
+ "level": 2,
+ "positions": [
+ {
+ "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Comparisons.cs",
+ "line": 71,
+ "endLine": 71,
+ "column": 1,
+ "endColumn": 1,
+ "navigation": {
+ "previousLine": 1030593,
+ "currentLine": 541961234,
+ "nextLine": 125,
+ "columns": 0
+ }
+ }
+ ],
+ "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
+ "projects": [
+ "FlaxEngine"
+ ],
+ "favorite": false,
+ "falseAlarm": false
+ }
+ ]
+}
\ No newline at end of file
From b9506edc034c3b164c20a09a7226b57af80e7903 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 15:33:25 -0500
Subject: [PATCH 057/114] Remove flax.json file from commit
---
Source/Flax.json | 19162 ---------------------------------------------
1 file changed, 19162 deletions(-)
delete mode 100644 Source/Flax.json
diff --git a/Source/Flax.json b/Source/Flax.json
deleted file mode 100644
index 321899e81..000000000
--- a/Source/Flax.json
+++ /dev/null
@@ -1,19162 +0,0 @@
-{
- "version": 2,
- "warnings": [
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Parsing.cs",
- "line": 297,
- "endLine": 297,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1997543523,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3111",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cache.cs",
- "line": 107,
- "endLine": 107,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 96617,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Checking value of \u0027e\u0027 for null will always return false when generic type is instantiated with a value type.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ActorTrack.cs",
- "line": 190,
- "endLine": 190,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 572139940,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 394,
- "endLine": 394,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917384890,
- "currentLine": 47033653,
- "nextLine": 917253816,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 811,
- "endLine": 811,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1347632307,
- "currentLine": 190804925,
- "nextLine": 1601225548,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: tangentOutSize \u003d\u003d 0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 731,
- "endLine": 731,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1336455718,
- "currentLine": 1853667784,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 311,
- "endLine": 311,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917384890,
- "currentLine": 47033653,
- "nextLine": 917253816,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Cache\\Intermediate\\FlaxEditor\\Windows\\x64\\Development\\Platform\\Platform.Bindings.Gen.cs",
- "line": 700,
- "endLine": 700,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 102185,
- "currentLine": -657814309,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027NetworkSocketState\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Engine\\InputAxis.cs",
- "line": 10,
- "endLine": 10,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": 1278254139,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Engine\\InputAxis.cs",
- "line": 69,
- "endLine": 69,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027InputAxis\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 336,
- "endLine": 336,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917253816,
- "currentLine": 47033525,
- "nextLine": 917122750,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
- "line": 806,
- "endLine": 806,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1574892352,
- "currentLine": 593227761,
- "nextLine": 5607,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027comment\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
- "line": 119,
- "endLine": 119,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1365377842,
- "nextLine": 609264753,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027cam\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3149",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\SkeletonMaskWindow.cs",
- "line": 171,
- "endLine": 171,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1606944,
- "currentLine": 1039555715,
- "nextLine": -684417925,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\SkeletonMaskWindow.cs",
- "line": 177,
- "endLine": 177,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Dereferencing the result of \u0027as\u0027 operator inside method can lead to NullReferenceException. Consider inspecting 1st argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\vorbis.cs",
- "line": 319,
- "endLine": 319,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1398780498,
- "nextLine": 1810511480,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\vorbis.cs",
- "line": 395,
- "endLine": 395,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\NativeCpp\\Builder.NativeCpp.cs",
- "line": 128,
- "endLine": 128,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1680745514,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027Types\u0027 enum: Custom.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\KeyframesPropertyTrack.cs",
- "line": 211,
- "endLine": 211,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": -1065348209,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
- "line": 220,
- "endLine": 220,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -991102859,
- "currentLine": -1890149653,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027enableReflectionScan \u0026\u0026 enableReflection\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3107",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\MainEditorGizmoViewport.cs",
- "line": 547,
- "endLine": 547,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1379169572,
- "currentLine": -1236601848,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Identical expression \u0027trans.Orientation\u0027 to the left and to the right of compound assignment.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
- "line": 235,
- "endLine": 235,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -1469447537,
- "nextLine": -325646387,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027enableReflection || enableStackTrace\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.cs",
- "line": 165,
- "endLine": 165,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 661171719,
- "currentLine": 78685322,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027concurrency \u003d\u003d 1 || headerFiles.Count \u003c 2 * concurrency\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 652,
- "endLine": 652,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1750909514,
- "currentLine": 10823529,
- "nextLine": -1103469594,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 550,
- "endLine": 550,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 950843304,
- "currentLine": 10823529,
- "nextLine": 2038381358,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Constants.cs",
- "line": 147,
- "endLine": 147,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1648452085,
- "currentLine": 857321307,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\UIEditorGizmo.cs",
- "line": 72,
- "endLine": 72,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -886791132,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: Get\u003cTransformGizmo\u003e().",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\ContentDatabaseModule.cs",
- "line": 874,
- "endLine": 874,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1065558299,
- "currentLine": 638770021,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027proxy\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3127",
- "cwe": 682,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Float2.cs",
- "line": 1150,
- "endLine": 1150,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 69909699,
- "currentLine": 69926081,
- "nextLine": 69893321,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Float2.cs",
- "line": 1151,
- "endLine": 1151,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two similar code fragments were found. Perhaps, this is a typo and \u0027x\u0027 variable should be used instead of \u0027y\u0027",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Track.cs",
- "line": 789,
- "endLine": 789,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 84360609,
- "currentLine": 699150524,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027_dragOverMode \u003d\u003d DragItemPositioning.None\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3203",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
- "line": 203,
- "endLine": 203,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1060214777,
- "currentLine": 1566275533,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Method parameter is not used: task.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\ParticleEmitterWindow.cs",
- "line": 189,
- "endLine": 189,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3042",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\SceneAnimationWindow.cs",
- "line": 768,
- "endLine": 768,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1566164569,
- "nextLine": 249095867,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\SceneAnimationWindow.cs",
- "line": 766,
- "endLine": 766,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible NullReferenceException. The \u0027?.\u0027 and \u0027.\u0027 operators are used for accessing members of the \u0027_timeline.Player\u0027 object",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3149",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\CameraNode.cs",
- "line": 42,
- "endLine": 42,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -449019765,
- "currentLine": -951197349,
- "nextLine": -1167085765,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\CameraNode.cs",
- "line": 40,
- "endLine": 40,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Dereferencing the result of \u0027as\u0027 operator can lead to NullReferenceException. Consider inspecting \u0027c\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
- "line": 396,
- "endLine": 396,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1067060564,
- "currentLine": -683992937,
- "nextLine": 2024458693,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027rerouteNode\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 244,
- "endLine": 244,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": -1616879417,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\AppleToolchain.cs",
- "line": 359,
- "endLine": 359,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 772883963,
- "currentLine": 23955995,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useResponseFile\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 178,
- "endLine": 178,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1879261150,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027base.OnMouseDoubleClick(location, button)\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\NavigationBar.cs",
- "line": 55,
- "endLine": 55,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1592926815,
- "currentLine": 1745567774,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027lastToolstripButton\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Proxy\\PrefabProxy.cs",
- "line": 83,
- "endLine": 83,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1265294171,
- "currentLine": -1964991594,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027prefab\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\History\\IHistoryAction.cs",
- "line": 8,
- "endLine": 8,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": -1305851679,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\History\\IHistoryAction.cs",
- "line": 18,
- "endLine": 18,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027IHistoryAction\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3171",
- "cwe": 839,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1655,
- "endLine": 1655,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5749057,
- "currentLine": 5757249,
- "nextLine": 5765441,
- "columns": 0
- }
- }
- ],
- "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Undo\\AddRemoveNodeAction.cs",
- "line": 67,
- "endLine": 67,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 71909,
- "currentLine": -1900546295,
- "nextLine": -1589389399,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Undo\\AddRemoveNodeAction.cs",
- "line": 69,
- "endLine": 69,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_nodeValues\u0027 object was used before it was verified against null. Check lines: 67, 69.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\NativeCpp\\Builder.NativeCpp.cs",
- "line": 506,
- "endLine": 506,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1844710205,
- "currentLine": 1728920059,
- "nextLine": -206239522,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027project\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
- "line": 224,
- "endLine": 224,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 46279265,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027enableReflection\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V010",
- "cwe": 0,
- "level": 0,
- "positions": [
- {
- "file": "",
- "line": 1,
- "endLine": 1,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 0,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Analysis of \u0027Makefile\u0027 type projects is not supported in this tool. Use direct analyzer integration or compiler monitoring instead.",
- "projects": [
- "Flax"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\VisualScriptDebuggerWindow.cs",
- "line": 213,
- "endLine": 213,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -132410839,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3039",
- "cwe": 39,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
- "line": 551,
- "endLine": 551,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1086445951,
- "currentLine": -1477365294,
- "nextLine": -1343412697,
- "columns": 0
- }
- }
- ],
- "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\IntegerEditor.cs",
- "line": 53,
- "endLine": 53,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 12562153,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027_element \u003d\u003d null\u0027 is always true.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingFrustum.cs",
- "line": 391,
- "endLine": 391,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 23393097,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027PlaneIntersectionType\u0027 enum: Front.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 1186,
- "endLine": 1186,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -482191901,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3149",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 193,
- "endLine": 193,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -304032143,
- "currentLine": -282995201,
- "nextLine": -151532762,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\States\\EditorStateMachine.cs",
- "line": 21,
- "endLine": 21,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Dereferencing the result of \u0027as\u0027 operator can lead to NullReferenceException. Consider inspecting \u0027state\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
- "line": 59,
- "endLine": 59,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 10823529,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\TagEditor.cs",
- "line": 194,
- "endLine": 194,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 17181089,
- "currentLine": 1398977744,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027parentNode\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\MaterialPreview.cs",
- "line": 353,
- "endLine": 353,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -569467602,
- "currentLine": -153681094,
- "nextLine": -2125177745,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027spriteModuleNode\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3120",
- "cwe": 835,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
- "line": 108,
- "endLine": 108,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 3842573,
- "currentLine": 2753421,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Potentially infinite loop. The \u0027_window\u0027 variable from the loop exit condition does not change its value between iterations.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 84,
- "endLine": 84,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1354727761,
- "currentLine": -345958553,
- "nextLine": 2044871539,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3097",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\Foliage\\Undo\\DeleteInstanceAction.cs",
- "line": 13,
- "endLine": 13,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 795687,
- "currentLine": 1946621399,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Tools\\Foliage\\Undo\\DeleteInstanceAction.cs",
- "line": 22,
- "endLine": 22,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible exception: the \u0027DeleteInstanceAction\u0027 type marked by [Serializable] contains non-serializable members not marked by [NonSerialized].",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 912,
- "endLine": 912,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1319811754,
- "currentLine": 1394026345,
- "nextLine": 1552495049,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceContext.Serialization.cs",
- "line": 345,
- "endLine": 345,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1628139666,
- "currentLine": -948647543,
- "nextLine": -1987003935,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceContext.Serialization.cs",
- "line": 346,
- "endLine": 346,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\ModelPreview.cs",
- "line": 329,
- "endLine": 329,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1303271947,
- "currentLine": 1221769864,
- "nextLine": -1912373771,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027meshDatas\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 731,
- "endLine": 731,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -981169433,
- "currentLine": 210492930,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 758,
- "endLine": 758,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of \u0027node.GetBox(4 + i)\u0027 method return value at \u0027end.IsOutput\u0027 when it is passed to method as its 1st argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 731,
- "endLine": 731,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -981169433,
- "currentLine": 210492930,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\AssetPreview.cs",
- "line": 237,
- "endLine": 237,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1575956,
- "currentLine": 115036043,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: base.HasLoadedAssets.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
- "line": 362,
- "endLine": 362,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 477270135,
- "nextLine": -1736391306,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\RenderOutputControl.cs",
- "line": 82,
- "endLine": 82,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside property at \u0027value.Value\u0027. Consider inspecting: new Int2?().",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\BinaryAssetItem.cs",
- "line": 48,
- "endLine": 48,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 276427834,
- "currentLine": 1495628977,
- "nextLine": 327019768,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
- "line": 89,
- "endLine": 89,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1646071808,
- "currentLine": 1678753311,
- "nextLine": 1920698375,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
- "line": 103,
- "endLine": 103,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 561,
- "endLine": 561,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1958992846,
- "currentLine": 10823529,
- "nextLine": 2080773193,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\VertexPainting.cs",
- "line": 421,
- "endLine": 421,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1601147684,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: !_meshDatasCancel.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
- "line": 559,
- "endLine": 559,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1018299951,
- "currentLine": -1198893419,
- "nextLine": 352987,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027result !\u003d DragDropEffect.None\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3171",
- "cwe": 839,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1656,
- "endLine": 1656,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5757249,
- "currentLine": 5765441,
- "nextLine": 5626177,
- "columns": 0
- }
- }
- ],
- "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\UIEditorGizmo.cs",
- "line": 455,
- "endLine": 455,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1933356753,
- "currentLine": 1145903921,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: !_mouseMovesControl.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 2262,
- "endLine": 2262,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1540260113,
- "currentLine": 131545325,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.cs",
- "line": 696,
- "endLine": 696,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027control.IsSelected\u0027. Consider inspecting the 1st argument: node.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
- "line": 570,
- "endLine": 570,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -587693723,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\AudioTrack.cs",
- "line": 472,
- "endLine": 472,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5607,
- "currentLine": 39528297,
- "nextLine": -1065348209,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Platform.cs",
- "line": 316,
- "endLine": 316,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -297538142,
- "currentLine": 1670881306,
- "nextLine": -1269075105,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Platform.cs",
- "line": 317,
- "endLine": 317,
- "column": 1,
- "endColumn": 1
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Platform.cs",
- "line": 319,
- "endLine": 319,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\NestedAnimationTrack.cs",
- "line": 177,
- "endLine": 177,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 113979,
- "nextLine": -82623097,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
- "line": 136,
- "endLine": 136,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside property at \u0027value.ID\u0027. Consider inspecting: null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\DebugLogWindow.cs",
- "line": 264,
- "endLine": 264,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1937636774,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027base.OnMouseUp(location, button)\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\BinaryAssetItem.cs",
- "line": 92,
- "endLine": 92,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1407233559,
- "nextLine": -729796814,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 205,
- "endLine": 205,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -802113753,
- "currentLine": 850157427,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\MaterialPreview.cs",
- "line": 87,
- "endLine": 87,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -117930517,
- "currentLine": -1983483522,
- "nextLine": -326728491,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
- "line": 136,
- "endLine": 136,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside property at \u0027value.ID\u0027. Consider inspecting: null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 1200,
- "endLine": 1200,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -482191901,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 541,
- "endLine": 541,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -945407821,
- "currentLine": 10823529,
- "nextLine": 817049312,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3171",
- "cwe": 839,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1654,
- "endLine": 1654,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 45620,
- "currentLine": 5749057,
- "nextLine": 5757249,
- "columns": 0
- }
- }
- ],
- "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\MaterialPreview.cs",
- "line": 343,
- "endLine": 343,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 241683675,
- "currentLine": -271159745,
- "nextLine": -1900181717,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027srcAsset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 134,
- "endLine": 134,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 341518184,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ModelPrefabEditor.cs",
- "line": 69,
- "endLine": 69,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5607,
- "currentLine": -1644576124,
- "nextLine": 2896105,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027prefab\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ModelPrefabEditor.cs",
- "line": 43,
- "endLine": 43,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 549198917,
- "currentLine": 1398253532,
- "nextLine": 937466013,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027prefab\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ActorTrack.cs",
- "line": 158,
- "endLine": 158,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 681367489,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProjectGenerator.cs",
- "line": 167,
- "endLine": 167,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 52,
- "endLine": 52,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 341518184,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
- "line": 223,
- "endLine": 223,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2065136559,
- "currentLine": 1871790118,
- "nextLine": -329606304,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027node\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3203",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Panels\\ScrollBar.cs",
- "line": 255,
- "endLine": 255,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 830098888,
- "currentLine": 1063502971,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Method parameter is not used: max.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
- "line": 231,
- "endLine": 231,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 12257,
- "nextLine": 22343,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: a \u003d\u003d b. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\IntValueBox.cs",
- "line": 103,
- "endLine": 103,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -659238342,
- "nextLine": -1872144505,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Min \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3086",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\CollisionsHelper.cs",
- "line": 596,
- "endLine": 596,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 86090946,
- "currentLine": 28973,
- "nextLine": 252169,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\CollisionsHelper.cs",
- "line": 582,
- "endLine": 582,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Variables dets, dett are initialized through the evaluation of the same expression. It\u0027s probably an error or un-optimized code.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 764,
- "endLine": 764,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 809476614,
- "currentLine": -230847274,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: keyframe.TangentIn.Translation.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Modes\\EditorGizmoMode.cs",
- "line": 16,
- "endLine": 16,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": 710495647,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Modes\\EditorGizmoMode.cs",
- "line": 47,
- "endLine": 47,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027EditorGizmoMode\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3025",
- "cwe": 685,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 3117,
- "endLine": 3117,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -768460759,
- "currentLine": -1251748987,
- "nextLine": -253666044,
- "columns": 0
- }
- }
- ],
- "message": "Incorrect format. A different number of format items is expected while calling \u0027AppendFormat\u0027 function. Arguments not used: fullName.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3025",
- "cwe": 685,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Utilities\\Utilities.cs",
- "line": 714,
- "endLine": 714,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1029047321,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Incorrect format. A different number of format items is expected while calling \u0027Format\u0027 function. Arguments not used: path.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Cache\\Intermediate\\FlaxEditor\\Windows\\x64\\Development\\Graphics\\Graphics.Bindings.Gen.cs",
- "line": 211,
- "endLine": 211,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 102185,
- "currentLine": 382158780,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027MSAALevel\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Import\\TextureImportEntry.cs",
- "line": 18,
- "endLine": 18,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1046587151,
- "currentLine": 764165609,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027CustomMaxSizes\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3203",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Plugins\\NetworkingPlugin.cs",
- "line": 552,
- "endLine": 552,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 808273516,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Method parameters are not used: buildData, buildOptions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3056",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\OutputBox.cs",
- "line": 145,
- "endLine": 145,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1436553138,
- "currentLine": 715916849,
- "nextLine": 1432809015,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\OutputBox.cs",
- "line": 144,
- "endLine": 144,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Consider reviewing the correctness of \u0027control1\u0027 item\u0027s usage.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
- "line": 113,
- "endLine": 113,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 43838773,
- "nextLine": 1228134307,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
- "line": 137,
- "endLine": 137,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_model\u0027 object was used before it was verified against null. Check lines: 113, 137.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
- "line": 532,
- "endLine": 532,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2135264825,
- "currentLine": -1198893419,
- "nextLine": 352987,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027result !\u003d DragDropEffect.None\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3105",
- "cwe": 690,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\ContextMenu\\VisjectCM.cs",
- "line": 720,
- "endLine": 720,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -153208074,
- "currentLine": -1962351054,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The \u0027parameters\u0027 variable was used after it was assigned through null-conditional operator. NullReferenceException is possible.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3072",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\JsonAssetWindow.cs",
- "line": 20,
- "endLine": 20,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1559036708,
- "currentLine": 87338991,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\JsonAssetWindow.cs",
- "line": 73,
- "endLine": 73,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027JsonAssetWindow\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: _undo.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3196",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
- "line": 636,
- "endLine": 636,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 4738,
- "currentLine": -531989313,
- "nextLine": 1113546383,
- "columns": 0
- }
- }
- ],
- "message": "The \u0027index\u0027 parameter is not utilized inside the method body, but an identifier with a similar name is used inside the same method.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.Contents.cs",
- "line": 495,
- "endLine": 495,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 10823529,
- "nextLine": -1201432042,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3130",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\GenericEditor.cs",
- "line": 356,
- "endLine": 356,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -836308064,
- "nextLine": 5607,
- "columns": 0
- }
- }
- ],
- "message": "Priority of the \u0027\u0026\u0026\u0027 operator is higher than that of the \u0027||\u0027 operator. Possible missing parentheses.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 1970,
- "endLine": 1970,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -914723996,
- "currentLine": -2068070354,
- "nextLine": -857331011,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetChildMenu(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\GUI\\PropertyNameLabel.cs",
- "line": 128,
- "endLine": 128,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1018145523,
- "currentLine": 39528297,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3105",
- "cwe": 690,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\MaterialInstanceWindow.cs",
- "line": 83,
- "endLine": 83,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1329709269,
- "nextLine": -1932899431,
- "columns": 0
- }
- }
- ],
- "message": "The \u0027asset\u0027 variable was used after it was assigned through null-conditional operator. NullReferenceException is possible.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\AssetEditorWindow.cs",
- "line": 241,
- "endLine": 241,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
- "line": 281,
- "endLine": 281,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 513015315,
- "currentLine": 777233000,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetProxy(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3152",
- "cwe": 369,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Network.cs",
- "line": 150,
- "endLine": 150,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -309189763,
- "currentLine": -1430248771,
- "nextLine": -1014941719,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Network.cs",
- "line": 139,
- "endLine": 139,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Potential division by zero. The variable was compared with a range of values which includes zero before it was used as a divisor. Check lines: 150, 139.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceComment.cs",
- "line": 413,
- "endLine": 413,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 1553034043,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
- "line": 504,
- "endLine": 504,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 1147,
- "endLine": 1147,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 212704437,
- "currentLine": 265143054,
- "nextLine": -1858752701,
- "columns": 0
- }
- }
- ],
- "message": "The \u0027functionNode._signature.Parameters\u0027 object was used before it was verified against null. Check lines: 1147, 1147.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 83,
- "endLine": 83,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1606151089,
- "currentLine": -1354727761,
- "nextLine": -345958553,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
- "line": 994,
- "endLine": 994,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 729209,
- "nextLine": 176405,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: modulo \u003d\u003d 0d. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Undo\\Undo.cs",
- "line": 81,
- "endLine": 81,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": 1903579551,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: PeekReverse().",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Plugins\\NetworkingPlugin.cs",
- "line": 201,
- "endLine": 201,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1097603240,
- "currentLine": 791895499,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Plugins\\NetworkingPlugin.cs",
- "line": 169,
- "endLine": 169,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027functions\u0027 object was used after it was verified against null. Check lines: 201, 169.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 651,
- "endLine": 651,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -181350934,
- "currentLine": 1203842468,
- "nextLine": 7681346,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 682,
- "endLine": 682,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027functionInfo.Glue.CustomParameters\u0027 object was used before it was verified against null. Check lines: 651, 682.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.cs",
- "line": 263,
- "endLine": 263,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 493009245,
- "currentLine": 1479913,
- "nextLine": 17733,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027token \u003d\u003d null\u0027 is always false.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
- "line": 560,
- "endLine": 560,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -1642874294,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Search\\SearchItem.cs",
- "line": 192,
- "endLine": 192,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1187127343,
- "currentLine": 10823529,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\EngineTarget.cs",
- "line": 213,
- "endLine": 213,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1925438540,
- "currentLine": 243351986,
- "nextLine": -495516684,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\EngineTarget.cs",
- "line": 218,
- "endLine": 218,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027buildOptions.Toolchain\u0027 object was used before it was verified against null. Check lines: 213, 218.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\BehaviorKnowledgeSelectorEditor.cs",
- "line": 140,
- "endLine": 140,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 973826699,
- "currentLine": 1441633809,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027goalTypeNode\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 373,
- "endLine": 373,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1598514311,
- "currentLine": -399833558,
- "nextLine": 1993854390,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027selected\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
- "line": 183,
- "endLine": 183,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1497665152,
- "currentLine": 9913435,
- "nextLine": -1989635608,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027cam\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 657,
- "endLine": 657,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -794166515,
- "currentLine": 10823529,
- "nextLine": -179812276,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditGameWindow.cs",
- "line": 226,
- "endLine": 226,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1581938311,
- "currentLine": 1692381612,
- "nextLine": -1527748050,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027node\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 1066,
- "endLine": 1066,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -482191901,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
- "line": 172,
- "endLine": 172,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1466494548,
- "currentLine": 17261119,
- "nextLine": -610545991,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027floor\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 616,
- "endLine": 616,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 709828875,
- "currentLine": 10823529,
- "nextLine": 862973185,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Scripting\\ScriptType.cs",
- "line": 419,
- "endLine": 419,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 551838811,
- "currentLine": -1201170282,
- "nextLine": 551838299,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: asFloat \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\BinaryAssetItem.cs",
- "line": 134,
- "endLine": 134,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 21931061,
- "nextLine": -200518841,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\InputBox.cs",
- "line": 1587,
- "endLine": 1587,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1543851188,
- "currentLine": 1620735083,
- "nextLine": -768147839,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
- "line": 249,
- "endLine": 249,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of \u0027TypeUtils.GetDefaultValue(type)\u0027 method return value at \u0027obj.GetType\u0027 when it is passed to method as its 1st argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 82,
- "endLine": 82,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 761440307,
- "currentLine": 1606151089,
- "nextLine": -1354727761,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
- "line": 567,
- "endLine": 567,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 516649421,
- "currentLine": 50015729,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027_middleMouseDown\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 366,
- "endLine": 366,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5607,
- "currentLine": 39528297,
- "nextLine": -2080988043,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Config\\GameSettings.cs",
- "line": 237,
- "endLine": 237,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 88071449,
- "currentLine": -1024348572,
- "nextLine": 352987,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
- "line": 761,
- "endLine": 761,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -995635475,
- "nextLine": -654660249,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: alpha \u003d\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3041",
- "cwe": 682,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Overall.cs",
- "line": 102,
- "endLine": 102,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -725110232,
- "currentLine": 1524047024,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The expression was implicitly cast from \u0027ulong\u0027 type to \u0027float\u0027 type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A \u003d (double)(X) / Y;.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 591,
- "endLine": 591,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 10823529,
- "nextLine": -1708102394,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\StaticModelNode.cs",
- "line": 57,
- "endLine": 57,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -859722645,
- "currentLine": 1474921,
- "nextLine": 17733,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027verts \u003d\u003d null\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3041",
- "cwe": 682,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Overall.cs",
- "line": 101,
- "endLine": 101,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 998336950,
- "currentLine": -725110232,
- "nextLine": 1524047024,
- "columns": 0
- }
- }
- ],
- "message": "The expression was implicitly cast from \u0027ulong\u0027 type to \u0027float\u0027 type. Consider utilizing an explicit type cast to avoid the loss of a fractional part. An example: double A \u003d (double)(X) / Y;.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 833,
- "endLine": 833,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 855192299,
- "currentLine": -2000912802,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027_combobox\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3030",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 538,
- "endLine": 538,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -328655413,
- "currentLine": -2013950032,
- "nextLine": 723747042,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 535,
- "endLine": 535,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Recurring check. The \u0027arrayApiType !\u003d null \u0026\u0026 arrayApiType.MarshalAs !\u003d null\u0027 condition was already verified in line 535.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProjectGenerator.cs",
- "line": 682,
- "endLine": 682,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2066758797,
- "currentLine": 171107081,
- "nextLine": -1462165522,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027!useResharperBuild\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 1147,
- "endLine": 1147,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 212704437,
- "currentLine": 265143054,
- "nextLine": -1858752701,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027functionNode._signature.Parameters\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Selection.cs",
- "line": 65,
- "endLine": 65,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 18744348,
- "currentLine": 76231288,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Selection.cs",
- "line": 136,
- "endLine": 136,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
- "line": 131,
- "endLine": 131,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 55870793,
- "currentLine": 10823529,
- "nextLine": 2091772829,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\NewtonsoftJson.cs",
- "line": 87,
- "endLine": 87,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 2923747,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027TargetPlatform\u0027 enum: Windows, Linux, Android, Mac.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 160,
- "endLine": 160,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 341518184,
- "nextLine": 1462175890,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 753,
- "endLine": 753,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 88117,
- "currentLine": -482191901,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 85,
- "endLine": 85,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -345958553,
- "currentLine": 2044871539,
- "nextLine": 2120718357,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3042",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\PrefabPreview.cs",
- "line": 79,
- "endLine": 79,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 31081123,
- "currentLine": 2105674638,
- "nextLine": 241892155,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\PrefabPreview.cs",
- "line": 78,
- "endLine": 78,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible NullReferenceException. The \u0027?.\u0027 and \u0027.\u0027 operators are used for accessing members of the \u0027_uiControlLinked.Control\u0027 object",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 201,
- "endLine": 201,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 578489577,
- "currentLine": 2133982696,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027settingsPanel\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 320,
- "endLine": 320,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 770301057,
- "currentLine": -193071702,
- "nextLine": 1873025885,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 326,
- "endLine": 326,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027typeInfo.GenericArgs\u0027 object was used before it was verified against null. Check lines: 320, 326.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 718,
- "endLine": 718,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 570118381,
- "currentLine": -1158029995,
- "nextLine": 176909,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: tangentIn.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 718,
- "endLine": 718,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 570118381,
- "currentLine": -1158029995,
- "nextLine": 176909,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: tangentOut.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Parsing.cs",
- "line": 254,
- "endLine": 254,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 365222239,
- "currentLine": -1752624088,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3057",
- "cwe": 628,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
- "line": 457,
- "endLine": 457,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 36080,
- "currentLine": -549169312,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanel.cs",
- "line": 635,
- "endLine": 635,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The 1st argument \u0027index\u0027 has a possibly negative value, but is expected to be non-negative inside method, in \u0027_tabs.RemoveAt(index)\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3086",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmo.cs",
- "line": 261,
- "endLine": 261,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 702463750,
- "currentLine": 880170182,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmo.cs",
- "line": 260,
- "endLine": 260,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Variables _selection.Capacity, _selectionParents.Capacity are initialized through the call to the same function. It\u0027s probably an error or un-optimized code.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorWindow.cs",
- "line": 199,
- "endLine": 199,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 569550457,
- "nextLine": 88117,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorWindow.cs",
- "line": 209,
- "endLine": 209,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027Root\u0027 object was used before it was verified against null. Check lines: 199, 209.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
- "line": 796,
- "endLine": 796,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -1616879417,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.cs",
- "line": 164,
- "endLine": 164,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -857294103,
- "currentLine": 661171719,
- "nextLine": 78685322,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.cs",
- "line": 163,
- "endLine": 163,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027concurrency\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 164, 163.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.cs",
- "line": 37,
- "endLine": 37,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 534,
- "endLine": 534,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 148820372,
- "currentLine": 10823529,
- "nextLine": -1629205590,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 178,
- "endLine": 178,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 341518184,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Proxy\\ModelProxy.cs",
- "line": 59,
- "endLine": 59,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -616306443,
- "currentLine": -2124448256,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027collisionDataProxy\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.Contents.cs",
- "line": 207,
- "endLine": 207,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1769094030,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027UseMode\u0027 enum: Off.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 838,
- "endLine": 838,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1648452085,
- "currentLine": -1998013372,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
- "line": 1289,
- "endLine": 1289,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1668948979,
- "nextLine": 5710891,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: value \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Animation.cs",
- "line": 359,
- "endLine": 359,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 183841,
- "currentLine": 907932904,
- "nextLine": 1413683,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027function\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Undo\\Undo.cs",
- "line": 76,
- "endLine": 76,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": 1950634399,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: PeekHistory().",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
- "line": 602,
- "endLine": 602,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -960642272,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
- "line": 610,
- "endLine": 610,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 215,
- "endLine": 215,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 120237815,
- "currentLine": 365083,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027DockState\u0027 enum: Unknown, Float, Hidden.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
- "line": 525,
- "endLine": 525,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -950259181,
- "nextLine": 17733,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027v\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 692,
- "endLine": 692,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -585249428,
- "currentLine": -810421351,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
- "line": 956,
- "endLine": 956,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1147875507,
- "currentLine": 10823529,
- "nextLine": -1496796900,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 327,
- "endLine": 327,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -184086016,
- "currentLine": -228972198,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: _anchorMin.X !\u003d _anchorMax.X. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 459,
- "endLine": 459,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1766757655,
- "currentLine": -228939432,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: _anchorMin.Y !\u003d _anchorMax.Y. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 200,
- "endLine": 200,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1928423521,
- "nextLine": 736268498,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
- "line": 1309,
- "endLine": 1309,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5710891,
- "currentLine": -1640001903,
- "nextLine": 11507755,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: value \u003d\u003d double.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\LocalizedStringTableWindow.cs",
- "line": 83,
- "endLine": 83,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 63545421,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\LocalizedStringTableWindow.cs",
- "line": 61,
- "endLine": 61,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_isRefreshing\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 83, 61.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 134,
- "endLine": 134,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 804049877,
- "currentLine": -1298447892,
- "nextLine": -1938424211,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027settingsPanel\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
- "line": 160,
- "endLine": 160,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 349661452,
- "currentLine": 1501555,
- "nextLine": -497407807,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027sky\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.ContextMenu.cs",
- "line": 365,
- "endLine": 365,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 39528297,
- "nextLine": 12248860,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Utilities\\WinAPI.cs",
- "line": 127,
- "endLine": 127,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 47763396,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027Modal\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\ogg.cs",
- "line": 171,
- "endLine": 171,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1229564923,
- "currentLine": 921564413,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\ogg.cs",
- "line": 184,
- "endLine": 184,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProjectGenerator.cs",
- "line": 186,
- "endLine": 186,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CurvePropertyTrack.cs",
- "line": 140,
- "endLine": 140,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5607,
- "currentLine": 39528297,
- "nextLine": -1065348209,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Packing.cs",
- "line": 124,
- "endLine": 124,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1806220712,
- "nextLine": -280515095,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 910,
- "endLine": 910,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2023746505,
- "currentLine": -958505552,
- "nextLine": -308074854,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: param.IsOut.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\TagEditor.cs",
- "line": 77,
- "endLine": 77,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1805399038,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\TagEditor.cs",
- "line": 436,
- "endLine": 436,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027values.Contains\u0027. Consider inspecting the 2nd argument: null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 122,
- "endLine": 122,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 341518184,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\Vector3Editor.cs",
- "line": 306,
- "endLine": 306,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -129380671,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\NestedSceneAnimationTrack.cs",
- "line": 136,
- "endLine": 136,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 113979,
- "nextLine": -82623097,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
- "line": 136,
- "endLine": 136,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside property at \u0027value.ID\u0027. Consider inspecting: null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3111",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Animations\\Curve.cs",
- "line": 511,
- "endLine": 511,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1693415997,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Checking value of \u0027Value\u0027 for null will always return false when generic type is instantiated with a value type.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Timeline.cs",
- "line": 1952,
- "endLine": 1952,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 39528297,
- "nextLine": 583430797,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
- "line": 783,
- "endLine": 783,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1685148725,
- "currentLine": 296247372,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditGameWindow.cs",
- "line": 190,
- "endLine": 190,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027actor.Transform\u0027. Consider inspecting the 1st argument: camera.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Downloader.cs",
- "line": 34,
- "endLine": 34,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1821042116,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027ProgressDisplay.CanUseConsole\u0027 is always false.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\CustomEditorsUtil.cs",
- "line": 121,
- "endLine": 121,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 495479285,
- "nextLine": -1306520469,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027targetTypeType\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 74,
- "endLine": 74,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 395643378,
- "nextLine": -1955931886,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 76,
- "endLine": 76,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1955931886,
- "currentLine": -1171952459,
- "nextLine": 1703961276,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\DoubleEditor.cs",
- "line": 41,
- "endLine": 41,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -1752236365,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 75,
- "endLine": 75,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 395643378,
- "currentLine": -1955931886,
- "nextLine": -1171952459,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\PhysX.cs",
- "line": 373,
- "endLine": 373,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 2923747,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027TargetPlatform\u0027 enum: UWP.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3156",
- "cwe": 628,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Constants.cs",
- "line": 248,
- "endLine": 248,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1370870601,
- "currentLine": 1201184428,
- "nextLine": -674564252,
- "columns": 0
- }
- }
- ],
- "message": "The first argument of the \u0027CreateInstance\u0027 method is not expected to be null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3140",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 140,
- "endLine": 140,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1758909173,
- "currentLine": 2008308374,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Property accessors use different backing fields.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
- "line": 1339,
- "endLine": 1339,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1641017583,
- "nextLine": 5710891,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: value \u003d\u003d double.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\AssetItem.cs",
- "line": 83,
- "endLine": 83,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1299948362,
- "currentLine": -506980510,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: typeNamespaces.Length !\u003d 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\PrefabWindow.Hierarchy.cs",
- "line": 329,
- "endLine": 329,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 341518184,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 57,
- "endLine": 57,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -611626063,
- "currentLine": -165540884,
- "nextLine": 1838316247,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 56,
- "endLine": 56,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027b\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 57, 56.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3148",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Timeline.Data.cs",
- "line": 162,
- "endLine": 162,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 735378707,
- "nextLine": 59739899,
- "columns": 0
- }
- }
- ],
- "message": "Casting potential \u0027null\u0027 value of \u0027_tracks[i].Tag\u0027 to a value type can lead to NullReferenceException.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 1521,
- "endLine": 1521,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5610543,
- "currentLine": 371137,
- "nextLine": 1393007,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027separator\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
- "line": 187,
- "endLine": 187,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 765916315,
- "currentLine": -1855944585,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027audioListener\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3202",
- "cwe": 561,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
- "line": 1051,
- "endLine": 1051,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1653609520,
- "nextLine": -1476040214,
- "columns": 0
- }
- }
- ],
- "message": "Unreachable code detected. The \u0027case\u0027 value \u0027TargetArchitecture.AnyCPU\u0027 is out of range of the match expression \u0027Architecture\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix3x3.cs",
- "line": 1091,
- "endLine": 1091,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 442745701,
- "currentLine": 392183861,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: Math.Abs(det) \u003d\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3140",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 120,
- "endLine": 120,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1758909173,
- "currentLine": -1143329758,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Property accessors use different backing fields.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 415,
- "endLine": 415,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917253816,
- "currentLine": 47033525,
- "nextLine": 917122750,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 484,
- "endLine": 484,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1928423521,
- "nextLine": 736268498,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 228,
- "endLine": 228,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -195352578,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonCustomSerializers\\ExtendedSerializationBinder.cs",
- "line": 200,
- "endLine": 200,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1968057933,
- "nextLine": -352437663,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027assemblyDelimiterIndex\u0027 is always not null. The operator \u0027??\u0027 is excessive.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
- "line": 565,
- "endLine": 565,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -1164210896,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3171",
- "cwe": 839,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1657,
- "endLine": 1657,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5765441,
- "currentLine": 5626177,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\CustomEditorsUtil.cs",
- "line": 102,
- "endLine": 102,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1782977694,
- "currentLine": 1977974109,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027checkType\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProject.cs",
- "line": 33,
- "endLine": 33,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1318808814,
- "currentLine": -1743171661,
- "nextLine": -1659549911,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProject.cs",
- "line": 34,
- "endLine": 34,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 437,
- "endLine": 437,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 492474833,
- "nextLine": -1745936841,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027functionNode._signature.Name\u0027 is always not null. The operator \u0027??\u0027 is excessive.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 1503,
- "endLine": 1503,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1663377667,
- "nextLine": -967068673,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027functionInfo.Parameters.Count !\u003d 0\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 606,
- "endLine": 606,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 436880779,
- "nextLine": -160722735,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
- "line": 122,
- "endLine": 122,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1601147684,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: !_meshDatasCancel.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 1077,
- "endLine": 1077,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -723493914,
- "currentLine": -522167326,
- "nextLine": 128610637,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027_output\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3111",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Animations\\Curve.cs",
- "line": 794,
- "endLine": 794,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1693415997,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Checking value of \u0027Value\u0027 for null will always return false when generic type is instantiated with a value type.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 201,
- "endLine": 201,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1928423521,
- "currentLine": 736268498,
- "nextLine": -2052846777,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\EditTrackAction.cs",
- "line": 37,
- "endLine": 37,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1559596790,
- "nextLine": -631706400,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\EditTrackAction.cs",
- "line": 45,
- "endLine": 45,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_timeline\u0027 object was used before it was verified against null. Check lines: 37, 45.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3053",
- "cwe": 0,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Utilities\\StringUtils.cs",
- "line": 147,
- "endLine": 147,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1370551408,
- "currentLine": 342638576,
- "nextLine": 85659065,
- "columns": 0
- }
- }
- ],
- "message": "An excessive expression. Examine the substrings \u0027\\\\\\\\\u0027 and \u0027\\\\\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 175,
- "endLine": 175,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 804049877,
- "currentLine": -1938424211,
- "nextLine": 45361529,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027settingsPanel\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3066",
- "cwe": 683,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Connecting.cs",
- "line": 213,
- "endLine": 213,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 321004459,
- "currentLine": 1422733554,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Possible incorrect order of arguments passed to \u0027CanUseDirectCastStatic\u0027 method: \u0027to\u0027 and \u0027from\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\BinaryAssetItem.cs",
- "line": 185,
- "endLine": 185,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 21931061,
- "nextLine": -200518841,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceNode.cs",
- "line": 979,
- "endLine": 979,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 13351001,
- "currentLine": -723230773,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceNode.cs",
- "line": 981,
- "endLine": 981,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027Surface\u0027 object was used before it was verified against null. Check lines: 979, 981.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SourceCodeEditing\\CodeEditingModule.cs",
- "line": 39,
- "endLine": 39,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 976826205,
- "currentLine": -1528170778,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Scripting\\TypeUtils.cs",
- "line": 395,
- "endLine": 395,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027type.BaseType\u0027. Consider inspecting the 1st argument: managedType.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\CollectionEditor.cs",
- "line": 338,
- "endLine": 338,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 1643,
- "endLine": 1643,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -109909640,
- "currentLine": 435035580,
- "nextLine": -249367255,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027impulseBox\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\DepsBuilder.cs",
- "line": 51,
- "endLine": 51,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1407453452,
- "currentLine": 1140927853,
- "nextLine": 1407453216,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027Platform.IsPlatformSupported(platform, TargetArchitecture.ARM)\u0027 is always false.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3156",
- "cwe": 628,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\ProjectInfo.cs",
- "line": 58,
- "endLine": 58,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 670425,
- "currentLine": 1451645841,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The first argument of the \u0027Add\u0027 method is not expected to be null. Potential null value: key.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 531,
- "endLine": 531,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 866780861,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027base.OnMouseDown(location, button)\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
- "line": 607,
- "endLine": 607,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -2026453746,
- "nextLine": -654660249,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: alpha \u003d\u003d 1d. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\KeyframesEditor.cs",
- "line": 444,
- "endLine": 444,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 10823529,
- "nextLine": 2093001723,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ScreenFadeTrack.cs",
- "line": 111,
- "endLine": 111,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1379687950,
- "currentLine": 39528297,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 1632,
- "endLine": 1632,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 953406156,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3013",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\GUI\\ContentView.cs",
- "line": 622,
- "endLine": 622,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1575956,
- "currentLine": -1880017052,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\GUI\\ContentView.cs",
- "line": 639,
- "endLine": 639,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "It is odd that the body of \u0027OnItemDeleted\u0027 function is fully equivalent to the body of \u0027OnItemDispose\u0027 function (622, line 639).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
- "line": 581,
- "endLine": 581,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\ClothPainting.cs",
- "line": 171,
- "endLine": 171,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 526957875,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Tools\\ClothPainting.cs",
- "line": 167,
- "endLine": 167,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_clothPaint\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 171, 167.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\UIntValueBox.cs",
- "line": 104,
- "endLine": 104,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1042995749,
- "currentLine": -848030463,
- "nextLine": 240213,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 133,
- "endLine": 133,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 263235661,
- "currentLine": 804049877,
- "nextLine": -1298447892,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027panel\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3149",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\ContentItem.cs",
- "line": 678,
- "endLine": 678,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2057880341,
- "currentLine": 1054095729,
- "nextLine": 1148180646,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\ContentItem.cs",
- "line": 677,
- "endLine": 677,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Dereferencing the result of \u0027as\u0027 operator can lead to NullReferenceException. Consider inspecting \u0027view\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\CustomEditor.cs",
- "line": 567,
- "endLine": 567,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 188594871,
- "currentLine": 742633,
- "nextLine": 11432169,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027text \u003d\u003d null\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
- "line": 711,
- "endLine": 711,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 385755756,
- "currentLine": 11982701,
- "nextLine": 2561913,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useSeparatePdb\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 485,
- "endLine": 485,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1928423521,
- "currentLine": 736268498,
- "nextLine": 280341319,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3164",
- "cwe": 544,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
- "line": 50,
- "endLine": 50,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1522224669,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Exception classes should be publicly accessible.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\LayoutElementsContainer.cs",
- "line": 90,
- "endLine": 90,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2051990601,
- "currentLine": 39528297,
- "nextLine": 30041699,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3107",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\MainEditorGizmoViewport.cs",
- "line": 466,
- "endLine": 466,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1236601848,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Identical expression \u0027trans.Orientation\u0027 to the left and to the right of compound assignment.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Double3.cs",
- "line": 1068,
- "endLine": 1068,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1269595245,
- "currentLine": -707124304,
- "nextLine": 353151,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: distanceSq \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ActorEditor.cs",
- "line": 421,
- "endLine": 421,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1144615958,
- "currentLine": 1249357355,
- "nextLine": -804782807,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027restored\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 726,
- "endLine": 726,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1661559441,
- "nextLine": -1916998495,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 778,
- "endLine": 778,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1648452085,
- "currentLine": 1518035767,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
- "line": 965,
- "endLine": 965,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 772883963,
- "currentLine": 23955995,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useResponseFile\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 174,
- "endLine": 174,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 263235661,
- "currentLine": 804049877,
- "nextLine": -1938424211,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027panel\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3140",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 130,
- "endLine": 130,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1758909173,
- "currentLine": -1359574238,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Property accessors use different backing fields.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
- "line": 598,
- "endLine": 598,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1100788788,
- "nextLine": -654660249,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: alpha \u003d\u003d 0d. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 66,
- "endLine": 66,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 925697897,
- "currentLine": -1558843815,
- "nextLine": 128753,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027_assetPicker\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\XCode.cs",
- "line": 42,
- "endLine": 42,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Search\\SearchItem.cs",
- "line": 169,
- "endLine": 169,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 915311765,
- "currentLine": 10823529,
- "nextLine": -1293890430,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingSphere.cs",
- "line": 495,
- "endLine": 495,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -970503635,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: Radius \u003d\u003d value.Radius. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 356,
- "endLine": 356,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917253816,
- "currentLine": 47033525,
- "nextLine": 917122750,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 72,
- "endLine": 72,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2251402,
- "currentLine": 1523929501,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3039",
- "cwe": 39,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
- "line": 550,
- "endLine": 550,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1822310347,
- "currentLine": 1086445951,
- "nextLine": -1477365294,
- "columns": 0
- }
- }
- ],
- "message": "Consider inspecting the \u0027ReadAllText\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3149",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 871,
- "endLine": 871,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -304032143,
- "currentLine": -927344800,
- "nextLine": -151532762,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\States\\EditorStateMachine.cs",
- "line": 21,
- "endLine": 21,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Dereferencing the result of \u0027as\u0027 operator can lead to NullReferenceException. Consider inspecting \u0027state\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 810,
- "endLine": 810,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 564361869,
- "currentLine": 446008417,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 791,
- "endLine": 791,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027Surface\u0027 object was used after it was verified against null. Check lines: 810, 791.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
- "line": 642,
- "endLine": 642,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 269156361,
- "currentLine": 178988905,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\VisualScriptItem.cs",
- "line": 250,
- "endLine": 250,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": -1303790518,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\Items\\VisualScriptItem.cs",
- "line": 316,
- "endLine": 316,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027VisualScriptType\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3039",
- "cwe": 39,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
- "line": 549,
- "endLine": 549,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1822310347,
- "nextLine": 1086445951,
- "columns": 0
- }
- }
- ],
- "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3068",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\KeyframesEditor.cs",
- "line": 724,
- "endLine": 724,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 16507361,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Calling overrideable class member \u0027UpdateKeyframes\u0027 from constructor is dangerous.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudioCode\\VisualStudioCodeProjectGenerator.cs",
- "line": 220,
- "endLine": 220,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1366209773,
- "nextLine": 574082057,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudioCode\\VisualStudioCodeProjectGenerator.cs",
- "line": 249,
- "endLine": 249,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 309,
- "endLine": 309,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 10971609,
- "currentLine": 47033781,
- "nextLine": 917384890,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\JsonAssetWindow.cs",
- "line": 283,
- "endLine": 283,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1226623640,
- "currentLine": -39245975,
- "nextLine": -964178879,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 352,
- "endLine": 352,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 10971609,
- "currentLine": 47033781,
- "nextLine": 917384890,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3030",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\UIEditorGizmo.cs",
- "line": 455,
- "endLine": 455,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1933356753,
- "currentLine": 1145903921,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\UIEditorGizmo.cs",
- "line": 451,
- "endLine": 451,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Recurring check. The \u0027!_mouseMovesControl\u0027 condition was already verified in line 451.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
- "line": 351,
- "endLine": 351,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": 1203811881,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
- "line": 500,
- "endLine": 500,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027CameraCutThumbnailRenderer\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
- "line": 600,
- "endLine": 600,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 157486043,
- "currentLine": 39528297,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3029",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 261,
- "endLine": 261,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 790041313,
- "currentLine": -835424742,
- "nextLine": 88269261,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 265,
- "endLine": 265,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The conditional expressions of the \u0027if\u0027 statements situated alongside each other are identical. Check lines: 261, 265.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 2190,
- "endLine": 2190,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1397750670,
- "currentLine": 243702634,
- "nextLine": 1496862126,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027buildData.Target\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3053",
- "cwe": 0,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Import\\TextureImportEntry.cs",
- "line": 157,
- "endLine": 157,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1428602097,
- "currentLine": 178575189,
- "nextLine": 357150269,
- "columns": 0
- }
- }
- ],
- "message": "An excessive expression. Examine the substrings \u0027diffuse\u0027 and \u0027diff\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
- "line": 185,
- "endLine": 185,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 176909,
- "currentLine": -447451525,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetProxy(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
- "line": 843,
- "endLine": 843,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1143881272,
- "currentLine": -604565202,
- "nextLine": 2739481,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027prevNode\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
- "line": 1291,
- "endLine": 1291,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5710891,
- "currentLine": -1669194355,
- "nextLine": 11507755,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: value \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingFrustum.cs",
- "line": 508,
- "endLine": 508,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 23393097,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027PlaneIntersectionType\u0027 enum: Front.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
- "line": 842,
- "endLine": 842,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1606483777,
- "currentLine": 1143881272,
- "nextLine": -604565202,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027decorator\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Search\\ContentFinder.cs",
- "line": 224,
- "endLine": 224,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -93992793,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _selectedItem \u003d\u003d null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
- "line": 1064,
- "endLine": 1064,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 182363,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027AlphaBlendMode\u0027 enum: Linear.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\Terrain\\EditTab.cs",
- "line": 344,
- "endLine": 344,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 168429147,
- "nextLine": 381865773,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
- "line": 136,
- "endLine": 136,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside property at \u0027value.ID\u0027. Consider inspecting: null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 691,
- "endLine": 691,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 7686011,
- "currentLine": 39528297,
- "nextLine": 1088437068,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 1171,
- "endLine": 1171,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -482191901,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\CSProjectGenerator.cs",
- "line": 118,
- "endLine": 118,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -996537579,
- "currentLine": -1212021550,
- "nextLine": 1888515591,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027defaultConfiguration \u003d\u003d TargetConfiguration.Debug\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 783,
- "endLine": 783,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 809476614,
- "currentLine": -985997806,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
- "line": 166,
- "endLine": 166,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1427277804,
- "currentLine": -1146641289,
- "nextLine": 1438308755,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027skyLight\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3203",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
- "line": 418,
- "endLine": 418,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 482073176,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Method parameter is not used: options.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 392,
- "endLine": 392,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 10971609,
- "currentLine": 47033781,
- "nextLine": 917384890,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Proxy\\ContentProxy.cs",
- "line": 14,
- "endLine": 14,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": -984925133,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\Proxy\\ContentProxy.cs",
- "line": 133,
- "endLine": 133,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027ContentProxy\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\ULongValueBox.cs",
- "line": 92,
- "endLine": 92,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2103144105,
- "currentLine": 1277656863,
- "nextLine": 174178098,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\VisualScriptDebuggerWindow.cs",
- "line": 280,
- "endLine": 280,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": 780372472,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathd.cs",
- "line": 201,
- "endLine": 201,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 12257,
- "nextLine": 22339,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: a \u003d\u003d b. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3072",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
- "line": 31,
- "endLine": 31,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1465749763,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
- "line": 37,
- "endLine": 37,
- "column": 1,
- "endColumn": 1
- },
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
- "line": 39,
- "endLine": 39,
- "column": 1,
- "endColumn": 1
- },
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
- "line": 40,
- "endLine": 40,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027SerializerCache\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: JsonWriter, MemoryStream, Reader.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Parsing.cs",
- "line": 253,
- "endLine": 253,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -416984432,
- "currentLine": 365222239,
- "nextLine": -1752624088,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3149",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 203,
- "endLine": 203,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1332457099,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 31,
- "endLine": 31,
- "column": 1,
- "endColumn": 1
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 201,
- "endLine": 201,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Dereferencing the result of \u0027as\u0027 operator inside method can lead to NullReferenceException. Consider inspecting 1st argument: floatingPanelToMove.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\NvCloth.cs",
- "line": 64,
- "endLine": 64,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 2923747,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027TargetPlatform\u0027 enum: UWP.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\AnimationTimeline.cs",
- "line": 133,
- "endLine": 133,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 42453709,
- "currentLine": 3748497,
- "nextLine": 12359529,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\AnimationTimeline.cs",
- "line": 134,
- "endLine": 134,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_preview\u0027 object was used before it was verified against null. Check lines: 133, 134.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
- "line": 112,
- "endLine": 112,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1379507481,
- "currentLine": 679093,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027isValid\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 737,
- "endLine": 737,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1336455718,
- "currentLine": -621594802,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: keyframe.TangentIn.Translation.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 578,
- "endLine": 578,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -815184543,
- "currentLine": 10823529,
- "nextLine": -1997867322,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 538,
- "endLine": 538,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 76,
- "currentLine": -1122324043,
- "nextLine": 30638,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: _shear.X \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 332,
- "endLine": 332,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 10971609,
- "currentLine": 47033781,
- "nextLine": 917384890,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ToolboxWindow.cs",
- "line": 221,
- "endLine": 221,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1357389608,
- "nextLine": 747625,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetChild\u003cPanel\u003e().",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 1152,
- "endLine": 1152,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1964492651,
- "currentLine": 23965673,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useSeparateImpl\u0027 is always false.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3127",
- "cwe": 682,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Float4.cs",
- "line": 1003,
- "endLine": 1003,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 69893321,
- "currentLine": 69909711,
- "nextLine": 69942487,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Float4.cs",
- "line": 1004,
- "endLine": 1004,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two similar code fragments were found. Perhaps, this is a typo and \u0027y\u0027 variable should be used instead of \u0027z\u0027",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3083",
- "cwe": 367,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\ComboBox.cs",
- "line": 495,
- "endLine": 495,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 98761577,
- "currentLine": 727380077,
- "nextLine": 506307384,
- "columns": 0
- }
- }
- ],
- "message": "Unsafe invocation of event \u0027PopupCreate\u0027, NullReferenceException is possible. Consider assigning event to a local variable before invoking it.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
- "line": 704,
- "endLine": 704,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1711997833,
- "currentLine": 178988905,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 1903,
- "endLine": 1903,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5607,
- "currentLine": 39528297,
- "nextLine": -2080988043,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\OutputLogWindow.cs",
- "line": 244,
- "endLine": 244,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\KeyframesEditor.cs",
- "line": 432,
- "endLine": 432,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1557903299,
- "currentLine": 10823529,
- "nextLine": 1850767881,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3110",
- "cwe": 674,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\SceneGraphNode.cs",
- "line": 69,
- "endLine": 69,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": -1672575161,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible infinite recursion inside \u0027Root\u0027 property.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 411,
- "endLine": 411,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 10971609,
- "currentLine": 47033781,
- "nextLine": 917384890,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\ModelPreview.cs",
- "line": 295,
- "endLine": 295,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1303271947,
- "currentLine": 1221769864,
- "nextLine": -1912373771,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027meshDatas\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3130",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Special\\RadialMenu.cs",
- "line": 277,
- "endLine": 277,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1628710754,
- "currentLine": 1948501713,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Priority of the \u0027\u0026\u0026\u0027 operator is higher than that of the \u0027||\u0027 operator. Possible missing parentheses.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ScriptTrack.cs",
- "line": 82,
- "endLine": 82,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 197318112,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceNode.cs",
- "line": 242,
- "endLine": 242,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -502484352,
- "currentLine": 5835243,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027NodeElementType\u0027 enum: Invalid, RotationValue.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 974,
- "endLine": 974,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 375071993,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\LocalSceneGraph.cs",
- "line": 12,
- "endLine": 12,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": -1238757812,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\LocalSceneGraph.cs",
- "line": 75,
- "endLine": 75,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027LocalSceneGraph\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\IntValueBox.cs",
- "line": 115,
- "endLine": 115,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -659238342,
- "currentLine": -1872144505,
- "nextLine": 174178098,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\Vector3Editor.cs",
- "line": 104,
- "endLine": 104,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -129380671,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Editor.cs",
- "line": 474,
- "endLine": 474,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 2244993,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
- "line": 433,
- "endLine": 433,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 976826205,
- "currentLine": -1528170778,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Scripting\\TypeUtils.cs",
- "line": 395,
- "endLine": 395,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027type.BaseType\u0027. Consider inspecting the 1st argument: managedType.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3039",
- "cwe": 39,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudioCode\\VisualStudioCodeInstance.cs",
- "line": 62,
- "endLine": 62,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 673572251,
- "currentLine": 97066987,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Config\\GameSettings.cs",
- "line": 378,
- "endLine": 378,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 724967055,
- "currentLine": -690222631,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027gameSettingsAsset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3056",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Quaternion.cs",
- "line": 1480,
- "endLine": 1480,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1934659121,
- "currentLine": -844137002,
- "nextLine": 711843,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Quaternion.cs",
- "line": 1481,
- "endLine": 1481,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Consider reviewing the correctness of \u0027q2\u0027 item\u0027s usage.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
- "line": 611,
- "endLine": 611,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 351157817,
- "currentLine": 1823992940,
- "nextLine": -1307562784,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027node\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
- "line": 718,
- "endLine": 718,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 702470641,
- "currentLine": 39528297,
- "nextLine": 988165128,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3097",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\MemberComparison.cs",
- "line": 14,
- "endLine": 14,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2071185932,
- "currentLine": -610243914,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Utilities\\MemberComparison.cs",
- "line": 19,
- "endLine": 19,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible exception: the \u0027MemberComparison\u0027 type marked by [Serializable] contains non-serializable members not marked by [NonSerialized].",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 963,
- "endLine": 963,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 887313387,
- "currentLine": -482191901,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3072",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 20,
- "endLine": 20,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1607007810,
- "currentLine": -1757088885,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 26,
- "endLine": 26,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027EditorOptionsWindow\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: _undo.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
- "line": 598,
- "endLine": 598,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 772883963,
- "currentLine": 23955995,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useResponseFile\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
- "line": 510,
- "endLine": 510,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 2923747,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027TargetPlatform\u0027 enum: PS4, PS5, iOS.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Cache\\Intermediate\\FlaxEditor\\Windows\\x64\\Development\\Graphics\\Graphics.Bindings.Gen.cs",
- "line": 1367,
- "endLine": 1367,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 102185,
- "currentLine": -1900850423,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027ProbeCubemapResolution\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
- "line": 480,
- "endLine": 480,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2056525725,
- "currentLine": -1678791597,
- "nextLine": 21299795,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027!string.IsNullOrEmpty(localRepoPath)\u0027 is always false.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3105",
- "cwe": 690,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
- "line": 78,
- "endLine": 78,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 671389989,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
- "line": 151,
- "endLine": 151,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The result of null-conditional operator is dereferenced inside the \u0027ShowDialog\u0027 method. NullReferenceException is possible. Inspect the first argument \u0027parentWindow?.Window\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Tags.cs",
- "line": 245,
- "endLine": 245,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1830805086,
- "nextLine": 730945,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 3166,
- "endLine": 3166,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1017315024,
- "currentLine": 1091083042,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027project\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3203",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Engine\\NativeInterop.Marshallers.cs",
- "line": 617,
- "endLine": 617,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1710695258,
- "currentLine": 1139822315,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Method parameter is not used: unmanaged.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
- "line": 845,
- "endLine": 845,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2739481,
- "currentLine": -20004525,
- "nextLine": -502898934,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027newNode\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
- "line": 237,
- "endLine": 237,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -325646387,
- "currentLine": 46270855,
- "nextLine": 1121432113,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027enableStackTrace\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
- "line": 470,
- "endLine": 470,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 772883963,
- "currentLine": 23955995,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useResponseFile\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 3061,
- "endLine": 3061,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -912817643,
- "nextLine": 1715126832,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 3062,
- "endLine": 3062,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027fieldInfo\u0027 object was used before it was verified against null. Check lines: 3061, 3062.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\KeyframesEditor.cs",
- "line": 552,
- "endLine": 552,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1879261150,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027base.OnMouseDoubleClick(location, button)\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Constants.cs",
- "line": 157,
- "endLine": 157,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 9488589,
- "nextLine": 5607,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
- "line": 253,
- "endLine": 253,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -391087833,
- "currentLine": 1024532118,
- "nextLine": 905,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
- "line": 52,
- "endLine": 52,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027parameter.Name\u0027. Consider inspecting the 1st argument: null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceContext.Serialization.cs",
- "line": 371,
- "endLine": 371,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 282379743,
- "nextLine": -946501766,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceContext.Serialization.cs",
- "line": 383,
- "endLine": 383,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\PrefabWindow.Hierarchy.cs",
- "line": 422,
- "endLine": 422,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 189443829,
- "nextLine": 947129,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027selection.Count !\u003d 0\u0027 is always true.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\StructureInfo.cs",
- "line": 36,
- "endLine": 36,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1034865042,
- "currentLine": 311722709,
- "nextLine": -659558605,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027BaseType?.IsPod\u0027 is always not null. The operator \u0027??\u0027 is excessive.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Float3.cs",
- "line": 1052,
- "endLine": 1052,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1269595245,
- "currentLine": -707124304,
- "nextLine": 353151,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: distanceSq \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Module.cs",
- "line": 78,
- "endLine": 78,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1649239448,
- "currentLine": 229365757,
- "nextLine": 1811700297,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Module.cs",
- "line": 79,
- "endLine": 79,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027options.Platform\u0027 object was used before it was verified against null. Check lines: 78, 79.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3105",
- "cwe": 690,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\MainMenu.cs",
- "line": 111,
- "endLine": 111,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1059705045,
- "currentLine": -1664767524,
- "nextLine": -1499494381,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Render2D\\FontReference.cs",
- "line": 62,
- "endLine": 62,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The result of null-conditional operator is dereferenced inside the \u0027FontReference\u0027 constructor. NullReferenceException is possible. Inspect the first argument \u0027iconFont\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 78,
- "endLine": 78,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1703961276,
- "currentLine": -1549833035,
- "nextLine": 1343251132,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
- "line": 137,
- "endLine": 137,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -259076084,
- "nextLine": -1233683840,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
- "line": 120,
- "endLine": 120,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027b\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 137, 120.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 2338,
- "endLine": 2338,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1392610829,
- "currentLine": 31952928,
- "nextLine": 183867,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027instanceBox\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3108",
- "cwe": 684,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Content\\JsonAssetReference.cs",
- "line": 128,
- "endLine": 128,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 727987121,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "It is not recommended to return \u0027null\u0027 from \u0027ToString()\u0027 method.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
- "line": 175,
- "endLine": 175,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 712831774,
- "currentLine": 23771791,
- "nextLine": -538169749,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027parts.Length \u003e\u003d 1\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Plugins\\PluginUtils.cs",
- "line": 90,
- "endLine": 90,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1637641127,
- "currentLine": -1135161342,
- "nextLine": 1356979630,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027gameAssembly\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioInstance.cs",
- "line": 156,
- "endLine": 156,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\ClassInfo.cs",
- "line": 61,
- "endLine": 61,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 539,
- "currentLine": -145929746,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: BaseType !\u003d null.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3140",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 44,
- "endLine": 44,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -648321897,
- "currentLine": 5965805,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Property accessors use different backing fields.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3106",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Tree\\Tree.cs",
- "line": 392,
- "endLine": 392,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1864877080,
- "currentLine": 185634144,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 234,
- "endLine": 234,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The 1st argument \u0027myIndex - 1\u0027 is potentially used inside method to point beyond collection\u0027s bounds.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\ShuntingYardParser.cs",
- "line": 304,
- "endLine": 304,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 739673,
- "nextLine": -1843498572,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Utilities\\ShuntingYardParser.cs",
- "line": 293,
- "endLine": 293,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027previous\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 304, 293.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\mono.cs",
- "line": 485,
- "endLine": 485,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 263955,
- "currentLine": -1678798269,
- "nextLine": -801243803,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027string.IsNullOrEmpty(localRepoPath)\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 229,
- "endLine": 229,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 770301057,
- "currentLine": 362645215,
- "nextLine": 48143759,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 232,
- "endLine": 232,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027typeInfo.GenericArgs\u0027 object was used before it was verified against null. Check lines: 229, 232.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.cs",
- "line": 11,
- "endLine": 11,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": 1718355659,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.cs",
- "line": 385,
- "endLine": 385,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027Control\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
- "line": 480,
- "endLine": 480,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 712623027,
- "currentLine": 1484687436,
- "nextLine": 1632047724,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useResponseFile\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 204,
- "endLine": 204,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 279127005,
- "currentLine": 137822682,
- "nextLine": 235798474,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 206,
- "endLine": 206,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\IntValueBox.cs",
- "line": 114,
- "endLine": 114,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -659238342,
- "nextLine": -1872144505,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Min \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Tree\\TreeNode.cs",
- "line": 720,
- "endLine": 720,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 43273173,
- "currentLine": 1142970671,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: topOffset !\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 448,
- "endLine": 448,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1251199518,
- "currentLine": -228972198,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: _anchorMin.X !\u003d _anchorMax.X. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.Projects.cs",
- "line": 350,
- "endLine": 350,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 77,
- "endLine": 77,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1171952459,
- "currentLine": 1703961276,
- "nextLine": -1549833035,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 79,
- "endLine": 79,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1549833035,
- "currentLine": 1343251132,
- "nextLine": -954625549,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3088",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\LocalizationSettingsEditor.cs",
- "line": 78,
- "endLine": 78,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -2116319254,
- "nextLine": 195772833,
- "columns": 0
- }
- }
- ],
- "message": "The expression was enclosed by parentheses twice: ((expression)). One pair of parentheses is unnecessary or misprint is present.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Unix\\UnixToolchain.cs",
- "line": 608,
- "endLine": 608,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 712622643,
- "currentLine": 1484687436,
- "nextLine": -248916132,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useResponseFile\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3087",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
- "line": 818,
- "endLine": 818,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -407398261,
- "nextLine": 1295412209,
- "columns": 0
- }
- }
- ],
- "message": "Type of variable enumerated in \u0027foreach\u0027 is not guaranteed to be castable to the type of collection\u0027s elements.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\freetype.cs",
- "line": 195,
- "endLine": 195,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1840624356,
- "currentLine": 921564413,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\freetype.cs",
- "line": 208,
- "endLine": 208,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Scripting\\ScriptType.cs",
- "line": 586,
- "endLine": 586,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 703,
- "endLine": 703,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 442407125,
- "currentLine": 435035580,
- "nextLine": -249367255,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027impulseBox\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
- "line": 1426,
- "endLine": 1426,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 2917173,
- "nextLine": 176405,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: modulo \u003d\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.cs",
- "line": 47,
- "endLine": 47,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3056",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
- "line": 600,
- "endLine": 600,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 700891,
- "currentLine": 700635,
- "nextLine": 702617,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\CameraCutTrack.cs",
- "line": 599,
- "endLine": 599,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Consider reviewing the correctness of \u0027countX\u0027 item\u0027s usage.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\ModelPreview.cs",
- "line": 312,
- "endLine": 312,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1303271947,
- "currentLine": 1221769864,
- "nextLine": -1912373771,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027meshDatas\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 376,
- "endLine": 376,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": 191671173,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 509,
- "endLine": 509,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027Proxy\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\SceneAnimationWindow.cs",
- "line": 946,
- "endLine": 946,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -542125327,
- "currentLine": -1313442982,
- "nextLine": 498098177,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027OriginalAsset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\LongValueBox.cs",
- "line": 90,
- "endLine": 90,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 553804151,
- "nextLine": 1711550716,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Min \u003d\u003d int.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.CopyPaste.cs",
- "line": 287,
- "endLine": 287,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 71909,
- "currentLine": 1501632040,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.CopyPaste.cs",
- "line": 289,
- "endLine": 289,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027node.Values\u0027 object was used before it was verified against null. Check lines: 287, 289.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 756,
- "endLine": 756,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1949931990,
- "currentLine": -873819578,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 849,
- "endLine": 849,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of method return value when it is passed to method as its 2nd argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3065",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Panels\\ScrollBar.cs",
- "line": 255,
- "endLine": 255,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 830098888,
- "currentLine": 1063502971,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Parameter \u0027max\u0027 is not utilized inside method\u0027s body.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3137",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Selection.cs",
- "line": 169,
- "endLine": 169,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 65878795,
- "currentLine": 1815740855,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The \u0027closestIntersection\u0027 variable is assigned but is not used by the end of the function.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 774,
- "endLine": 774,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1949931990,
- "currentLine": -873819578,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 849,
- "endLine": 849,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of method return value when it is passed to method as its 2nd argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deploy\\VCEnvironment.cs",
- "line": 304,
- "endLine": 304,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
- "line": 126,
- "endLine": 126,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 10823529,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.CopyPaste.cs",
- "line": 289,
- "endLine": 289,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -414337831,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: node.Values !\u003d null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\UICanvas.cs",
- "line": 527,
- "endLine": 527,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 76173129,
- "currentLine": 1051379438,
- "nextLine": 13812,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\UI\\UICanvas.cs",
- "line": 529,
- "endLine": 529,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_guiRoot\u0027 object was used before it was verified against null. Check lines: 527, 529.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3106",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanelProxy.cs",
- "line": 457,
- "endLine": 457,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 36080,
- "currentLine": -549169312,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanel.cs",
- "line": 634,
- "endLine": 634,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The 1st argument \u0027index\u0027 is potentially used inside method to point beyond collection\u0027s bounds.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\CollectionEditor.cs",
- "line": 72,
- "endLine": 72,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 197296703,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.ContextMenu.cs",
- "line": 324,
- "endLine": 324,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 84667522,
- "currentLine": 39528297,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 595,
- "endLine": 595,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 10823529,
- "nextLine": 1019178747,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\UIntValueBox.cs",
- "line": 115,
- "endLine": 115,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1042995749,
- "currentLine": -848030463,
- "nextLine": 174178098,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
- "line": 209,
- "endLine": 209,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 34656253,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
- "line": 218,
- "endLine": 218,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027scene.IsEdited\u0027. Consider inspecting the 1st argument: GetActorNode(scene) as SceneNode.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 1297,
- "endLine": 1297,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 887313387,
- "currentLine": -482191901,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Platform.cs",
- "line": 57,
- "endLine": 57,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 2244993,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Tree\\TreeNode.cs",
- "line": 344,
- "endLine": 344,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1054762423,
- "currentLine": -1918622443,
- "nextLine": 754910666,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _opened.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\ActorTransformEditor.cs",
- "line": 132,
- "endLine": 132,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": 762899,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3110",
- "cwe": 674,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.cs",
- "line": 289,
- "endLine": 289,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": -1600349245,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible infinite recursion inside \u0027RootWindow\u0027 property.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ActorTrack.cs",
- "line": 162,
- "endLine": 162,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 197318112,
- "currentLine": 39528297,
- "nextLine": 2091046699,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Parsing.cs",
- "line": 288,
- "endLine": 288,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1895773223,
- "currentLine": 219069897,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
- "line": 718,
- "endLine": 718,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 5951337,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027pdbFile !\u003d null\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\AnimationGraphWindow.cs",
- "line": 290,
- "endLine": 290,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\SceneAnimationWindow.cs",
- "line": 475,
- "endLine": 475,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -146923666,
- "currentLine": 410114888,
- "nextLine": -1484736164,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\RenderOutputControl.cs",
- "line": 82,
- "endLine": 82,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside property at \u0027value.Value\u0027. Consider inspecting: null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix3x3.cs",
- "line": 1648,
- "endLine": 1648,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1823335671,
- "nextLine": 2091507959,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: shearAngles.X \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
- "line": 115,
- "endLine": 115,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 2244993,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
- "line": 315,
- "endLine": 315,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1265294171,
- "currentLine": -1068793631,
- "nextLine": 2638153,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027prefab\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonCustomSerializers\\ExtendedDefaultContractResolver.cs",
- "line": 66,
- "endLine": 66,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 338,
- "endLine": 338,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2055388090,
- "currentLine": -228939432,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: _anchorMin.Y !\u003d _anchorMax.Y. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3066",
- "cwe": 683,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Special\\RadialMenu.cs",
- "line": 374,
- "endLine": 374,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -945172612,
- "currentLine": -380482562,
- "nextLine": 497174469,
- "columns": 0
- }
- }
- ],
- "message": "Possible incorrect order of arguments passed to \u0027Atan2\u0027 method: \u0027p.X\u0027 and \u0027p.Y\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\ContainerControl.cs",
- "line": 1214,
- "endLine": 1214,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -482191901,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _children.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonCustomSerializers\\ExtendedSerializationBinder.cs",
- "line": 201,
- "endLine": 201,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1968057933,
- "currentLine": -352437663,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027assemblyDelimiterIndex\u0027 is always not null. The operator \u0027??\u0027 is excessive.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Engine\\InputEvent.cs",
- "line": 10,
- "endLine": 10,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": -285293576,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Engine\\InputEvent.cs",
- "line": 104,
- "endLine": 104,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027InputEvent\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
- "line": 379,
- "endLine": 379,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -1891950664,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Undo\\AddRemoveNodeAction.cs",
- "line": 26,
- "endLine": 26,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027node.Surface\u0027. Consider inspecting the 1st argument: rerouteNode.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\RenameTrackAction.cs",
- "line": 21,
- "endLine": 21,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1943407749,
- "currentLine": 199585797,
- "nextLine": 1992334457,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027track\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 709,
- "endLine": 709,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 6205027,
- "nextLine": 5607,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027SaveSurface()\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\TimelineEdge.cs",
- "line": 73,
- "endLine": 73,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 866780861,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027base.OnMouseDown(location, button)\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 570,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Tree\\TreeNode.cs",
- "line": 365,
- "endLine": 365,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1054762423,
- "currentLine": -1918622443,
- "nextLine": 754910666,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always false if it is evaluated: _opened.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\Foliage\\PaintTab.cs",
- "line": 296,
- "endLine": 296,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -1621785026,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Popups\\AssetSearchPopup.cs",
- "line": 85,
- "endLine": 85,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027item.ShortName\u0027. Consider inspecting the 1st argument: asset.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 12,
- "endLine": 12,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": 1528060217,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockHintWindow.cs",
- "line": 92,
- "endLine": 92,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027DockHintWindow\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Editor.cs",
- "line": 351,
- "endLine": 351,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 2244993,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 809,
- "endLine": 809,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 252577269,
- "currentLine": 95399869,
- "nextLine": -1347632307,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: tangentInSize \u003d\u003d 0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\AnimationEventTrack.cs",
- "line": 350,
- "endLine": 350,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": -851102447,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3151",
- "cwe": 369,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Panels\\UniformGridPanel.cs",
- "line": 116,
- "endLine": 116,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 553968331,
- "nextLine": 1459729373,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Panels\\UniformGridPanel.cs",
- "line": 119,
- "endLine": 119,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Potential division by zero. The variable was used as a divisor before it was compared with a range of values which includes zero. Check lines: 116, 119.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 790,
- "endLine": 790,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 526031993,
- "nextLine": 111057780,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 791,
- "endLine": 791,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027Surface\u0027 object was used before it was verified against null. Check lines: 790, 791.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
- "line": 1341,
- "endLine": 1341,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5710891,
- "currentLine": -1640001903,
- "nextLine": 11507755,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: value \u003d\u003d double.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 502,
- "endLine": 502,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -350140321,
- "nextLine": 176909,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 500,
- "endLine": 500,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027parameter.Type\u0027 object was used after it was verified against null. Check lines: 502, 500.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\ContextMenu\\ContextMenuBase.cs",
- "line": 227,
- "endLine": 227,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1634962527,
- "currentLine": 30928389,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\ContextMenu\\ContextMenuBase.cs",
- "line": 231,
- "endLine": 231,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_window\u0027 object was used before it was verified against null. Check lines: 227, 231.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3029",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 382,
- "endLine": 382,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -584423831,
- "currentLine": 24847635,
- "nextLine": 23049677,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 384,
- "endLine": 384,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The conditional expressions of the \u0027if\u0027 statements situated alongside each other are identical. Check lines: 382, 384.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.ContextMenu.cs",
- "line": 336,
- "endLine": 336,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": 189443607,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\MaterialWindow.cs",
- "line": 307,
- "endLine": 307,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
- "line": 544,
- "endLine": 544,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -39666730,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
- "line": 529,
- "endLine": 529,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027token\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 544, 529.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 2082,
- "endLine": 2082,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 157384315,
- "currentLine": 1808342346,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: string.IsNullOrEmpty(entryInfo.Value).",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\vorbis.cs",
- "line": 215,
- "endLine": 215,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 330357201,
- "currentLine": 1547435535,
- "nextLine": 21508477,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\vorbis.cs",
- "line": 222,
- "endLine": 222,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Proxy\\CollisionDataProxy.cs",
- "line": 96,
- "endLine": 96,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -539491647,
- "currentLine": -372324272,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027collisionData\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 890,
- "endLine": 890,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1598514311,
- "currentLine": -399833558,
- "nextLine": 1993854390,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027selected\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\ActorTransformEditor.cs",
- "line": 126,
- "endLine": 126,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1863041,
- "currentLine": 816021088,
- "nextLine": -1896027599,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\ActorTransformEditor.cs",
- "line": 128,
- "endLine": 128,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027LinkedLabel\u0027 object was used before it was verified against null. Check lines: 126, 128.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Progress\\Handlers\\BuildingGameProgress.cs",
- "line": 42,
- "endLine": 42,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 406951278,
- "currentLine": 12713,
- "nextLine": 2337,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Progress\\Handlers\\BuildingGameProgress.cs",
- "line": 45,
- "endLine": 45,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix2x2.cs",
- "line": 309,
- "endLine": 309,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1823335671,
- "nextLine": 2091507959,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: shearAngles.X \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 883,
- "endLine": 883,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5607,
- "currentLine": 39528297,
- "nextLine": -2080988043,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\SkinnedModelWindow.cs",
- "line": 1247,
- "endLine": 1247,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1601147684,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: !_meshDatasCancel.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisualScriptSurface.cs",
- "line": 610,
- "endLine": 610,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 413,
- "currentLine": -2012781934,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027node\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
- "line": 1324,
- "endLine": 1324,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1668948979,
- "nextLine": 5710891,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: value \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
- "line": 1326,
- "endLine": 1326,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 5710891,
- "currentLine": -1669194355,
- "nextLine": 11507755,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: value \u003d\u003d float.MinValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\NvCloth.cs",
- "line": 83,
- "endLine": 83,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 330356367,
- "currentLine": 2030477402,
- "nextLine": 2337,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\NvCloth.cs",
- "line": 90,
- "endLine": 90,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneEditingModule.cs",
- "line": 585,
- "endLine": 585,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -38636684,
- "currentLine": 761041674,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetActorNode(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
- "line": 975,
- "endLine": 975,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 431268495,
- "currentLine": 1484687436,
- "nextLine": 1535220865,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useResponseFile\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.Contents.cs",
- "line": 484,
- "endLine": 484,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1557903299,
- "currentLine": 10823529,
- "nextLine": 995216132,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3106",
- "cwe": 787,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1688,
- "endLine": 1688,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 238209197,
- "nextLine": 162442199,
- "columns": 0
- }
- }
- ],
- "message": "Possible negative index value. The value of \u0027n - 1\u0027 index could reach -2.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3106",
- "cwe": 125,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1688,
- "endLine": 1688,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 238209197,
- "nextLine": 162442199,
- "columns": 0
- }
- }
- ],
- "message": "Possible negative index value. The value of \u0027n - 1\u0027 index could reach -2.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\BehaviorTreeWindow.cs",
- "line": 326,
- "endLine": 326,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 6205027,
- "nextLine": 5607,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027SaveSurface()\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\Utils.cs",
- "line": 1307,
- "endLine": 1307,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1641017583,
- "nextLine": 5710891,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: value \u003d\u003d double.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 405,
- "endLine": 405,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 133090825,
- "currentLine": -1769919241,
- "nextLine": -262631924,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027_outputBox\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3039",
- "cwe": 39,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
- "line": 238,
- "endLine": 238,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 796411036,
- "currentLine": 1006372371,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\AnimationWindow.cs",
- "line": 165,
- "endLine": 165,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1075373889,
- "currentLine": 16018491,
- "nextLine": 232955,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\AnimationWindow.cs",
- "line": 135,
- "endLine": 135,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside property at \u0027value.WaitForLoaded\u0027. Consider inspecting: null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3013",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\AssetEditorWindow.cs",
- "line": 249,
- "endLine": 249,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1575956,
- "currentLine": -1921583599,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\AssetEditorWindow.cs",
- "line": 272,
- "endLine": 272,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "It is odd that the body of \u0027OnItemDeleted\u0027 function is fully equivalent to the body of \u0027OnItemDispose\u0027 function (249, line 272).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
- "line": 770,
- "endLine": 770,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 801783139,
- "nextLine": -654660249,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: alpha \u003d\u003d 1.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3097",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingFrustum.cs",
- "line": 44,
- "endLine": 44,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1324312541,
- "currentLine": -1041514531,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\BoundingFrustum.cs",
- "line": 46,
- "endLine": 46,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible exception: the \u0027BoundingFrustum\u0027 type marked by [Serializable] contains non-serializable members not marked by [NonSerialized].",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Media.cs",
- "line": 545,
- "endLine": 545,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1377895587,
- "currentLine": 1238651214,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Media.cs",
- "line": 541,
- "endLine": 541,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_durationFrames\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 545, 541.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ActorEditor.cs",
- "line": 391,
- "endLine": 391,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 599963879,
- "currentLine": 39528297,
- "nextLine": -2077034023,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 209,
- "endLine": 209,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1860286649,
- "currentLine": 707560414,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\SceneTreeWindow.ContextMenu.cs",
- "line": 208,
- "endLine": 208,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027childCM\u0027 object was used after it was verified against null. Check lines: 209, 208.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\ViewportDebugDrawData.cs",
- "line": 14,
- "endLine": 14,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": -1960715312,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\ViewportDebugDrawData.cs",
- "line": 167,
- "endLine": 167,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027ViewportDebugDrawData\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Values\\ValueContainer.cs",
- "line": 306,
- "endLine": 306,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Flow.cs",
- "line": 127,
- "endLine": 127,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1030593,
- "currentLine": 541961746,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Mathf.cs",
- "line": 1535,
- "endLine": 1535,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 182363,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027AlphaBlendMode\u0027 enum: Linear.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3013",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Engine\\Logger.cs",
- "line": 210,
- "endLine": 210,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1575956,
- "currentLine": 217846910,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Engine\\Logger.cs",
- "line": 222,
- "endLine": 222,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "It is odd that the body of \u0027LogFormat\u0027 function is fully equivalent to the body of \u0027Log\u0027 function (210, line 222).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 570,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
- "line": 1078,
- "endLine": 1078,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -39666730,
- "currentLine": 34376685,
- "nextLine": 2337,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always false if it is evaluated: token \u003d\u003d null.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
- "line": 13,
- "endLine": 13,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": 764061601,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Utilities\\MeshDataCache.cs",
- "line": 82,
- "endLine": 82,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027MeshDataCache\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 334,
- "endLine": 334,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917384890,
- "currentLine": 47033653,
- "nextLine": 917253816,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 374,
- "endLine": 374,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917384890,
- "currentLine": 47033653,
- "nextLine": 917253816,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\VisualScriptDebuggerWindow.cs",
- "line": 294,
- "endLine": 294,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 413,
- "currentLine": 39528297,
- "nextLine": 12248860,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix2x2.cs",
- "line": 310,
- "endLine": 310,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1823335671,
- "currentLine": 2091507959,
- "nextLine": 405504822,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: shearAngles.Y \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Search\\SearchItem.cs",
- "line": 184,
- "endLine": 184,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 10823529,
- "nextLine": -614800267,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\DebugLogWindow.cs",
- "line": 705,
- "endLine": 705,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2005067434,
- "currentLine": -1357183362,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: scrollView.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 157,
- "endLine": 157,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 263235661,
- "currentLine": 804049877,
- "nextLine": -1938424211,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027panel\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 396,
- "endLine": 396,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917253816,
- "currentLine": 47033525,
- "nextLine": 917122750,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\AppleToolchain.cs",
- "line": 369,
- "endLine": 369,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1331431438,
- "currentLine": 1484687436,
- "nextLine": -248916132,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useResponseFile\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 795,
- "endLine": 795,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1979095821,
- "nextLine": 5607,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 849,
- "endLine": 849,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of \u0027Surface.FindNode(flowInfo.NodeId)\u0027 method return value at \u0027node.Title\u0027 when it is passed to method as its 2nd argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 1517,
- "endLine": 1517,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 21464287,
- "currentLine": 243702634,
- "nextLine": 2069386033,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027buildData.Target\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3107",
- "cwe": 0,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.cs",
- "line": 159,
- "endLine": 159,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -439898606,
- "currentLine": -1530603393,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Identical expression \u0027position\u0027 to the left and to the right of compound assignment.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 903,
- "endLine": 903,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1598514311,
- "currentLine": 944350635,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027selected\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\FloatEditor.cs",
- "line": 60,
- "endLine": 60,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": 54737797,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\GenericEditor.cs",
- "line": 449,
- "endLine": 449,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 3063,
- "endLine": 3063,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1715126832,
- "currentLine": 889615882,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 3062,
- "endLine": 3062,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027fieldInfo\u0027 object was used after it was verified against null. Check lines: 3063, 3062.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 386,
- "endLine": 386,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1598514311,
- "currentLine": 944350635,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027selected\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3152",
- "cwe": 369,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Network.cs",
- "line": 149,
- "endLine": 149,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -309189763,
- "nextLine": -1430248771,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Network.cs",
- "line": 139,
- "endLine": 139,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Potential division by zero. The variable was compared with a range of values which includes zero before it was used as a divisor. Check lines: 149, 139.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Render2D\\FontReference.cs",
- "line": 99,
- "endLine": 99,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 3098695,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: _size !\u003d value. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 613,
- "endLine": 613,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -302305083,
- "currentLine": 10823529,
- "nextLine": 943806282,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3146",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\EngineTarget.cs",
- "line": 191,
- "endLine": 191,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 595270419,
- "currentLine": -600957687,
- "nextLine": 471057516,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.Rules.cs",
- "line": 99,
- "endLine": 99,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of \u0027mainModule\u0027. The \u0027Modules.FirstOrDefault\u0027 can return default null value.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\IntValueBox.cs",
- "line": 104,
- "endLine": 104,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -659238342,
- "currentLine": -1872144505,
- "nextLine": 240213,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Max \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 556,
- "endLine": 556,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -635286754,
- "currentLine": 10823529,
- "nextLine": -1462959235,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 354,
- "endLine": 354,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917384890,
- "currentLine": 47033653,
- "nextLine": 917253816,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneEditingModule.cs",
- "line": 635,
- "endLine": 635,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1368781623,
- "currentLine": 228174536,
- "nextLine": -1219728807,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneEditingModule.cs",
- "line": 664,
- "endLine": 664,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027customUndoActions\u0027 object was used before it was verified against null. Check lines: 635, 664.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
- "line": 365,
- "endLine": 365,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 62999104,
- "nextLine": -1737709894,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
- "line": 408,
- "endLine": 408,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027ScriptsEditor.ParentEditor\u0027 object was used before it was verified against null. Check lines: 365, 408.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3127",
- "cwe": 682,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\ColorPickerDialog.cs",
- "line": 149,
- "endLine": 149,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1087,
- "currentLine": -1428373212,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\ColorPickerDialog.cs",
- "line": 142,
- "endLine": 142,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two similar code fragments were found. Perhaps, this is a typo and \u0027_cGreen\u0027 variable should be used instead of \u0027_cRed\u0027",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneModule.cs",
- "line": 154,
- "endLine": 154,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -304040429,
- "currentLine": 1333727,
- "nextLine": -497407471,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027sun\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 946,
- "endLine": 946,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 413,
- "currentLine": 1165436777,
- "nextLine": 793314458,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3013",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
- "line": 260,
- "endLine": 260,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1575956,
- "currentLine": -1921583599,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\AssetPickerValidator.cs",
- "line": 277,
- "endLine": 277,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "It is odd that the body of \u0027OnItemDeleted\u0027 function is fully equivalent to the body of \u0027OnItemDispose\u0027 function (260, line 277).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\ContentDatabaseModule.cs",
- "line": 1251,
- "endLine": 1251,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 79009,
- "currentLine": 46807243,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027WatcherChangeTypes\u0027 enum: Changed, All.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.cs",
- "line": 439,
- "endLine": 439,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 18090888,
- "currentLine": 527425857,
- "nextLine": 2337,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.cs",
- "line": 442,
- "endLine": 442,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\PrefabWindow.Hierarchy.cs",
- "line": 317,
- "endLine": 317,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 341518184,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 483,
- "endLine": 483,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1259234840,
- "currentLine": -162743894,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 491,
- "endLine": 491,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027dialog.RootWindow\u0027 object was used before it was verified against null. Check lines: 483, 491.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 628,
- "endLine": 628,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 9488589,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3039",
- "cwe": 39,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetSdk.cs",
- "line": 553,
- "endLine": 553,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1343412697,
- "currentLine": -493556915,
- "nextLine": 737934375,
- "columns": 0
- }
- }
- ],
- "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 1519,
- "endLine": 1519,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 371137,
- "nextLine": 5610543,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027separator\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 808,
- "endLine": 808,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 551626601,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
- "line": 514,
- "endLine": 514,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 450835468,
- "currentLine": -39666730,
- "nextLine": -559846127,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Parsing.cs",
- "line": 513,
- "endLine": 513,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027token\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 514, 513.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Undo\\Undo.cs",
- "line": 352,
- "endLine": 352,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2123660189,
- "currentLine": 142129,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027action\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3053",
- "cwe": 0,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Import\\TextureImportEntry.cs",
- "line": 180,
- "endLine": 180,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1435255155,
- "currentLine": 1424435228,
- "nextLine": 714925805,
- "columns": 0
- }
- }
- ],
- "message": "An excessive expression. Examine the substrings \u0027ambientocclusion\u0027 and \u0027occlusion\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3083",
- "cwe": 367,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\Image.cs",
- "line": 132,
- "endLine": 132,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 956270890,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Unsafe invocation of event \u0027Clicked\u0027, NullReferenceException is possible. Consider assigning event to a local variable before invoking it.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3107",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\Foliage\\EditFoliageGizmo.cs",
- "line": 154,
- "endLine": 154,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1236601848,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Identical expression \u0027trans.Orientation\u0027 to the left and to the right of compound assignment.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3105",
- "cwe": 690,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Utilities\\VariantUtils.cs",
- "line": 917,
- "endLine": 917,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 514101685,
- "currentLine": -2084388378,
- "nextLine": 0,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Utilities\\TypeUtils.cs",
- "line": 20,
- "endLine": 20,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The result of null-conditional operator is dereferenced inside the \u0027WriteVariantType\u0027 method. NullReferenceException is possible. Inspect the first argument \u0027type\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3171",
- "cwe": 839,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1651,
- "endLine": 1651,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1816897,
- "currentLine": 1825089,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix3x3.cs",
- "line": 1649,
- "endLine": 1649,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1823335671,
- "currentLine": 2091507959,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: shearAngles.Y \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 81,
- "endLine": 81,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -954625549,
- "currentLine": 761440307,
- "nextLine": 1606151089,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 713,
- "endLine": 713,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 551626601,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3083",
- "cwe": 367,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\ScriptsEditor.cs",
- "line": 906,
- "endLine": 906,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -306282130,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Unsafe invocation of event \u0027ScriptDragChange\u0027, NullReferenceException is possible. Consider assigning event to a local variable before invoking it.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3087",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\AudioTrack.cs",
- "line": 271,
- "endLine": 271,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 348699038,
- "nextLine": 211206031,
- "columns": 0
- }
- }
- ],
- "message": "Type of variable enumerated in \u0027foreach\u0027 is not guaranteed to be castable to the type of collection\u0027s elements.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Input\\LongValueBox.cs",
- "line": 91,
- "endLine": 91,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 553804151,
- "currentLine": 1711550716,
- "nextLine": 174178098,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: limits.Max \u003d\u003d int.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3062",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\KeyframesEditorUtils.cs",
- "line": 42,
- "endLine": 42,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 539,
- "currentLine": 2083022370,
- "nextLine": 152869,
- "columns": 0
- }
- }
- ],
- "message": "An object \u0027editor\u0027 is used as an argument to its own method. Consider checking the first actual argument of the \u0027OnKeyframesDeselect\u0027 method.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\GameplayGlobalsWindow.cs",
- "line": 330,
- "endLine": 330,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1499381263,
- "currentLine": 39528297,
- "nextLine": -1653391353,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Undo\\Undo.cs",
- "line": 338,
- "endLine": 338,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2123646477,
- "currentLine": 568945,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027action\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SourceCodeEditing\\CodeDocsModule.cs",
- "line": 327,
- "endLine": 327,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Editor.cs",
- "line": 604,
- "endLine": 604,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1281022636,
- "currentLine": 123422025,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Editor.cs",
- "line": 607,
- "endLine": 607,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027UI\u0027 object was used before it was verified against null. Check lines: 604, 607.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Particles.cs",
- "line": 327,
- "endLine": 327,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 183841,
- "currentLine": 907932904,
- "nextLine": 1413683,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027function\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\nethost.cs",
- "line": 156,
- "endLine": 156,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 313455271,
- "nextLine": 2337,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\nethost.cs",
- "line": 161,
- "endLine": 161,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Program.cs",
- "line": 106,
- "endLine": 106,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -1798325879,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\PrefabWindow.Hierarchy.cs",
- "line": 302,
- "endLine": 302,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 341518184,
- "nextLine": 1542458689,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\VisualScriptWindow.cs",
- "line": 469,
- "endLine": 469,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1971593666,
- "currentLine": 97990893,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.cs",
- "line": 696,
- "endLine": 696,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027control.IsSelected\u0027. Consider inspecting the 1st argument: node.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 86,
- "endLine": 86,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2044871539,
- "currentLine": 2120718357,
- "nextLine": 1020171548,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Log.cs",
- "line": 11,
- "endLine": 11,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 216764,
- "currentLine": 47917697,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Log.cs",
- "line": 44,
- "endLine": 44,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027Log\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3105",
- "cwe": 690,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
- "line": 130,
- "endLine": 130,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -939225972,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Dialogs\\Dialog.cs",
- "line": 151,
- "endLine": 151,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The result of null-conditional operator is dereferenced inside the \u0027Show\u0027 method. NullReferenceException is possible. Inspect the first argument \u0027parentWindow?.Window\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 87,
- "endLine": 87,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2120718357,
- "currentLine": 1020171548,
- "nextLine": 5607,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Parameters.cs",
- "line": 981,
- "endLine": 981,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1598514311,
- "currentLine": 563359994,
- "nextLine": 1834641805,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\SceneEditingModule.cs",
- "line": 254,
- "endLine": 254,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1943450911,
- "nextLine": 1452381854,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.ContextMenu.cs",
- "line": 170,
- "endLine": 170,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 10823529,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3203",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Engine\\NativeInterop.Marshallers.cs",
- "line": 51,
- "endLine": 51,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 1139822315,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Method parameter is not used: unmanaged.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3086",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\AppleToolchain.cs",
- "line": 47,
- "endLine": 47,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -2085537476,
- "currentLine": -613861060,
- "nextLine": 378085957,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Apple\\AppleToolchain.cs",
- "line": 46,
- "endLine": 46,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Variables ClangPath, LinkerPath are initialized through the call to the same function. It\u0027s probably an error or un-optimized code.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3066",
- "cwe": 683,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix.cs",
- "line": 3069,
- "endLine": 3069,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1027954124,
- "nextLine": 352987,
- "columns": 0
- }
- }
- ],
- "message": "Possible incorrect order of arguments passed to \u0027Multiply\u0027 method: \u0027right\u0027 and \u0027left\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3171",
- "cwe": 839,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1650,
- "endLine": 1650,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2856205,
- "currentLine": 1816897,
- "nextLine": 1825089,
- "columns": 0
- }
- }
- ],
- "message": "The value used as the size of an array could reach -1. Consider inspecting: n.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 474,
- "endLine": 474,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 64671241,
- "currentLine": -1769920317,
- "nextLine": 98657769,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027_inputBox\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\glslang.cs",
- "line": 22,
- "endLine": 22,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 330357817,
- "currentLine": 88383,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\glslang.cs",
- "line": 27,
- "endLine": 27,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 80,
- "endLine": 80,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1343251132,
- "currentLine": -954625549,
- "nextLine": 761440307,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Proxy\\CollisionDataProxy.cs",
- "line": 113,
- "endLine": 113,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -539491615,
- "currentLine": -1979052924,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027collisionData\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3066",
- "cwe": 683,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Matrix3x3.cs",
- "line": 1957,
- "endLine": 1957,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1366175206,
- "nextLine": 352987,
- "columns": 0
- }
- }
- ],
- "message": "Possible incorrect order of arguments passed to \u0027Multiply\u0027 method: \u0027right\u0027 and \u0027left\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Thumbnails\\ThumbnailRequest.cs",
- "line": 12,
- "endLine": 12,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": 1817925791,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Content\\Thumbnails\\ThumbnailRequest.cs",
- "line": 121,
- "endLine": 121,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027ThumbnailRequest\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\Terrain\\EditTerrainGizmo.cs",
- "line": 71,
- "endLine": 71,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 93642011,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027Modes\u0027 enum: Export.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3130",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Special\\RadialMenu.cs",
- "line": 226,
- "endLine": 226,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1628710754,
- "currentLine": 1948501713,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Priority of the \u0027\u0026\u0026\u0027 operator is higher than that of the \u0027||\u0027 operator. Possible missing parentheses.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
- "line": 363,
- "endLine": 363,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\ParticleModules.cs",
- "line": 402,
- "endLine": 402,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 905298217,
- "currentLine": 928054386,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\BehaviorTree.cs",
- "line": 419,
- "endLine": 419,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -75047871,
- "currentLine": 2112015717,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027_output\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 376,
- "endLine": 376,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917253816,
- "currentLine": 47033525,
- "nextLine": 917122750,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ObjectPropertyTrack.cs",
- "line": 130,
- "endLine": 130,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 200020952,
- "currentLine": 39528297,
- "nextLine": -1080797340,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 591,
- "endLine": 591,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1937636774,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027base.OnMouseUp(location, button)\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\SplineNode.cs",
- "line": 169,
- "endLine": 169,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1547286084,
- "currentLine": 187432065,
- "nextLine": 214668217,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027splineNode\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.Input.cs",
- "line": 572,
- "endLine": 572,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -196148635,
- "nextLine": 31800591,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027_mouseMoveAmount \u003e 0 \u0026\u0026 _middleMouseDown\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3106",
- "cwe": 787,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1696,
- "endLine": 1696,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -2087586874,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible negative index value. The value of \u0027n - 1\u0027 index could reach -2.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3106",
- "cwe": 125,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1696,
- "endLine": 1696,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -2087586874,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible negative index value. The value of \u0027n\u0027 index could reach -1.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3106",
- "cwe": 125,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 1696,
- "endLine": 1696,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -2087586874,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible negative index value. The value of \u0027n - 1\u0027 index could reach -2.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\PluginsWindow.cs",
- "line": 734,
- "endLine": 734,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1083623338,
- "currentLine": -169073198,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\PluginsWindow.cs",
- "line": 692,
- "endLine": 692,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027pluginVersion\u0027 object was used after it was verified against null. Check lines: 734, 692.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 158,
- "endLine": 158,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 804049877,
- "currentLine": -1938424211,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027settingsPanel\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 313,
- "endLine": 313,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917253816,
- "currentLine": 47033525,
- "nextLine": 917122750,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Z !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\QuaternionEditor.cs",
- "line": 66,
- "endLine": 66,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": 1836050938,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 372,
- "endLine": 372,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 10971609,
- "currentLine": 47033781,
- "nextLine": 917384890,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.X !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 752,
- "endLine": 752,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 925841144,
- "currentLine": 656591904,
- "nextLine": 11102239,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027picker\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Tracks\\ActorTrack.cs",
- "line": 164,
- "endLine": 164,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2091046699,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\Builder.DotNet.cs",
- "line": 368,
- "endLine": 368,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -841402254,
- "currentLine": -4911802,
- "nextLine": -1980999885,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027project\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Tools.cs",
- "line": 1008,
- "endLine": 1008,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 525301392,
- "currentLine": 163710116,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\Foliage\\FoliageTypesTab.cs",
- "line": 480,
- "endLine": 480,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1327462052,
- "currentLine": -1621785026,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Popups\\AssetSearchPopup.cs",
- "line": 85,
- "endLine": 85,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027item.ShortName\u0027. Consider inspecting the 1st argument: asset.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 906,
- "endLine": 906,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\SceneNode.cs",
- "line": 71,
- "endLine": 71,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 341518184,
- "nextLine": 20999091,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 1644,
- "endLine": 1644,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 435035580,
- "currentLine": -249367255,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 758,
- "endLine": 758,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of \u0027node.GetBox(0)\u0027 method return value at \u0027end.IsOutput\u0027 when it is passed to method as its 1st argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Tools\\Foliage\\FoliageTypesTab.cs",
- "line": 520,
- "endLine": 520,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1731770463,
- "currentLine": 152700762,
- "nextLine": 746654530,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Tools\\Foliage\\FoliageTypesTab.cs",
- "line": 521,
- "endLine": 521,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027foliage\u0027 object was used before it was verified against null. Check lines: 520, 521.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3090",
- "cwe": 833,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\ProgressDisplay.cs",
- "line": 134,
- "endLine": 134,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1331695853,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Unsafe locking on an object of type \u0027Thread\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\CurveEditor.cs",
- "line": 2193,
- "endLine": 2193,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 10823529,
- "nextLine": 601722951,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 871,
- "endLine": 871,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1597153265,
- "currentLine": -1491785879,
- "nextLine": 628674383,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 729,
- "endLine": 729,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -249367255,
- "nextLine": -981169433,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 758,
- "endLine": 758,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of \u0027node.GetBox(0)\u0027 method return value at \u0027end.IsOutput\u0027 when it is passed to method as its 1st argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 942,
- "endLine": 942,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 1240,
- "endLine": 1240,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 663272806,
- "nextLine": 831015659,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027box\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Plugins\\PluginUtils.cs",
- "line": 91,
- "endLine": 91,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1135161342,
- "currentLine": 1356979630,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027gameEditorAssembly\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 710,
- "endLine": 710,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1336455718,
- "currentLine": -1816557167,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: keyframe.TangentIn.Translation.Length \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 710,
- "endLine": 710,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1336455718,
- "currentLine": -1816557167,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 1106,
- "endLine": 1106,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -2080195201,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 407,
- "endLine": 407,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -262631924,
- "currentLine": 64678804,
- "nextLine": 98657769,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027_defaultValueBox\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 618,
- "endLine": 618,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 862973185,
- "currentLine": 10823529,
- "nextLine": 529051994,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 727,
- "endLine": 727,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 413,
- "currentLine": 435035580,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027impulseBox\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3156",
- "cwe": 628,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Scripting\\TypeUtils.cs",
- "line": 375,
- "endLine": 375,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -460955378,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The first argument of the \u0027CreateInstance\u0027 method is not expected to be null. Potential null value: GetType(elementType).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\GenericEditor.cs",
- "line": 503,
- "endLine": 503,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -29049501,
- "currentLine": 39528297,
- "nextLine": -387363588,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\DebugLogWindow.cs",
- "line": 242,
- "endLine": 242,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 866780861,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027base.OnMouseDown(location, button)\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ToolboxWindow.cs",
- "line": 267,
- "endLine": 267,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1357389608,
- "nextLine": 747625,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetChild\u003cPanel\u003e().",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3013",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Editor.cs",
- "line": 1447,
- "endLine": 1447,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 763605136,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Editor.cs",
- "line": 1452,
- "endLine": 1452,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "It is odd that the body of \u0027Internal_CanAutoBuildCSG\u0027 function is fully equivalent to the body of \u0027Internal_CanAutoBuildNavMesh\u0027 function.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
- "line": 714,
- "endLine": 714,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 148559725,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useSeparatePdb\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\GameWindow.cs",
- "line": 356,
- "endLine": 356,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 477270135,
- "nextLine": -868195576,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\RenderOutputControl.cs",
- "line": 82,
- "endLine": 82,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside property at \u0027value.Value\u0027. Consider inspecting: new Int2?().",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3072",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\LocalizedStringTableWindow.cs",
- "line": 19,
- "endLine": 19,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1559036708,
- "currentLine": 1019009626,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\LocalizedStringTableWindow.cs",
- "line": 25,
- "endLine": 25,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027LocalizedStringTableWindow\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: _undo.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\EditorOptionsWindow.cs",
- "line": 197,
- "endLine": 197,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 162935,
- "currentLine": -341949222,
- "nextLine": 333,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetChild\u003cPanel\u003e().",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Draw.cs",
- "line": 205,
- "endLine": 205,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 791267737,
- "nextLine": 1207555094,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.Draw.cs",
- "line": 203,
- "endLine": 203,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_vertexSnapObjectTo\u0027 object was used after it was verified against null. Check lines: 205, 203.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\ContentWindow.cs",
- "line": 773,
- "endLine": 773,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 552932,
- "currentLine": 1866730575,
- "nextLine": 193921971,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027SelectedNode\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Render2D\\FontReference.cs",
- "line": 146,
- "endLine": 146,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 2116643121,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: _size \u003d\u003d other._size. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Transform.cs",
- "line": 413,
- "endLine": 413,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 917384890,
- "currentLine": 47033653,
- "nextLine": 917253816,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: invScale.Y !\u003d 0.0f. Consider using a comparison with defined precision: Math.Abs(A - B) \u003e Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\ModelWindow.cs",
- "line": 655,
- "endLine": 655,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -435003059,
- "currentLine": 1439476806,
- "nextLine": 1221769864,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027meshDatas\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3053",
- "cwe": 0,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Import\\TextureImportEntry.cs",
- "line": 160,
- "endLine": 160,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 178573557,
- "currentLine": 1419438780,
- "nextLine": 1428601579,
- "columns": 0
- }
- }
- ],
- "message": "An excessive expression. Examine the substrings \u0027color\u0027 and \u0027basecolor\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\MainEditorGizmoViewport.cs",
- "line": 236,
- "endLine": 236,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 17831986,
- "currentLine": 375071993,
- "nextLine": -302271028,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 366,
- "endLine": 366,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1830091254,
- "currentLine": 1659810392,
- "nextLine": 1428719,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 286,
- "endLine": 286,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027typeInfo.GenericArgs[0]\u0027 object was used after it was verified against null. Check lines: 366, 286.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 536,
- "endLine": 536,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 30636,
- "currentLine": -1139625551,
- "nextLine": 76,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: _shear.Y \u003d\u003d 0. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Constants.cs",
- "line": 49,
- "endLine": 49,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 39528297,
- "nextLine": 1423272038,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3176",
- "cwe": 570,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Program.cs",
- "line": 131,
- "endLine": 131,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 788124921,
- "currentLine": -1951352535,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "The \u0027|\u003d\u0027 operator is redundant because the right operand \u0027DepsBuilder.Run()\u0027 is always false.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\Previews\\MaterialPreview.cs",
- "line": 110,
- "endLine": 110,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 375072814,
- "nextLine": 171986697,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Common\\RichTextBox.Tags.cs",
- "line": 213,
- "endLine": 213,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1830805086,
- "nextLine": 730945,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027Alignments\u0027 enum are used in bitwise operations. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3053",
- "cwe": 0,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\DotNet\\DotNetAOT.cs",
- "line": 574,
- "endLine": 574,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 956869692,
- "currentLine": -1965392317,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An excessive expression. Examine the substrings \u0027System.Reflection.Emit\u0027 and \u0027System.Reflection.Emit.ILGeneration\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\ReorderTrackAction.cs",
- "line": 25,
- "endLine": 25,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1559596790,
- "currentLine": 1176442518,
- "nextLine": 398784235,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027track\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Debug\\FloatComparer.cs",
- "line": 98,
- "endLine": 98,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 47013437,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: expected \u003d\u003d actual. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3130",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Utilities\\ShuntingYardParser.cs",
- "line": 237,
- "endLine": 237,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -619770676,
- "currentLine": -1025911625,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Priority of the \u0027\u0026\u0026\u0027 operator is higher than that of the \u0027||\u0027 operator. Possible missing parentheses.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3039",
- "cwe": 39,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependency.cs",
- "line": 383,
- "endLine": 383,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1717980449,
- "currentLine": -2028201774,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Consider inspecting the \u0027Exists\u0027 method call. Defining an absolute path to the file or directory is considered a poor style.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3072",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\MaterialInstanceWindow.cs",
- "line": 25,
- "endLine": 25,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1559036708,
- "currentLine": -1382461101,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Windows\\Assets\\MaterialInstanceWindow.cs",
- "line": 369,
- "endLine": 369,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027MaterialInstanceWindow\u0027 class containing IDisposable members does not itself implement IDisposable. Inspect: _undo.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Platforms\\Windows\\WindowsToolchainBase.cs",
- "line": 499,
- "endLine": 499,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 284495266,
- "currentLine": 11982701,
- "nextLine": 147527529,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027useSeparatePdb\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3163",
- "cwe": 1069,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 865,
- "endLine": 865,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 1094,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "An empty exception handler. Silent suppression of exceptions may hide the presence of bugs or vulnerabilities.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3140",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Control.Bounds.cs",
- "line": 34,
- "endLine": 34,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -648321897,
- "currentLine": 5965804,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Property accessors use different backing fields.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Docking\\DockPanel.cs",
- "line": 253,
- "endLine": 253,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 25472443,
- "currentLine": 2080896135,
- "nextLine": 48748425,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: _tabs.Count \u003e 0.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3097",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Undo\\Actions\\TransformObjectsAction.cs",
- "line": 24,
- "endLine": 24,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 795687,
- "currentLine": 383596687,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Undo\\Actions\\TransformObjectsAction.cs",
- "line": 29,
- "endLine": 29,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible exception: the \u0027DataStorage\u0027 type marked by [Serializable] contains non-serializable members not marked by [NonSerialized].",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3164",
- "cwe": 544,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Utilities\\BuildException.cs",
- "line": 7,
- "endLine": 7,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1272756102,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Exception classes should be publicly accessible.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 2072,
- "endLine": 2072,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1619945910,
- "currentLine": 1915418429,
- "nextLine": 390613,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027value\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Projects\\VisualStudio\\VisualStudioProjectGenerator.cs",
- "line": 666,
- "endLine": 666,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 171107081,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027!useResharperBuild\u0027 is always true.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Plane.cs",
- "line": 590,
- "endLine": 590,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 196442114,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: D \u003d\u003d value.D. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Particles.cs",
- "line": 308,
- "endLine": 308,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -1584616506,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\GUI\\GradientEditor.cs",
- "line": 132,
- "endLine": 132,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1879261150,
- "nextLine": 88117,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027base.OnMouseDoubleClick(location, button)\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3146",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\ProjectInfo.cs",
- "line": 263,
- "endLine": 263,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 358568557,
- "currentLine": 1287588840,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Build\\Builder.Rules.cs",
- "line": 99,
- "endLine": 99,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of \u0027rules.GetModule(x)\u0027 return value. The \u0027Modules.FirstOrDefault\u0027 can return default null value.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3125",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\CommandLine.cs",
- "line": 473,
- "endLine": 473,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -990053914,
- "currentLine": -1501958204,
- "nextLine": 1965447114,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\CommandLine.cs",
- "line": 465,
- "endLine": 465,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027option.Value\u0027 object was used after it was verified against null. Check lines: 473, 465.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurface.ContextMenu.cs",
- "line": 400,
- "endLine": 400,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": 39528297,
- "nextLine": 0,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3203",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\UI\\GUI\\Tooltip.cs",
- "line": 51,
- "endLine": 51,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 570354633,
- "currentLine": -987398062,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Method parameter is not used: targetArea.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3008",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Media.cs",
- "line": 544,
- "endLine": 544,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1377895587,
- "nextLine": 1238651214,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Media.cs",
- "line": 540,
- "endLine": 540,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027_startFrame\u0027 variable is assigned values twice successively. Perhaps this is a mistake. Check lines: 544, 540.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Track.cs",
- "line": 1081,
- "endLine": 1081,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 39528297,
- "nextLine": -1054278586,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\SurfaceUtils.cs",
- "line": 425,
- "endLine": 425,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 976826205,
- "currentLine": -1528170778,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Scripting\\TypeUtils.cs",
- "line": 395,
- "endLine": 395,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference inside method at \u0027type.BaseType\u0027. Consider inspecting the 1st argument: managedType.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3105",
- "cwe": 690,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\States\\LoadingState.cs",
- "line": 60,
- "endLine": 60,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1338394200,
- "currentLine": 1758154160,
- "nextLine": -1018788951,
- "columns": 0
- }
- }
- ],
- "message": "The result of null-conditional operator is passed as the first argument to the \u0027Combine\u0027 method and is not expected to be null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.CSharp.cs",
- "line": 1815,
- "endLine": 1815,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -72950041,
- "nextLine": 890357,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027buildData.Target\u0027.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3117",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\RenameTrackAction.cs",
- "line": 11,
- "endLine": 11,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -609472751,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Constructor parameter \u0027track\u0027 is not used.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\EditorViewport.cs",
- "line": 2055,
- "endLine": 2055,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -1425279375,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: b !\u003d null.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\ParticleModules.cs",
- "line": 367,
- "endLine": 367,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 125,
- "currentLine": -1584616506,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3002",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Gizmo\\TransformGizmoBase.cs",
- "line": 144,
- "endLine": 144,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 532890,
- "currentLine": 750097643,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "The switch statement does not cover all values of the \u0027PivotType\u0027 enum: WorldOrigin.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\SceneGraphNode.cs",
- "line": 25,
- "endLine": 25,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 890357,
- "currentLine": 355346426,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\SceneGraphNode.cs",
- "line": 450,
- "endLine": 450,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027SceneGraphNode\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Material.cs",
- "line": 234,
- "endLine": 234,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 183841,
- "currentLine": 907932904,
- "nextLine": 1413683,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027function\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3139",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\nethost.cs",
- "line": 339,
- "endLine": 339,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 330356367,
- "currentLine": 2030477402,
- "nextLine": 2337,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Deps\\Dependencies\\nethost.cs",
- "line": 342,
- "endLine": 342,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two or more case-branches perform the same actions.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 606,
- "endLine": 606,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1059010338,
- "currentLine": 10823529,
- "nextLine": -2114483551,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3013",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 465,
- "endLine": 465,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": 2048639584,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Dedicated\\SplineEditor.cs",
- "line": 470,
- "endLine": 470,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "It is odd that the body of \u0027CanSetAllTangentsSmooth\u0027 function is fully equivalent to the body of \u0027CanSetAllTangentsLinear\u0027 function (465, line 470).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3024",
- "cwe": 682,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Scripting\\ScriptType.cs",
- "line": 417,
- "endLine": 417,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 1617402118,
- "nextLine": 551838811,
- "columns": 0
- }
- }
- ],
- "message": "An odd precise comparison: asFloat \u003d\u003d float.MaxValue. Consider using a comparison with defined precision: Math.Abs(A - B) \u003c Epsilon.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 538,
- "endLine": 538,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1108266486,
- "currentLine": 10823529,
- "nextLine": 595003537,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3196",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\VisjectSurfaceWindow.cs",
- "line": 637,
- "endLine": 637,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -531989313,
- "currentLine": 1113546383,
- "nextLine": 39233,
- "columns": 0
- }
- }
- ],
- "message": "The \u0027index\u0027 parameter is not utilized inside the method body, but an identifier with a similar name is used inside the same method.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\CustomEditors\\Editors\\DictionaryEditor.cs",
- "line": 50,
- "endLine": 50,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 46874835,
- "currentLine": 39528297,
- "nextLine": -658370295,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\SceneGraph\\Actors\\StaticModelNode.cs",
- "line": 175,
- "endLine": 175,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 588604617,
- "currentLine": -529961342,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027collisionDataProxy\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3137",
- "cwe": 563,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Windows\\Profiler\\Assets.cs",
- "line": 289,
- "endLine": 289,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 26501823,
- "currentLine": -678375373,
- "nextLine": -874279451,
- "columns": 0
- }
- }
- ],
- "message": "The \u0027b\u0027 variable is assigned but is not used by the end of the function.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3022",
- "cwe": 570,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Tree\\TreeNode.cs",
- "line": 566,
- "endLine": 566,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 21252149,
- "currentLine": 699150524,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Expression \u0027_dragOverMode \u003d\u003d DragItemPositioning.None\u0027 is always false.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3059",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Cache\\Intermediate\\FlaxEditor\\Windows\\x64\\Development\\Core\\Core.Bindings.Gen.cs",
- "line": 797,
- "endLine": 797,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 102185,
- "currentLine": 5970129,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Members of the \u0027LogType\u0027 enum are powers of 2. Consider adding \u0027[Flags]\u0027 attribute to the enum.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\GUI\\Timeline\\Undo\\EditTrackAction.cs",
- "line": 41,
- "endLine": 41,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": -573042562,
- "nextLine": 148157648,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027track\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 641,
- "endLine": 641,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 992483961,
- "currentLine": 10823529,
- "nextLine": -805283227,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Function.cs",
- "line": 704,
- "endLine": 704,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 435035580,
- "currentLine": -249367255,
- "nextLine": 125,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Editor\\Surface\\Elements\\Box.cs",
- "line": 758,
- "endLine": 758,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Possible null dereference of \u0027node.GetBox(0)\u0027 method return value at \u0027end.IsOutput\u0027 when it is passed to method as its 1st argument.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Animation.StateMachine.cs",
- "line": 785,
- "endLine": 785,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 2116578757,
- "currentLine": 341518184,
- "nextLine": 1777121892,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3107",
- "cwe": 0,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Viewport\\PrefabWindowViewport.cs",
- "line": 392,
- "endLine": 392,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1379169572,
- "currentLine": -1236601848,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Identical expression \u0027trans.Orientation\u0027 to the left and to the right of compound assignment.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Content\\Proxy\\AudioClipProxy.cs",
- "line": 47,
- "endLine": 47,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 123,
- "currentLine": 21882333,
- "nextLine": -108351383,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference. Consider inspecting \u0027asset\u0027.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3074",
- "cwe": 0,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
- "line": 29,
- "endLine": 29,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -1404299080,
- "nextLine": 123,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Serialization\\JsonSerializer.cs",
- "line": 221,
- "endLine": 221,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027JsonSerializer\u0027 class contains \u0027Dispose\u0027 method. Consider making it implement \u0027IDisposable\u0027 interface.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3063",
- "cwe": 571,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 2257,
- "endLine": 2257,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -1816815087,
- "currentLine": 1423458500,
- "nextLine": -1254532193,
- "columns": 0
- }
- }
- ],
- "message": "A part of conditional expression is always true if it is evaluated: useScripting.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3164",
- "cwe": 544,
- "level": 3,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Engine\\NativeInterop.cs",
- "line": 1905,
- "endLine": 1905,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -1579687328,
- "nextLine": 123,
- "columns": 0
- }
- }
- ],
- "message": "Exception classes should be publicly accessible.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 754,
- "endLine": 754,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -642909595,
- "currentLine": -195310750,
- "nextLine": -833661014,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3010",
- "cwe": 252,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Modules\\UIModule.cs",
- "line": 621,
- "endLine": 621,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": -34239414,
- "currentLine": 10823529,
- "nextLine": -551020075,
- "columns": 0
- }
- }
- ],
- "message": "The return value of function \u0027AddSeparator\u0027 is required to be utilized.",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3095",
- "cwe": 476,
- "level": 1,
- "positions": [
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 722,
- "endLine": 722,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 0,
- "currentLine": -1681340331,
- "nextLine": 22548713,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Tools\\Flax.Build\\Bindings\\BindingsGenerator.Cpp.cs",
- "line": 727,
- "endLine": 727,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "The \u0027typeInfo.GenericArgs\u0027 object was used before it was verified against null. Check lines: 722, 727.",
- "projects": [
- "Flax.Build"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3127",
- "cwe": 682,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Float3.cs",
- "line": 1357,
- "endLine": 1357,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 69893321,
- "currentLine": 69909711,
- "nextLine": 69942487,
- "columns": 0
- }
- },
- {
- "file": "|?|\\Source\\Engine\\Core\\Math\\Float3.cs",
- "line": 1358,
- "endLine": 1358,
- "column": 1,
- "endColumn": 1
- }
- ],
- "message": "Two similar code fragments were found. Perhaps, this is a typo and \u0027y\u0027 variable should be used instead of \u0027z\u0027",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- },
- {
- "code": "V3080",
- "cwe": 476,
- "level": 2,
- "positions": [
- {
- "file": "|?|\\Source\\Editor\\Surface\\Archetypes\\Comparisons.cs",
- "line": 71,
- "endLine": 71,
- "column": 1,
- "endColumn": 1,
- "navigation": {
- "previousLine": 1030593,
- "currentLine": 541961234,
- "nextLine": 125,
- "columns": 0
- }
- }
- ],
- "message": "Possible null dereference of method return value. Consider inspecting: GetBox(...).",
- "projects": [
- "FlaxEngine"
- ],
- "favorite": false,
- "falseAlarm": false
- }
- ]
-}
\ No newline at end of file
From 2e395ff58eab99430a1f2ab10fe036d60537d1c3 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 15:37:22 -0500
Subject: [PATCH 058/114] Add log for deleting module generated files.
---
Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index 8f6d4a17f..bed15f7cc 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -477,6 +477,7 @@ namespace FlaxEditor.Modules.SourceCodeEditing
fileName.Equals($"{className}.Gen.h", StringComparison.OrdinalIgnoreCase))
{
File.Delete(file);
+ Editor.Log($"Deleted generated modules file for module: {className}. File path {file}");
}
}
}
From 24a5a4df4519af4dcf56f9646af42f74f42108d3 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 16:20:53 -0500
Subject: [PATCH 059/114] Use Ordinal string comparisions
---
.../SourceCodeEditing/CodeEditingModule.cs | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index bed15f7cc..457328d0f 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -453,15 +453,15 @@ namespace FlaxEditor.Modules.SourceCodeEditing
var newText = targetText;
bool removedModuleText = false;
- if (targetText.Contains($"Modules.Add(\"{className}\")"))
+ if (targetText.Contains($"Modules.Add(\"{className}\")", StringComparison.Ordinal))
{
- newText = newText.Replace($"Modules.Add(\"{className}\")\n", "").Replace($"Modules.Add(\"{className}\")", "");
+ newText = newText.Replace($"Modules.Add(\"{className}\")\n", "", StringComparison.Ordinal).Replace($"Modules.Add(\"{className}\")", "", StringComparison.Ordinal);
removedModuleText = true;
}
- if (targetText.Contains($"Modules.Add(nameof({className}))"))
+ if (targetText.Contains($"Modules.Add(nameof({className}))", StringComparison.Ordinal))
{
- newText = newText.Replace($"Modules.Add(nameof({className}))\n", "").Replace($"Modules.Add(nameof({className}))", "");
+ newText = newText.Replace($"Modules.Add(nameof({className}))\n", "", StringComparison.Ordinal).Replace($"Modules.Add(nameof({className}))", "", StringComparison.Ordinal);
removedModuleText = true;
}
if (removedModuleText)
@@ -471,10 +471,10 @@ namespace FlaxEditor.Modules.SourceCodeEditing
}
}
// Remove Generated module files
- else if (fileName.Equals($"{className}.csproj", StringComparison.OrdinalIgnoreCase) ||
- fileName.Equals($"{className}.Gen.cs", StringComparison.OrdinalIgnoreCase) ||
- fileName.Equals($"{className}.Gen.cpp", StringComparison.OrdinalIgnoreCase) ||
- fileName.Equals($"{className}.Gen.h", StringComparison.OrdinalIgnoreCase))
+ else if (fileName.Equals($"{className}.csproj", StringComparison.Ordinal) ||
+ fileName.Equals($"{className}.Gen.cs", StringComparison.Ordinal) ||
+ fileName.Equals($"{className}.Gen.cpp", StringComparison.Ordinal) ||
+ fileName.Equals($"{className}.Gen.h", StringComparison.Ordinal))
{
File.Delete(file);
Editor.Log($"Deleted generated modules file for module: {className}. File path {file}");
From 838cb9f2ced4aad61ee630b52362462ad96ddfba Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Tue, 27 Aug 2024 23:37:28 +0200
Subject: [PATCH 060/114] Fix object reference empty text clipping
---
Source/Editor/CustomEditors/Editors/FlaxObjectRefEditor.cs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Source/Editor/CustomEditors/Editors/FlaxObjectRefEditor.cs b/Source/Editor/CustomEditors/Editors/FlaxObjectRefEditor.cs
index bc31cd10b..fd367d21f 100644
--- a/Source/Editor/CustomEditors/Editors/FlaxObjectRefEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/FlaxObjectRefEditor.cs
@@ -208,7 +208,9 @@ namespace FlaxEditor.CustomEditors.Editors
else
{
// Draw info
+ Render2D.PushClip(nameRect);
Render2D.DrawText(style.FontMedium, Type != null ? $"None ({Utilities.Utils.GetPropertyNameUI(Type.ToString())})" : "-", nameRect, isEnabled ? style.ForegroundGrey : style.ForegroundGrey.AlphaMultiplied(0.75f), TextAlignment.Near, TextAlignment.Center);
+ Render2D.PopClip();
}
// Draw picker button
From cd4bd5efe0c5b5b7b05de7016b0fff5d283ae8ed Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Tue, 27 Aug 2024 23:38:11 +0200
Subject: [PATCH 061/114] Fix duplicate action active state for nodes that dont
allow it in Visject graph
#2243
---
Source/Editor/Surface/VisjectSurface.ContextMenu.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Surface/VisjectSurface.ContextMenu.cs b/Source/Editor/Surface/VisjectSurface.ContextMenu.cs
index 604394769..d086aa851 100644
--- a/Source/Editor/Surface/VisjectSurface.ContextMenu.cs
+++ b/Source/Editor/Surface/VisjectSurface.ContextMenu.cs
@@ -326,7 +326,7 @@ namespace FlaxEditor.Surface
_cmCopyButton = menu.AddButton("Copy", Copy);
menu.AddButton("Paste", Paste).Enabled = CanEdit && CanPaste();
_cmDuplicateButton = menu.AddButton("Duplicate", Duplicate);
- _cmDuplicateButton.Enabled = CanEdit;
+ _cmDuplicateButton.Enabled = CanEdit && selection.Any(node => (node.Archetype.Flags & NodeFlags.NoSpawnViaPaste) == 0);
var canRemove = CanEdit && selection.All(node => (node.Archetype.Flags & NodeFlags.NoRemove) == 0);
menu.AddButton("Cut", Cut).Enabled = canRemove;
menu.AddButton("Delete", Delete).Enabled = canRemove;
From 1546d97b2f63a6d77c98cdb90cfe04148110b9f2 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 27 Aug 2024 21:38:57 -0500
Subject: [PATCH 062/114] Add removing semi colons from targets.
---
Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index 457328d0f..b98798e6a 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -455,13 +455,13 @@ namespace FlaxEditor.Modules.SourceCodeEditing
bool removedModuleText = false;
if (targetText.Contains($"Modules.Add(\"{className}\")", StringComparison.Ordinal))
{
- newText = newText.Replace($"Modules.Add(\"{className}\")\n", "", StringComparison.Ordinal).Replace($"Modules.Add(\"{className}\")", "", StringComparison.Ordinal);
+ newText = newText.Replace($"Modules.Add(\"{className}\");\n", "", StringComparison.Ordinal).Replace($"Modules.Add(\"{className}\");", "", StringComparison.Ordinal);
removedModuleText = true;
}
if (targetText.Contains($"Modules.Add(nameof({className}))", StringComparison.Ordinal))
{
- newText = newText.Replace($"Modules.Add(nameof({className}))\n", "", StringComparison.Ordinal).Replace($"Modules.Add(nameof({className}))", "", StringComparison.Ordinal);
+ newText = newText.Replace($"Modules.Add(nameof({className}));\n", "", StringComparison.Ordinal).Replace($"Modules.Add(nameof({className}));", "", StringComparison.Ordinal);
removedModuleText = true;
}
if (removedModuleText)
From 046865ba00ef8edb1dad844333cb73ed652906d7 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 28 Aug 2024 15:06:19 +0200
Subject: [PATCH 063/114] Fix Multi Blend 2D animation indices outside the
blend space
#2553
---
.../Animations/Graph/AnimGroup.Animation.cpp | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp b/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp
index 831561d35..2103bb8cd 100644
--- a/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp
+++ b/Source/Engine/Animations/Graph/AnimGroup.Animation.cpp
@@ -1421,6 +1421,7 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
const auto cData = node->Values[4 + c * 2].AsFloat4();
// Get triangle coords
+ byte anims[3] = { a, b, c };
Float2 points[3] = {
Float2(aData.X, aData.Y),
Float2(bData.X, bData.Y),
@@ -1534,18 +1535,11 @@ void AnimGraphExecutor::ProcessGroupAnimation(Box* boxBase, Node* nodeBase, Valu
bestPoint = closest;
hasBest = true;
- float d = Float2::Distance(s[0], s[1]);
- if (Math::IsZero(d))
- {
- bestWeight = 0;
- }
- else
- {
- bestWeight = Float2::Distance(s[0], closest) / d;
- }
-
- bestAnims[0] = j;
- bestAnims[1] = (j + 1) % 3;
+ const float d = Float2::Distance(s[0], s[1]);
+ bestWeight = d < ANIM_GRAPH_BLEND_THRESHOLD ? 0 : Float2::Distance(s[0], closest) / d;
+
+ bestAnims[0] = anims[j];
+ bestAnims[1] = anims[(j + 1) % 3];
}
}
}
From 0dbcdc3217e03d578f995bb29a1b5f9edda17fbd Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 28 Aug 2024 15:23:10 +0200
Subject: [PATCH 064/114] Add enlarging debug point of current blend value in
Multi blend nodes in Anim Graph window
---
.../Editor/Surface/Archetypes/Animation.MultiBlend.cs | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs b/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs
index c3bf7d0a5..f76faa794 100644
--- a/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs
+++ b/Source/Editor/Surface/Archetypes/Animation.MultiBlend.cs
@@ -23,6 +23,7 @@ namespace FlaxEditor.Surface.Archetypes
private readonly bool _is2D;
private Float2 _rangeX, _rangeY;
private Float2 _debugPos = Float2.Minimum;
+ private float _debugScale = 1.0f;
private readonly List _blendPoints = new List();
///
@@ -445,6 +446,7 @@ namespace FlaxEditor.Surface.Archetypes
// Debug current playback position
if (((AnimGraphSurface)_node.Surface).TryGetTraceEvent(_node, out var traceEvent))
{
+ var prev = _debugPos;
if (_is2D)
{
unsafe
@@ -456,10 +458,17 @@ namespace FlaxEditor.Surface.Archetypes
}
else
_debugPos = new Float2(traceEvent.Value, 0.0f);
+
+ // Scale debug pointer when it moves to make it more visible when investigating blending
+ const float debugMaxSize = 2.0f;
+ float debugScale = Mathf.Saturate(Float2.Distance(ref _debugPos, ref prev) / new Float2(_rangeX.Absolute.ValuesSum, _rangeY.Absolute.ValuesSum).Length * 100.0f) * debugMaxSize + 1.0f;
+ float debugBlendSpeed = _debugScale <= debugScale ? 4.0f : 1.0f;
+ _debugScale = Mathf.Lerp(_debugScale, debugScale, deltaTime * debugBlendSpeed);
}
else
{
_debugPos = Float2.Minimum;
+ _debugScale = 1.0f;
}
base.Update(deltaTime);
@@ -606,7 +615,7 @@ namespace FlaxEditor.Surface.Archetypes
{
// Draw dot with outline
var icon = Editor.Instance.Icons.VisjectBoxOpen32;
- var size = BlendPoint.DefaultSize;
+ var size = BlendPoint.DefaultSize * _debugScale;
var debugPos = BlendSpacePosToBlendPointPos(_debugPos);
var debugRect = new Rectangle(debugPos + new Float2(size * -0.5f) + size * 0.5f, new Float2(size));
var outline = Color.Black; // Shadow
From 353315bb43ddc50c44b10d5039ecd54a13641894 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 28 Aug 2024 15:49:37 +0200
Subject: [PATCH 065/114] Grey-out value box slider icon when control is
disabled
---
Source/Editor/GUI/Input/ValueBox.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/GUI/Input/ValueBox.cs b/Source/Editor/GUI/Input/ValueBox.cs
index d10a1e51c..9619f82a0 100644
--- a/Source/Editor/GUI/Input/ValueBox.cs
+++ b/Source/Editor/GUI/Input/ValueBox.cs
@@ -195,7 +195,7 @@ namespace FlaxEditor.GUI.Input
var style = Style.Current;
// Draw sliding UI
- Render2D.DrawSprite(style.Scalar, SlideRect, style.Foreground);
+ Render2D.DrawSprite(style.Scalar, SlideRect, EnabledInHierarchy ? style.Foreground : style.ForegroundDisabled);
// Check if is sliding
if (_isSliding)
From 1864574a92e083da413b75b3b4ff07c83ae5d739 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 28 Aug 2024 16:24:51 +0200
Subject: [PATCH 066/114] Fix missing integer and double math node
implementation in Visject
#2359
---
Source/Engine/Visject/GraphUtilities.cpp | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/Source/Engine/Visject/GraphUtilities.cpp b/Source/Engine/Visject/GraphUtilities.cpp
index e32e280d5..4aaeb01fe 100644
--- a/Source/Engine/Visject/GraphUtilities.cpp
+++ b/Source/Engine/Visject/GraphUtilities.cpp
@@ -409,9 +409,24 @@ void GraphUtilities::ApplySomeMathHere(Variant& v, Variant& a, Variant& b, MathO
case VariantType::Uint:
v.AsUint = (uint32)op((float)a.AsUint, (float)b.AsUint);
break;
+ case VariantType::Int64:
+ v.AsUint = (int64)op((float)a.AsInt64, (float)b.AsInt64);
+ break;
+ case VariantType::Uint64:
+ v.AsUint = (uint64)op((float)a.AsUint64, (float)b.AsUint64);
+ break;
+ case VariantType::Int16:
+ v.AsUint = (int16)op((float)a.AsInt16, (float)b.AsInt16);
+ break;
+ case VariantType::Uint16:
+ v.AsUint = (uint16)op((float)a.AsUint16, (float)b.AsUint16);
+ break;
case VariantType::Float:
v.AsFloat = op(a.AsFloat, b.AsFloat);
break;
+ case VariantType::Double:
+ v.AsDouble = op((float)a.AsDouble, (float)b.AsDouble);
+ break;
case VariantType::Float2:
{
Float2& vv = *(Float2*)v.AsData;
From f3f7d4a03413610f44428a92d00127e92534918b Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 28 Aug 2024 16:36:08 +0200
Subject: [PATCH 067/114] Fix incorrect network RPC sending when target client
ids list is provided but is empty
#2272
---
Source/Engine/Networking/NetworkReplicator.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Source/Engine/Networking/NetworkReplicator.cpp b/Source/Engine/Networking/NetworkReplicator.cpp
index 8446f9ac3..2bb0d22b6 100644
--- a/Source/Engine/Networking/NetworkReplicator.cpp
+++ b/Source/Engine/Networking/NetworkReplicator.cpp
@@ -1503,6 +1503,8 @@ NetworkStream* NetworkReplicator::BeginInvokeRPC()
bool NetworkReplicator::EndInvokeRPC(ScriptingObject* obj, const ScriptingTypeHandle& type, const StringAnsiView& name, NetworkStream* argsStream, Span targetIds)
{
+ if (targetIds.IsValid() && targetIds.Length() == 0)
+ return true; // Target list is provided, but it's empty so nobody will get this RPC
Scripting::ObjectsLookupIdMapping.Set(nullptr);
const NetworkRpcInfo* info = NetworkRpcInfo::RPCsTable.TryGet(NetworkRpcName(type, name));
if (!info || !obj || NetworkManager::IsOffline())
From a1745e25a1de226901b1d307da270f8230cce8c0 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 28 Aug 2024 16:48:52 +0200
Subject: [PATCH 068/114] Fix `Input::AxisValueChanged` event to properly
handle value changes when using keyboard
#2393
---
Source/Engine/Input/Input.cpp | 33 ++++++++++-----------------------
1 file changed, 10 insertions(+), 23 deletions(-)
diff --git a/Source/Engine/Input/Input.cpp b/Source/Engine/Input/Input.cpp
index 7d267f21b..d1ccd367e 100644
--- a/Source/Engine/Input/Input.cpp
+++ b/Source/Engine/Input/Input.cpp
@@ -27,32 +27,18 @@ struct AxisEvaluation
struct ActionData
{
- bool Active;
- uint64 FrameIndex;
- InputActionState State;
-
- ActionData()
- {
- Active = false;
- FrameIndex = 0;
- State = InputActionState::Waiting;
- }
+ bool Active = false;
+ uint64 FrameIndex = 0;
+ InputActionState State = InputActionState::Waiting;
};
struct AxisData
{
- float Value;
- float ValueRaw;
- float PrevKeyValue;
- uint64 FrameIndex;
-
- AxisData()
- {
- Value = 0.0f;
- ValueRaw = 0.0f;
- PrevKeyValue = 0.0f;
- FrameIndex = 0;
- }
+ float Value = 0.0f;
+ float ValueRaw = 0.0f;
+ float PrevValue = 0.0f;
+ float PrevKeyValue = 0.0f;
+ uint64 FrameIndex = 0;
};
namespace InputImpl
@@ -990,6 +976,7 @@ void InputService::Update()
// Setup axis data
data.PrevKeyValue = e.PrevKeyValue;
+ data.PrevValue = data.Value;
data.ValueRaw = e.RawValue;
data.Value = e.Value;
@@ -1025,7 +1012,7 @@ void InputService::Update()
{
for (auto i = Axes.Begin(); i.IsNotEnd(); ++i)
{
- if (Math::NotNearEqual(i->Value.Value, i->Value.PrevKeyValue))
+ if (Math::NotNearEqual(i->Value.Value, i->Value.PrevValue))
{
Input::AxisValueChanged(i->Key);
}
From ca0fb8cf630a23b9f6d90349247a7c1d8d5ead26 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 28 Aug 2024 17:14:22 +0200
Subject: [PATCH 069/114] Fix missing scenes saving when entering play mode in
full game mode
#2465
---
Source/Editor/Modules/SimulationModule.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Source/Editor/Modules/SimulationModule.cs b/Source/Editor/Modules/SimulationModule.cs
index fecfcfdd6..6f54ab10d 100644
--- a/Source/Editor/Modules/SimulationModule.cs
+++ b/Source/Editor/Modules/SimulationModule.cs
@@ -145,6 +145,10 @@ namespace FlaxEditor.Modules
return;
}
+ // Save any modified scenes to prevent loosing local changes
+ if (Editor.Scene.IsEdited())
+ Level.SaveAllScenes();
+
// Load scenes after entering the play mode
_scenesToReload = new Guid[Level.ScenesCount];
for (int i = 0; i < _scenesToReload.Length; i++)
From ec412d9be0b1343e443af202cc8672272804da28 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 28 Aug 2024 23:42:59 +0200
Subject: [PATCH 070/114] Fix undo-redo for `JsonAssetReference` in Editor
#2711
---
Source/Editor/Scripting/ScriptType.cs | 13 +++++++
Source/Engine/Content/JsonAssetReference.cs | 35 +++++++++++++++++++
Source/Engine/Serialization/JsonConverters.cs | 2 +-
3 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/Source/Editor/Scripting/ScriptType.cs b/Source/Editor/Scripting/ScriptType.cs
index 6d9db8ad6..ec3775b95 100644
--- a/Source/Editor/Scripting/ScriptType.cs
+++ b/Source/Editor/Scripting/ScriptType.cs
@@ -2,6 +2,7 @@
using System;
using System.Collections.Generic;
+using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
@@ -671,6 +672,18 @@ namespace FlaxEditor.Scripting
/// The new member value.
public void SetValue(object obj, object value)
{
+ // Perform automatic conversion if type supports it
+ var type = ValueType.Type;
+ var valueType = value?.GetType();
+ if (valueType != null && type != null && valueType != type)
+ {
+ var converter = TypeDescriptor.GetConverter(type);
+ if (converter.CanConvertTo(type))
+ value = converter.ConvertTo(value, type);
+ else if (converter.CanConvertFrom(valueType))
+ value = converter.ConvertFrom(null, null, value);
+ }
+
if (_managed is PropertyInfo propertyInfo)
propertyInfo.SetValue(obj, value);
else if (_managed is FieldInfo fieldInfo)
diff --git a/Source/Engine/Content/JsonAssetReference.cs b/Source/Engine/Content/JsonAssetReference.cs
index 59cf55cc1..86ad9a087 100644
--- a/Source/Engine/Content/JsonAssetReference.cs
+++ b/Source/Engine/Content/JsonAssetReference.cs
@@ -1,6 +1,10 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
+#if FLAX_EDITOR
+using System.ComponentModel;
+using System.Globalization;
+#endif
using System.Runtime.CompilerServices;
namespace FlaxEngine
@@ -11,6 +15,7 @@ namespace FlaxEngine
/// Type of the asset instance type.
#if FLAX_EDITOR
[CustomEditor(typeof(FlaxEditor.CustomEditors.Editors.AssetRefEditor))]
+ [TypeConverter(typeof(TypeConverters.JsonAssetReferenceConverter))]
#endif
[Newtonsoft.Json.JsonConverter(typeof(Json.JsonAssetReferenceConverter))]
public struct JsonAssetReference : IComparable, IComparable>, IEquatable>
@@ -141,3 +146,33 @@ namespace FlaxEngine
}
}
}
+
+#if FLAX_EDITOR
+namespace FlaxEngine.TypeConverters
+{
+ internal class JsonAssetReferenceConverter : TypeConverter
+ {
+ ///
+ public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
+ {
+ if (value is string valueStr)
+ {
+ var result = Activator.CreateInstance(destinationType);
+ Json.JsonSerializer.ParseID(valueStr, out var id);
+ var asset = Content.LoadAsync(id);
+ destinationType.GetField("Asset").SetValue(result, asset);
+ return result;
+ }
+ return base.ConvertTo(context, culture, value, destinationType);
+ }
+
+ ///
+ public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
+ {
+ if (destinationType.Name.StartsWith("JsonAssetReference", StringComparison.Ordinal))
+ return true;
+ return base.CanConvertTo(context, destinationType);
+ }
+ }
+}
+#endif
diff --git a/Source/Engine/Serialization/JsonConverters.cs b/Source/Engine/Serialization/JsonConverters.cs
index 5be6a6a53..04a20fdb4 100644
--- a/Source/Engine/Serialization/JsonConverters.cs
+++ b/Source/Engine/Serialization/JsonConverters.cs
@@ -479,7 +479,7 @@ namespace FlaxEngine.Json
///
public override bool CanConvert(Type objectType)
{
- return objectType.Name.StartsWith("JsonAssetReference");
+ return objectType.Name.StartsWith("JsonAssetReference", StringComparison.Ordinal);
}
}
From 2ff6437a92a8844fc7c4075733661ca6e6ca86c7 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Wed, 28 Aug 2024 20:58:24 -0500
Subject: [PATCH 071/114] Clean up JsonAssetWindow options cm if it exists.
---
Source/Editor/Windows/Assets/JsonAssetWindow.cs | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/Source/Editor/Windows/Assets/JsonAssetWindow.cs b/Source/Editor/Windows/Assets/JsonAssetWindow.cs
index 43b34a8c6..c1ce59f75 100644
--- a/Source/Editor/Windows/Assets/JsonAssetWindow.cs
+++ b/Source/Editor/Windows/Assets/JsonAssetWindow.cs
@@ -242,8 +242,11 @@ namespace FlaxEditor.Windows.Assets
private void OpenOptionsContextMenu()
{
- if (_optionsCM != null && _optionsCM.ContainsFocus)
- return;
+ if (_optionsCM != null)
+ {
+ _optionsCM.Hide();
+ _optionsCM.Dispose();
+ }
_optionsCM = new ContextMenu();
_optionsCM.AddButton("Copy type name", () => Clipboard.Text = Asset.DataTypeName);
From e925af534ebaa093a49f772990bf3a637e0cadaf Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 29 Aug 2024 09:53:22 +0200
Subject: [PATCH 072/114] Add picking the longest animation from the imported
file instead of the first one as default
#2490
---
Source/Engine/ContentImporters/ImportModel.cpp | 12 +++++++++++-
Source/Engine/Tools/ModelTool/ModelTool.cpp | 4 +++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/Source/Engine/ContentImporters/ImportModel.cpp b/Source/Engine/ContentImporters/ImportModel.cpp
index 6f0a9c626..611b58089 100644
--- a/Source/Engine/ContentImporters/ImportModel.cpp
+++ b/Source/Engine/ContentImporters/ImportModel.cpp
@@ -638,7 +638,17 @@ CreateAssetResult ImportModel::CreateAnimation(CreateAssetContext& context, Mode
// Save animation data
MemoryWriteStream stream(8182);
- const int32 animIndex = options && options->ObjectIndex != -1 ? options->ObjectIndex : 0; // Single animation per asset
+ int32 animIndex = options ? options->ObjectIndex : -1; // Single animation per asset
+ if (animIndex == -1)
+ {
+ // Pick the longest animation by default (eg. to skip ref pose anim if exported as the first one)
+ animIndex = 0;
+ for (int32 i = 1; i < modelData.Animations.Count(); i++)
+ {
+ if (modelData.Animations[i].GetLength() > modelData.Animations[animIndex].GetLength())
+ animIndex = i;
+ }
+ }
if (modelData.Pack2AnimationHeader(&stream, animIndex))
return CreateAssetResult::Error;
if (context.AllocateChunk(0))
diff --git a/Source/Engine/Tools/ModelTool/ModelTool.cpp b/Source/Engine/Tools/ModelTool/ModelTool.cpp
index 296a21827..07cac95bb 100644
--- a/Source/Engine/Tools/ModelTool/ModelTool.cpp
+++ b/Source/Engine/Tools/ModelTool/ModelTool.cpp
@@ -1053,14 +1053,16 @@ bool ModelTool::ImportModel(const String& path, ModelData& data, Options& option
}
if (EnumHasAnyFlags(options.ImportTypes, ImportDataTypes::Animations))
{
+ int32 index = 0;
for (auto& animation : data.Animations)
{
- LOG(Info, "Imported animation '{}' has {} channels, duration: {} frames, frames per second: {}", animation.Name, animation.Channels.Count(), animation.Duration, animation.FramesPerSecond);
+ LOG(Info, "Imported animation '{}' at index {} has {} channels, duration: {} frames ({} seconds), frames per second: {}", animation.Name, index, animation.Channels.Count(), animation.Duration, animation.GetLength(), animation.FramesPerSecond);
if (animation.Duration <= ZeroTolerance || animation.FramesPerSecond <= ZeroTolerance)
{
errorMsg = TEXT("Invalid animation duration.");
return true;
}
+ index++;
}
}
switch (options.Type)
From 62dff3fa20663647a99ec988ae009d4a0ccf1ce1 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Thu, 29 Aug 2024 11:40:30 -0500
Subject: [PATCH 073/114] Update sprite group name when sprite name is changed.
---
Source/Editor/Windows/Assets/SpriteAtlasWindow.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Source/Editor/Windows/Assets/SpriteAtlasWindow.cs b/Source/Editor/Windows/Assets/SpriteAtlasWindow.cs
index 5a3db6a9d..1b60f4257 100644
--- a/Source/Editor/Windows/Assets/SpriteAtlasWindow.cs
+++ b/Source/Editor/Windows/Assets/SpriteAtlasWindow.cs
@@ -6,6 +6,7 @@ using FlaxEditor.Content;
using FlaxEditor.Content.Import;
using FlaxEditor.CustomEditors;
using FlaxEditor.CustomEditors.Editors;
+using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.Scripting;
@@ -133,10 +134,21 @@ namespace FlaxEditor.Windows.Assets
group.Panel.Tag = i;
group.Panel.MouseButtonRightClicked += OnGroupPanelMouseButtonRightClicked;
group.Object(new ListValueContainer(elementType, i, Values));
+
+ var stringNameElement = group.Editors[0].ChildrenEditors.Find(x => x is StringEditor).Layout.Children.Find(x => x is TextBoxElement) as TextBoxElement;
+ if (stringNameElement != null)
+ {
+ stringNameElement.TextBox.TextBoxEditEnd += (textbox) => OnNameChanged(group.Panel, (TextBox)textbox);
+ }
}
}
}
+ private void OnNameChanged(DropPanel panel, TextBox textbox)
+ {
+ panel.HeaderText = textbox.Text;
+ }
+
private void OnGroupPanelMouseButtonRightClicked(DropPanel groupPanel, Float2 location)
{
var menu = new ContextMenu();
From 68eb8b9f212db01edde27d1805abefd53df2100f Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Fri, 30 Aug 2024 12:58:12 +0200
Subject: [PATCH 074/114] Fix properties editor labels positioning
#2530 #2609
---
.../CustomEditors/Editors/CollectionEditor.cs | 22 ++++++++++++++-----
.../CustomEditors/Editors/GenericEditor.cs | 12 +++++-----
.../Editors/LocalizedStringEditor.cs | 6 ++---
.../Container/PropertiesListElement.cs | 9 ++------
.../GUI/CheckablePropertyNameLabel.cs | 2 ++
.../CustomEditors/GUI/PropertiesList.cs | 15 ++++++++++---
.../CustomEditors/GUI/PropertyNameLabel.cs | 13 +++++++++++
.../CustomEditors/LayoutElementsContainer.cs | 15 ++++++++++++-
8 files changed, 68 insertions(+), 26 deletions(-)
diff --git a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
index 7c0670010..5f0ad17c4 100644
--- a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
@@ -53,7 +53,7 @@ namespace FlaxEditor.CustomEditors.Editors
Index = index;
SetupContextMenu += OnSetupContextMenu;
- _arrangeButtonRect = new Rectangle(2, 3, 12, 12);
+ _arrangeButtonRect = new Rectangle(2, 4, 12, 12);
// Extend margin of the label to support a dragging handle.
Margin m = Margin;
@@ -75,7 +75,7 @@ namespace FlaxEditor.CustomEditors.Editors
b = menu.AddButton("Move down", OnMoveDownClicked);
b.Enabled = Index + 1 < Editor.Count && !Editor._readOnly;
-
+
b = menu.AddButton("Remove", OnRemoveClicked);
b.Enabled = !Editor._readOnly;
}
@@ -88,13 +88,12 @@ namespace FlaxEditor.CustomEditors.Editors
_arrangeButtonInUse = false;
}
-
///
public override void Draw()
{
base.Draw();
- var style = FlaxEngine.GUI.Style.Current;
+ var style = FlaxEngine.GUI.Style.Current;
var mousePosition = PointFromScreen(Input.MouseScreenPosition);
var dragBarColor = _arrangeButtonRect.Contains(mousePosition) ? style.Foreground : style.ForegroundGrey;
Render2D.DrawSprite(FlaxEditor.Editor.Instance.Icons.DragBar12, _arrangeButtonRect, _arrangeButtonInUse ? Color.Orange : dragBarColor);
@@ -104,6 +103,14 @@ namespace FlaxEditor.CustomEditors.Editors
}
}
+ ///
+ protected override void OnSizeChanged()
+ {
+ base.OnSizeChanged();
+
+ _arrangeButtonRect.Y = (Height - _arrangeButtonRect.Height) * 0.5f;
+ }
+
private bool ArrangeAreaCheck(out int index, out Rectangle rect)
{
var child = Editor.ChildrenEditors[0];
@@ -278,10 +285,10 @@ namespace FlaxEditor.CustomEditors.Editors
public override void Draw()
{
base.Draw();
+
if (_canReorder)
{
var style = FlaxEngine.GUI.Style.Current;
-
var mousePosition = PointFromScreen(Input.MouseScreenPosition);
var dragBarColor = _arrangeButtonRect.Contains(mousePosition) ? style.Foreground : style.ForegroundGrey;
Render2D.DrawSprite(FlaxEditor.Editor.Instance.Icons.DragBar12, _arrangeButtonRect, _arrangeButtonInUse ? Color.Orange : dragBarColor);
@@ -519,6 +526,7 @@ namespace FlaxEditor.CustomEditors.Editors
(elementType.GetProperties().Length == 1 && elementType.GetFields().Length == 0) ||
elementType.Equals(new ScriptType(typeof(JsonAsset))) ||
elementType.Equals(new ScriptType(typeof(SettingsBase)));
+ bool prevWasNestedPropertiesList = false;
for (int i = 0; i < size; i++)
{
// Apply spacing
@@ -538,6 +546,7 @@ namespace FlaxEditor.CustomEditors.Editors
itemLabel.LinkedEditor = itemLayout.Object(new ListValueContainer(elementType, i, Values, attributes), overrideEditor);
if (_readOnly && itemLayout.Children.Count > 0)
GenericEditor.OnReadOnlyProperty(itemLayout);
+ prevWasNestedPropertiesList = false;
}
else if (_displayType == CollectionAttribute.DisplayType.Header || (_displayType == CollectionAttribute.DisplayType.Default && !single))
{
@@ -547,6 +556,7 @@ namespace FlaxEditor.CustomEditors.Editors
cdp.CustomControl.LinkedEditor = itemLayout.Object(new ListValueContainer(elementType, i, Values, attributes), overrideEditor);
if (_readOnly && itemLayout.Children.Count > 0)
GenericEditor.OnReadOnlyProperty(itemLayout);
+ prevWasNestedPropertiesList = false;
}
}
}
@@ -663,7 +673,7 @@ namespace FlaxEditor.CustomEditors.Editors
cloned[i] = tmp;
}
}
-
+
SetValue(cloned);
}
diff --git a/Source/Editor/CustomEditors/Editors/GenericEditor.cs b/Source/Editor/CustomEditors/Editors/GenericEditor.cs
index 1eb1c5f90..343ac917d 100644
--- a/Source/Editor/CustomEditors/Editors/GenericEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/GenericEditor.cs
@@ -560,19 +560,19 @@ namespace FlaxEditor.CustomEditors.Editors
internal static void OnReadOnlyProperty(LayoutElementsContainer itemLayout, int labelIndex = -1)
{
- PropertiesListElement list = null;
+ PropertiesList list = null;
int firstChildControlIndex = 0;
bool disableSingle = true;
var control = itemLayout.Children[itemLayout.Children.Count - 1];
if (control is GroupElement group && group.Children.Count > 0)
{
- list = group.Children[0] as PropertiesListElement;
+ list = (group.Children[0] as PropertiesListElement)?.Properties;
disableSingle = false; // Disable all nested editors
}
else if (control is PropertiesListElement list1 && labelIndex != -1)
{
- list = list1;
- firstChildControlIndex = list.Labels[labelIndex].FirstChildControlIndex;
+ list = list1.Labels[labelIndex].FirstChildControlContainer ?? list1.Properties;
+ firstChildControlIndex = list1.Labels[labelIndex].FirstChildControlIndex;
}
else if (control?.Control != null)
{
@@ -582,10 +582,10 @@ namespace FlaxEditor.CustomEditors.Editors
if (list != null)
{
// Disable controls added to the editor
- var count = list.Properties.Children.Count;
+ var count = list.Children.Count;
for (int j = firstChildControlIndex; j < count; j++)
{
- var child = list.Properties.Children[j];
+ var child = list.Children[j];
if (disableSingle && child is PropertyNameLabel)
break;
diff --git a/Source/Editor/CustomEditors/Editors/LocalizedStringEditor.cs b/Source/Editor/CustomEditors/Editors/LocalizedStringEditor.cs
index 5fe374337..efa6581f5 100644
--- a/Source/Editor/CustomEditors/Editors/LocalizedStringEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/LocalizedStringEditor.cs
@@ -33,10 +33,10 @@ namespace FlaxEditor.CustomEditors.Editors
if (layout.Children.Count == 0)
return;
var propList = layout.Children[layout.Children.Count - 1] as PropertiesListElement;
- if (propList == null || propList.Children.Count != 2)
+ if (propList == null || propList.Children.Count < 2)
return;
- var idElement = propList.Children[0] as TextBoxElement;
- var valueElement = propList.Children[1] as TextBoxElement;
+ var idElement = propList.Children[propList.Children.Count - 2] as TextBoxElement;
+ var valueElement = propList.Children[propList.Children.Count - 1] as TextBoxElement;
if (idElement == null || valueElement == null)
return;
_idElement = idElement;
diff --git a/Source/Editor/CustomEditors/Elements/Container/PropertiesListElement.cs b/Source/Editor/CustomEditors/Elements/Container/PropertiesListElement.cs
index 0862200da..c7705b336 100644
--- a/Source/Editor/CustomEditors/Elements/Container/PropertiesListElement.cs
+++ b/Source/Editor/CustomEditors/Elements/Container/PropertiesListElement.cs
@@ -53,13 +53,7 @@ namespace FlaxEditor.CustomEditors.Elements
internal void OnAddProperty(string name, string tooltip)
{
- var label = new PropertyNameLabel(name)
- {
- Parent = Properties,
- TooltipText = tooltip,
- FirstChildControlIndex = Properties.Children.Count
- };
- Labels.Add(label);
+ OnAddProperty(new PropertyNameLabel(name), tooltip);
}
internal void OnAddProperty(PropertyNameLabel label, string tooltip)
@@ -88,6 +82,7 @@ namespace FlaxEditor.CustomEditors.Elements
public override void ClearLayout()
{
base.ClearLayout();
+
Labels.Clear();
}
}
diff --git a/Source/Editor/CustomEditors/GUI/CheckablePropertyNameLabel.cs b/Source/Editor/CustomEditors/GUI/CheckablePropertyNameLabel.cs
index 3cd8b57c1..0ce5f441e 100644
--- a/Source/Editor/CustomEditors/GUI/CheckablePropertyNameLabel.cs
+++ b/Source/Editor/CustomEditors/GUI/CheckablePropertyNameLabel.cs
@@ -58,6 +58,8 @@ namespace FlaxEditor.CustomEditors.GUI
// Update child controls enabled state
if (FirstChildControlIndex >= 0 && Parent is PropertiesList propertiesList)
{
+ if (FirstChildControlContainer != null)
+ propertiesList = FirstChildControlContainer;
var controls = propertiesList.Children;
var labels = propertiesList.Element.Labels;
var thisIndex = labels.IndexOf(this);
diff --git a/Source/Editor/CustomEditors/GUI/PropertiesList.cs b/Source/Editor/CustomEditors/GUI/PropertiesList.cs
index 208dc64e6..25580c503 100644
--- a/Source/Editor/CustomEditors/GUI/PropertiesList.cs
+++ b/Source/Editor/CustomEditors/GUI/PropertiesList.cs
@@ -245,16 +245,25 @@ namespace FlaxEditor.CustomEditors.GUI
for (int i = 0; i < count; i++)
{
var label = _element.Labels[i];
+ var container = label.FirstChildControlContainer ?? this;
if (label.FirstChildControlIndex < 0)
yStarts[i] = 0;
- else if (_children.Count <= label.FirstChildControlIndex)
+ else if (container.ChildrenCount <= label.FirstChildControlIndex)
yStarts[i] = y;
+ else if (label.FirstChildControlContainer != null)
+ {
+ var firstChild = label.FirstChildControlContainer.Children[label.FirstChildControlIndex];
+ yStarts[i] = firstChild.PointToParent(this, Float2.Zero).Y;
+ if (i == count - 1)
+ yStarts[i + 1] = firstChild.PointToParent(this, firstChild.Size).Y;
+ }
else
{
- yStarts[i] = _children[label.FirstChildControlIndex].Top;
+ var firstChild = _children[label.FirstChildControlIndex];
+ yStarts[i] = firstChild.Top;
if (i == count - 1)
- yStarts[i + 1] = _children[label.FirstChildControlIndex].Bottom;
+ yStarts[i + 1] = firstChild.Bottom;
}
}
diff --git a/Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs b/Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs
index 035c90fe9..1301be318 100644
--- a/Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs
+++ b/Source/Editor/CustomEditors/GUI/PropertyNameLabel.cs
@@ -30,6 +30,11 @@ namespace FlaxEditor.CustomEditors.GUI
///
internal int FirstChildControlIndex;
+ ///
+ /// Helper value used by the to draw property names in a proper area.
+ ///
+ internal PropertiesList FirstChildControlContainer;
+
///
/// The linked custom editor (shows the label property).
///
@@ -154,8 +159,16 @@ namespace FlaxEditor.CustomEditors.GUI
public override void OnDestroy()
{
SetupContextMenu = null;
+ LinkedEditor = null;
+ FirstChildControlContainer = null;
base.OnDestroy();
}
+
+ ///
+ public override string ToString()
+ {
+ return Text.ToString();
+ }
}
}
diff --git a/Source/Editor/CustomEditors/LayoutElementsContainer.cs b/Source/Editor/CustomEditors/LayoutElementsContainer.cs
index 0ec88238e..427b8bf74 100644
--- a/Source/Editor/CustomEditors/LayoutElementsContainer.cs
+++ b/Source/Editor/CustomEditors/LayoutElementsContainer.cs
@@ -666,7 +666,20 @@ namespace FlaxEditor.CustomEditors
}
var property = AddPropertyItem(name, tooltip);
- return property.Object(values, editor);
+ int start = property.Properties.Children.Count;
+ var result = property.Object(values, editor);
+
+ // Special case when properties list is nested into another properties list (eg. array of structures or LocalizedString editor)
+ if (this is PropertiesListElement thisPropertiesList &&
+ editor.ParentEditor != null &&
+ editor.ParentEditor.LinkedLabel != null &&
+ editor.ParentEditor.LinkedLabel.FirstChildControlContainer == null)
+ {
+ editor.ParentEditor.LinkedLabel.FirstChildControlIndex = start;
+ editor.ParentEditor.LinkedLabel.FirstChildControlContainer = property.Properties;
+ }
+
+ return result;
}
///
From 653aaecaec9be4e0ca576bd97f061c6daf77b2ef Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Fri, 30 Aug 2024 14:48:06 +0200
Subject: [PATCH 075/114] Postmerge cleanup
#2391
---
Source/Engine/Core/Math/Quaternion.cpp | 10 +-
Source/Engine/Core/Math/Quaternion.cs | 28 ++---
Source/Engine/Core/Math/Quaternion.h | 11 +-
Source/Engine/Core/Math/Transform.cpp | 24 +---
Source/Engine/Core/Math/Transform.cs | 155 +++++-------------------
Source/Engine/Core/Math/Transform.h | 70 +++--------
Source/Engine/Core/Math/Vector3.cpp | 46 +++----
Source/Engine/Core/Math/Vector3.cs | 160 +++----------------------
Source/Engine/Core/Math/Vector3.h | 25 ++--
9 files changed, 111 insertions(+), 418 deletions(-)
diff --git a/Source/Engine/Core/Math/Quaternion.cpp b/Source/Engine/Core/Math/Quaternion.cpp
index a8e276bf2..46240d4b8 100644
--- a/Source/Engine/Core/Math/Quaternion.cpp
+++ b/Source/Engine/Core/Math/Quaternion.cpp
@@ -539,13 +539,13 @@ void Quaternion::RotationYawPitchRoll(float yaw, float pitch, float roll, Quater
result.Z = cosYawOver2 * cosPitchOver2 * sinRollOver2 - sinYawOver2 * sinPitchOver2 * cosRollOver2;
}
-Quaternion Quaternion::GetRotationFromNormal(const Vector3& InNormal, const Transform& InReferenceTransform)
+Quaternion Quaternion::GetRotationFromNormal(const Vector3& normal, const Transform& reference)
{
- Float3 up = InReferenceTransform.GetUp();
- auto dot = Vector3::Dot(InNormal, up);
+ Float3 up = reference.GetUp();
+ const float dot = Vector3::Dot(normal, up);
if (Math::NearEqual(Math::Abs(dot), 1))
{
- up = InReferenceTransform.GetRight();
+ up = reference.GetRight();
}
- return Quaternion::LookRotation(InNormal, up);
+ return Quaternion::LookRotation(normal, up);
}
diff --git a/Source/Engine/Core/Math/Quaternion.cs b/Source/Engine/Core/Math/Quaternion.cs
index ad2117be3..b6b9518c3 100644
--- a/Source/Engine/Core/Math/Quaternion.cs
+++ b/Source/Engine/Core/Math/Quaternion.cs
@@ -1491,16 +1491,16 @@ namespace FlaxEngine
/// Example code:
///
/// GetRotationFromNormalExample :
- /// RayOrgin;
+ /// RayOrigin;
/// SomeObject;
///
/// {
- /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// (.RayCast(RayOrigin.Position, RayOrigin.Transform.Forward, out hit)
/// {
- /// position = Hit.Collider.Position;
- /// transform = Hit.Collider.Transform;
- /// point = Hit.Point;
- /// normal = Hit.Normal;
+ /// position = hit.Collider.Position;
+ /// transform = hit.Collider.Transform;
+ /// point = hit.Point;
+ /// normal = hit.Normal;
/// rot = .GetRotationFromNormal(normal,transform);
/// SomeObject.Position = point;
/// SomeObject.Orientation = rot;
@@ -1510,18 +1510,16 @@ namespace FlaxEngine
///
///
///
- /// The normal vector.
- /// The reference transform.
+ /// The normal vector.
+ /// The reference transform.
/// The rotation from the normal vector.
- public static Quaternion GetRotationFromNormal(Vector3 InNormal, Transform InReferenceTransform)
+ public static Quaternion GetRotationFromNormal(Vector3 normal, Transform reference)
{
- Float3 up = InReferenceTransform.Up;
- var dot = Vector3.Dot(InNormal, up);
+ Float3 up = reference.Up;
+ var dot = Vector3.Dot(normal, up);
if (Mathf.NearEqual(Math.Abs(dot), 1))
- {
- up = InReferenceTransform.Right;
- }
- return LookRotation(InNormal, up);
+ up = reference.Right;
+ return LookRotation(normal, up);
}
///
diff --git a/Source/Engine/Core/Math/Quaternion.h b/Source/Engine/Core/Math/Quaternion.h
index 25b90a1d4..b2b57886f 100644
--- a/Source/Engine/Core/Math/Quaternion.h
+++ b/Source/Engine/Core/Math/Quaternion.h
@@ -661,16 +661,13 @@ public:
// @param result When the method completes, contains the newly created quaternion
static void RotationYawPitchRoll(float yaw, float pitch, float roll, Quaternion& result);
-
///
- /// Gets rotation from a normal in relation to a transform.
- /// This function is especially useful for axis aligned faces,
- /// and with .
+ /// Gets rotation from a normal in relation to a transform. This function is especially useful for axis aligned faces, and with .
///
- /// The normal vector.
- /// The reference transform.
+ /// The normal vector.
+ /// The reference transform.
/// The rotation from the normal vector.
- static Quaternion GetRotationFromNormal(const Vector3& InNormal, const Transform& InReferenceTransform);
+ static Quaternion GetRotationFromNormal(const Vector3& normal, const Transform& reference);
};
///
diff --git a/Source/Engine/Core/Math/Transform.cpp b/Source/Engine/Core/Math/Transform.cpp
index 234b78c04..0106be2f9 100644
--- a/Source/Engine/Core/Math/Transform.cpp
+++ b/Source/Engine/Core/Math/Transform.cpp
@@ -253,26 +253,8 @@ void Transform::Lerp(const Transform& t1, const Transform& t2, float amount, Tra
Float3::Lerp(t1.Scale, t2.Scale, amount, result.Scale);
}
-inline Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
+Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& point, const Vector3& normal, const Vector3& normalOffset, const Transform& relativeTo, const Vector3& gridSize, const Float3& scale)
{
- Quaternion rot = Quaternion::GetRotationFromNormal(InNormal, InRelativeTo);
- return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
-}
-
-inline Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
-{
- Quaternion rot = Quaternion::GetRotationFromNormal(InNormal, InRelativeTo);
- return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3::One);
-}
-
-inline Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize)
-{
- Quaternion rot = Quaternion::GetRotationFromNormal(InNormal, InRelativeTo);
- return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
-}
-
-inline Transform Transform::AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize)
-{
- Quaternion rot = Quaternion::GetRotationFromNormal(InNormal, InRelativeTo);
- return Transform(Vector3::SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3::One);
+ Quaternion rot = Quaternion::GetRotationFromNormal(normal, relativeTo);
+ return Transform(Vector3::SnapToGrid(point, gridSize, rot, relativeTo.Translation, normalOffset), rot, scale);
}
diff --git a/Source/Engine/Core/Math/Transform.cs b/Source/Engine/Core/Math/Transform.cs
index ba86c1a6d..7387bab83 100644
--- a/Source/Engine/Core/Math/Transform.cs
+++ b/Source/Engine/Core/Math/Transform.cs
@@ -477,24 +477,25 @@ namespace FlaxEngine
Quaternion.Slerp(ref start.Orientation, ref end.Orientation, amount, out result.Orientation);
Float3.Lerp(ref start.Scale, ref end.Scale, amount, out result.Scale);
}
+
///
- /// Combines the functions:
- /// ,
+ /// Combines the functions:
+ /// ,
/// .
/// Example code:
///
/// AlignRotationToObjectAndSnapToGridExample :
- /// Offset = 50.0f;
+ /// Offset = new Vector3(0, 0, 50f);
/// GridSize = * 20.0f;
- /// RayOrgin;
+ /// RayOrigin;
/// SomeObject;
///
/// {
- /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// (.RayCast(RayOrigin.Position, RayOrigin.Transform.Forward, out hit)
/// {
- /// transform = Hit.Collider.Transform;
- /// point = Hit.Point;
- /// normal = Hit.Normal;
+ /// transform = hit.Collider.Transform;
+ /// point = hit.Point;
+ /// normal = hit.Normal;
/// SomeObject.Transform = .AlignRotationToNormalAndSnapToGrid
/// (
/// point,
@@ -502,7 +503,8 @@ namespace FlaxEngine
/// Offset,
/// transform,
/// SomeObject.Scale,
- /// GridSize
+ /// GridSize,
+ /// Float3.One
/// );
/// }
/// }
@@ -510,127 +512,37 @@ namespace FlaxEngine
///
///
///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to apply after snapping.
- /// The normal vector.
- /// The relative transform.
- /// The scale to apply to the transform.
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The scale to apply to the transform.
/// The rotated and snapped transform.
- public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, float InNormalOffset, Transform InRelativeTo, Float3 InReturnScale, Vector3 InGridSize)
+ public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 point, Vector3 normal, Vector3 normalOffset, Transform relativeTo, Vector3 gridSize, Float3 scale)
{
- Quaternion rot = Quaternion.GetRotationFromNormal(InNormal, InRelativeTo);
- return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, new Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, InReturnScale);
- }
-
- ///
- /// Combines the functions:
- /// ,
- /// .
- /// Example code:
- ///
- /// AlignRotationToObjectAndSnapToGridExample :
- /// Offset = 50.0f;
- /// GridSize = * 20.0f;
- /// RayOrgin;
- /// SomeObject;
- ///
- /// {
- /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
- /// {
- /// transform = Hit.Collider.Transform;
- /// point = Hit.Point;
- /// normal = Hit.Normal;
- /// SomeObject.Transform = .AlignRotationToNormalAndSnapToGrid
- /// (
- /// point,
- /// normal,
- /// Offset,
- /// transform,
- /// GridSize
- /// );
- /// }
- /// }
- /// }
- ///
- ///
- ///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to apply after snapping.
- /// The normal vector.
- /// The relative transform.
- /// The rotated and snapped transform with scale .
- public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, float InNormalOffset, Transform InRelativeTo, Vector3 InGridSize)
- {
- Quaternion rot = Quaternion.GetRotationFromNormal(InNormal, InRelativeTo);
- return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, new Vector3(0, 0, InNormalOffset), rot, InGridSize), rot, Float3.One);
+ Quaternion rot = Quaternion.GetRotationFromNormal(normal, relativeTo);
+ return new Transform(Vector3.SnapToGrid(point, gridSize, rot, relativeTo.Translation, normalOffset), rot, scale);
}
///
/// Combines the functions:
- /// ,
+ /// ,
/// .
/// Example code:
///
/// AlignRotationToObjectAndSnapToGridExample :
/// Offset = new Vector3(0, 0, 50f);
/// GridSize = * 20.0f;
- /// RayOrgin;
+ /// RayOrigin;
/// SomeObject;
///
/// {
- /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// (.RayCast(RayOrigin.Position, RayOrigin.Transform.Forward, out hit)
/// {
- /// transform = Hit.Collider.Transform;
- /// point = Hit.Point;
- /// normal = Hit.Normal;
- /// SomeObject.Transform = .AlignRotationToNormalAndSnapToGrid
- /// (
- /// point,
- /// normal,
- /// Offset,
- /// transform,
- /// SomeObject.Scale,
- /// GridSize
- /// );
- /// }
- /// }
- /// }
- ///
- ///
- ///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to apply after snapping.
- /// The normal vector.
- /// The relative transform.
- /// The scale to apply to the transform.
- /// The rotated and snapped transform.
- public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, Vector3 InNormalOffset, Transform InRelativeTo, Float3 InReturnScale, Vector3 InGridSize)
- {
- Quaternion rot = Quaternion.GetRotationFromNormal(InNormal, InRelativeTo);
- return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, InReturnScale);
- }
-
- ///
- /// Combines the functions:
- /// ,
- /// .
- /// Example code:
- ///
- /// AlignRotationToObjectAndSnapToGridExample :
- /// Offset = new Vector3(0, 0, 50f);
- /// GridSize = * 20.0f;
- /// RayOrgin;
- /// SomeObject;
- ///
- /// {
- /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
- /// {
- /// transform = Hit.Collider.Transform;
- /// point = Hit.Point;
- /// normal = Hit.Normal;
+ /// transform = hit.Collider.Transform;
+ /// point = hit.Point;
+ /// normal = hit.Normal;
/// SomeObject.Transform = .AlignRotationToNormalAndSnapToGrid
/// (
/// point,
@@ -645,16 +557,15 @@ namespace FlaxEngine
///
///
///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to apply after snapping.
- /// The normal vector.
- /// The relative transform.
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
/// The rotated and snapped transform with scale .
- public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 InPoint, Vector3 InNormal, Vector3 InNormalOffset, Transform InRelativeTo, Vector3 InGridSize)
+ public static Transform AlignRotationToNormalAndSnapToGrid(Vector3 point, Vector3 normal, Vector3 normalOffset, Transform relativeTo, Vector3 gridSize)
{
- Quaternion rot = Quaternion.GetRotationFromNormal(InNormal, InRelativeTo);
- return new Transform(Vector3.SnapToRotatedGridWithOffset(InPoint, InRelativeTo.Translation, InNormalOffset, rot, InGridSize), rot, Float3.One);
+ return AlignRotationToNormalAndSnapToGrid(point, normal, normalOffset, relativeTo, gridSize, Float3.One);
}
///
diff --git a/Source/Engine/Core/Math/Transform.h b/Source/Engine/Core/Math/Transform.h
index f170ce7a9..8e9e07e0a 100644
--- a/Source/Engine/Core/Math/Transform.h
+++ b/Source/Engine/Core/Math/Transform.h
@@ -18,20 +18,20 @@ API_STRUCT() struct FLAXENGINE_API Transform
///
/// The translation vector of the transform.
///
- API_FIELD(Attributes = "EditorOrder(10), EditorDisplay(null, \"Position\"), ValueCategory(Utils.ValueCategory.Distance)")
- Vector3 Translation;
+ API_FIELD(Attributes="EditorOrder(10), EditorDisplay(null, \"Position\"), ValueCategory(Utils.ValueCategory.Distance)")
+ Vector3 Translation;
///
/// The rotation of the transform.
///
- API_FIELD(Attributes = "EditorOrder(20), EditorDisplay(null, \"Rotation\"), ValueCategory(Utils.ValueCategory.Angle)")
- Quaternion Orientation;
+ API_FIELD(Attributes="EditorOrder(20), EditorDisplay(null, \"Rotation\"), ValueCategory(Utils.ValueCategory.Angle)")
+ Quaternion Orientation;
///
/// The scale vector of the transform.
///
- API_FIELD(Attributes = "EditorOrder(30), Limit(float.MinValue, float.MaxValue, 0.01f)")
- Float3 Scale;
+ API_FIELD(Attributes="EditorOrder(30), Limit(float.MinValue, float.MaxValue, 0.01f)")
+ Float3 Scale;
public:
///
@@ -291,61 +291,19 @@ public:
return result;
}
-
///
/// Combines the functions:
- /// ,
+ /// ,
/// .
///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to apply after snapping.
- /// The normal vector.
- /// The relative transform.
- /// The scale to apply to the transform.
+ /// The position to snap.
+ /// The size of the grid.
+ /// The local grid offset to apply after snapping.
+ /// The normal vector.
+ /// The relative transform.
+ /// The scale to apply to the transform.
/// The rotated and snapped transform.
- static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize);
-
- ///
- /// Combines the functions:
- /// ,
- /// .
- ///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to apply after snapping.
- /// The normal vector.
- /// The relative transform.
- /// The rotated and snapped transform with scale .
- static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, float InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize);
-
- ///
- /// Combines the functions:
- /// ,
- /// .
- ///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to apply after snapping.
- /// The normal vector.
- /// The relative transform.
- /// The scale to apply to the transform.
- /// The rotated and snapped transform.
- static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Float3& InReturnScale, const Vector3& InGridSize);
-
- ///
- /// Combines the functions:
- /// ,
- /// .
- ///
- /// The position to snap.
- /// The size of the grid.
- /// The local Z grid offset to apply after snapping.
- /// The normal vector.
- /// The relative transform.
- /// The rotated and snapped transform with scale .
- static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& InPoint, const Vector3& InNormal, const Vector3& InNormalOffset, const Transform& InRelativeTo, const Vector3& InGridSize);
-
+ static Transform AlignRotationToNormalAndSnapToGrid(const Vector3& point, const Vector3& normal, const Vector3& normalOffset, const Transform& relativeTo, const Vector3& gridSize, const Float3& scale = Float3::One);
public:
FORCE_INLINE Transform operator*(const Transform& other) const
diff --git a/Source/Engine/Core/Math/Vector3.cpp b/Source/Engine/Core/Math/Vector3.cpp
index 30247d70b..5a26f2309 100644
--- a/Source/Engine/Core/Math/Vector3.cpp
+++ b/Source/Engine/Core/Math/Vector3.cpp
@@ -328,20 +328,14 @@ template<>
Float3 Float3::SnapToGrid(const Float3& pos, const Float3& gridSize)
{
return Float3(Math::Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X,
- Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y,
- Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
+ Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y,
+ Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
}
template<>
-Float3 Float3::SnapToRotatedGridWithOffset(const Float3& InPoint, const Float3& InCenterPoint, const Float3& InOffset, const Quaternion& InOrientation, const Float3& InGridSize)
+Float3 Float3::SnapToGrid(const Float3& point, const Float3& gridSize, const Quaternion& gridOrientation, const Float3& gridOrigin, const Float3& offset)
{
- return (InOrientation * (InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
-}
-
-template<>
-Float3 Float3::SnapToRotatedGrid(const Float3& InPoint, const Float3& InCenterPoint, const Quaternion& InOrientation, const Float3& InGridSize)
-{
- return (InOrientation * InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize)) + InCenterPoint;
+ return (gridOrientation * (gridOrientation.Conjugated() * SnapToGrid(point - gridOrigin, gridSize) + offset)) + gridOrigin;
}
// Double
@@ -661,21 +655,15 @@ double Double3::Angle(const Double3& from, const Double3& to)
template<>
Double3 Double3::SnapToGrid(const Double3& pos, const Double3& gridSize)
{
- return Double3(Math::Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X,
- Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y,
- Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
+ return Double3(Math::Ceil((pos.X - (gridSize.X * 0.5)) / gridSize.X) * gridSize.X,
+ Math::Ceil((pos.Y - (gridSize.Y * 0.5)) / gridSize.Y) * gridSize.Y,
+ Math::Ceil((pos.Z - (gridSize.Z * 0.5)) / gridSize.Z) * gridSize.Z);
}
template<>
-Double3 Double3::SnapToRotatedGridWithOffset(const Double3& InPoint, const Double3& InCenterPoint, const Double3& InOffset, const Quaternion& InOrientation, const Double3& InGridSize)
+Double3 Double3::SnapToGrid(const Double3& point, const Double3& gridSize, const Quaternion& gridOrientation, const Double3& gridOrigin, const Double3& offset)
{
- return (InOrientation * (InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
-}
-
-template<>
-Double3 Double3::SnapToRotatedGrid(const Double3& InPoint, const Double3& InCenterPoint, const Quaternion& InOrientation, const Double3& InGridSize)
-{
- return (InOrientation * InOrientation.Conjugated() * Float3::SnapToGrid((InPoint - InCenterPoint), InGridSize)) + InCenterPoint;
+ return (gridOrientation * (gridOrientation.Conjugated() * SnapToGrid(point - gridOrigin, gridSize) + offset)) + gridOrigin;
}
// Int
@@ -896,19 +884,13 @@ int32 Int3::Angle(const Int3& from, const Int3& to)
template<>
Int3 Int3::SnapToGrid(const Int3& pos, const Int3& gridSize)
{
- return Double3(Math::Ceil((pos.X - (gridSize.X * 0.5f)) / gridSize.X) * gridSize.X,
- Math::Ceil((pos.Y - (gridSize.Y * 0.5f)) / gridSize.Y) * gridSize.Y,
- Math::Ceil((pos.Z - (gridSize.Z * 0.5f)) / gridSize.Z) * gridSize.Z);
+ return Int3(((pos.X - (gridSize.X / 2)) / gridSize.X) * gridSize.X,
+ ((pos.Y - (gridSize.Y / 2)) / gridSize.Y) * gridSize.Y,
+ ((pos.Z - (gridSize.Z / 2)) / gridSize.Z) * gridSize.Z);
}
template<>
-Int3 Int3::SnapToRotatedGridWithOffset(const Int3& InPoint, const Int3& InCenterPoint, const Int3& InOffset, const Quaternion& InOrientation, const Int3& InGridSize)
+Int3 Int3::SnapToGrid(const Int3& point, const Int3& gridSize, const Quaternion& gridOrientation, const Int3& gridOrigin, const Int3& offset)
{
- return (InOrientation * (InOrientation.Conjugated() * Int3::SnapToGrid((InPoint - InCenterPoint), InGridSize) + InOffset)) + InCenterPoint;
-}
-
-template<>
-Int3 Int3::SnapToRotatedGrid(const Int3& InPoint, const Int3& InCenterPoint, const Quaternion& InOrientation, const Int3& InGridSize)
-{
- return (InOrientation * InOrientation.Conjugated() * Int3::SnapToGrid((InPoint - InCenterPoint), InGridSize)) + InCenterPoint;
+ return (gridOrientation * (gridOrientation.Conjugated() * SnapToGrid(point - gridOrigin, gridSize) + offset)) + gridOrigin;
}
diff --git a/Source/Engine/Core/Math/Vector3.cs b/Source/Engine/Core/Math/Vector3.cs
index dc2587934..5505c5053 100644
--- a/Source/Engine/Core/Math/Vector3.cs
+++ b/Source/Engine/Core/Math/Vector3.cs
@@ -1686,25 +1686,25 @@ namespace FlaxEngine
}
///
- /// Snaps the onto the rotated grid.
- /// For world aligned grid snapping use instead.
+ /// Snaps the onto the rotated grid.
+ /// For world aligned grid snapping use instead.
/// Example code:
///
- /// SnapToRotatedGridExample :
+ /// SnapToGridExample :
/// GridSize = * 20.0f;
- /// RayOrgin;
+ /// RayOrigin;
/// SomeObject;
///
/// {
- /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
+ /// (.RayCast(RayOrigin.Position, RayOrigin.Transform.Forward, out hit)
/// {
- /// position = Hit.Collider.Position;
- /// transform = Hit.Collider.Transform;
- /// point = Hit.Point;
- /// normal = Hit.Normal;
+ /// position = hit.Collider.Position;
+ /// transform = hit.Collider.Transform;
+ /// point = hit.Point;
+ /// normal = hit.Normal;
/// //Get rotation from normal relative to collider transform
- /// rot = .GetRotacionFromNormal(normal,transform);
- /// point = .SnapToRotatedGrid(point,position,rot,GridSize);
+ /// rot = .GetRotationFromNormal(normal, transform);
+ /// point = .SnapToGrid(point, GridSize, rot, position);
/// SomeObject.Position = point;
/// }
/// }
@@ -1712,139 +1712,15 @@ namespace FlaxEngine
///
///
///
- /// The position to snap.
- /// The center point.
- /// The rotation of the grid.
- /// The size of the grid.
+ /// The position to snap.
+ /// The size of the grid.
+ /// The rotation of the grid.
+ /// The center point of the grid.
+ /// The local position offset applied to the snapped position before grid rotation.
/// The position snapped to the grid.
- public static Vector3 SnapToRotatedGrid(Vector3 InPoint, Vector3 InCenterPoint, Quaternion InOrientation, Vector3 InGridSize)
+ public static Vector3 SnapToGrid(Vector3 point, Vector3 gridSize, Quaternion gridOrientation, Vector3 gridOrigin, Vector3 offset)
{
- Vector3 p = (InPoint - InCenterPoint) * InOrientation.Conjugated();
- return (SnapToGrid(p, InGridSize) * InOrientation) + InCenterPoint;
- }
- ///
- /// The same as but with local offset applied after point is snapped.
- /// Example code:
- ///
- /// SnapToRotatedGridWithOffsetExample :
- /// Offset = new Vector3(0, 0, 50f);
- /// GridSize = * 20.0f;
- /// RayOrgin;
- /// SomeObject;
- ///
- /// {
- /// (.RayCast(RayOrgin.Position, RayOrgin.Transform.Forward, out Hit)
- /// {
- /// position = Hit.Collider.Position;
- /// transform = Hit.Collider.Transform;
- /// point = Hit.Point;
- /// normal = Hit.Normal;
- /// rot = .GetRotationFromNormal(normal,transform);
- /// point = .SnapToRotatedGridWithOffset(point,position,Offset,rot,GridSize);
- /// SomeObject.Position = point;
- /// }
- /// }
- /// }
- ///
- ///
- ///
- /// The position to snap.
- /// The center point.
- /// The rotation of the grid.
- /// The size of the grid.
- /// The local grid offset to apply after snapping.
- /// The position snapped to the grid, with offset applied.
- public static Vector3 SnapToRotatedGridWithOffset(Vector3 InPoint, Vector3 InCenterPoint, Vector3 InOffset, Quaternion InOrientation, Vector3 InGridSize)
- {
- return ((SnapToGrid((InPoint - InCenterPoint) * InOrientation.Conjugated(), InGridSize) + InOffset) * InOrientation) + InCenterPoint;
- }
-
- ///
- /// Gets the closest vector id to
- ///
- ///
- ///
- /// index or -1 if all vectors in array are outside of
- public int GetClosest(ref Vector3[] InArray, Real Tolerance)
- {
- Vector3 self = this;
- int FinalID = -1;
- for (int i = 0; i < InArray.Length; i++)
- {
- if (Distance(self, InArray[i]) <= Tolerance)
- {
- FinalID = i;
- self = InArray[i];
- }
- }
- return FinalID;
- }
-
- ///
- /// Gets the closest vector id to
- ///
- ///
- ///
- /// index or -1 if all vectors in array are outside of
- public int GetClosest(ref System.Collections.Generic.List InList, Real Tolerance)
- {
- Vector3 self = this;
- int FinalID = -1;
- for (int i = 0; i < InList.Count; i++)
- {
- if (Distance(self, InList[i]) <= Tolerance)
- {
- FinalID = i;
- self = InList[i];
- }
- }
- return FinalID;
- }
-
- ///
- /// Gets the closest vector to
- ///
- ///
- ///
- ///
- public void GetClosest(ref Vector3[] InArray, ref Vector3 OutVector, ref Real OutDistance)
- {
- Vector3 self = this;
- Real LastDistance = Real.MaxValue;
- for (int i = 0; i < InArray.Length; i++)
- {
- var d = Distance(self, InArray[i]);
- if (d <= LastDistance)
- {
- self = InArray[i];
- LastDistance = d;
- }
- }
- OutDistance = LastDistance;
- OutVector = self;
- }
-
- ///
- /// Gets the closest vector to
- ///
- ///
- ///
- ///
- public void GetClosest(ref System.Collections.Generic.List InList, ref Vector3 OutVector, ref Real OutDistance)
- {
- Vector3 self = this;
- Real LastDistance = Real.MaxValue;
- for (int i = 0; i < InList.Count; i++)
- {
- var d = Distance(self, InList[i]);
- if (d <= LastDistance)
- {
- self = InList[i];
- LastDistance = d;
- }
- }
- OutDistance = LastDistance;
- OutVector = self;
+ return ((SnapToGrid(point - gridOrigin, gridSize) * gridOrientation.Conjugated() + offset) * gridOrientation) + gridOrigin;
}
///
diff --git a/Source/Engine/Core/Math/Vector3.h b/Source/Engine/Core/Math/Vector3.h
index ec10879ae..2e5d3d478 100644
--- a/Source/Engine/Core/Math/Vector3.h
+++ b/Source/Engine/Core/Math/Vector3.h
@@ -937,26 +937,15 @@ public:
static FLAXENGINE_API Vector3Base SnapToGrid(const Vector3Base& pos, const Vector3Base& gridSize);
///
- /// Snaps the onto the rotated grid.
- /// For world aligned grid snapping use instead.
+ /// Snaps the onto the rotated grid. For world aligned grid snapping use instead.
///
- /// The position to snap.
- /// The center point.
- /// The rotation of the grid.
- /// The size of the grid.
+ /// The position to snap.
+ /// The size of the grid.
+ /// The center point of the grid.
+ /// The rotation of the grid.
+ /// The local position offset applied to the snapped position before grid rotation.
/// The position snapped to the grid.
- static FLAXENGINE_API Vector3Base SnapToRotatedGrid(const Vector3Base& InPoint, const Vector3Base& InCenterPoint, const Quaternion& InOrientation, const Vector3Base& InGridSize);
-
- ///
- /// The same as but with local offset applied after point is snapped.
- ///
- /// The position to snap.
- /// The center point.
- /// The rotation of the grid.
- /// The size of the grid.
- /// The local grid offset to apply after snapping.
- /// The position snapped to the grid, with offset applied.
- static FLAXENGINE_API Vector3Base SnapToRotatedGridWithOffset(const Vector3Base& InPoint, const Vector3Base& InCenterPoint, const Vector3Base& InOffset, const Quaternion& InOrientation, const Vector3Base& InGridSize);
+ static FLAXENGINE_API Vector3Base SnapToGrid(const Vector3Base& point, const Vector3Base& gridSize, const Quaternion& gridOrientation, const Vector3Base& gridOrigin = Zero, const Vector3Base& offset = Zero);
};
template
From fc9aa5c1840421f5b7d1e17fb1509d7c9cb10810 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Fri, 30 Aug 2024 19:50:00 +0200
Subject: [PATCH 076/114] Fix texture streaming reallocation task to ignore
not-resident mips
#2559
---
Source/Engine/Graphics/Textures/StreamingTexture.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Source/Engine/Graphics/Textures/StreamingTexture.cpp b/Source/Engine/Graphics/Textures/StreamingTexture.cpp
index 14874abf1..ecd9bbd55 100644
--- a/Source/Engine/Graphics/Textures/StreamingTexture.cpp
+++ b/Source/Engine/Graphics/Textures/StreamingTexture.cpp
@@ -213,13 +213,13 @@ protected:
const int32 dstMips = dstTexture->MipLevels();
GPUTexture* srcTexture = _streamingTexture->GetTexture();
const int32 srcMips = srcTexture->MipLevels();
+ const int32 srcMissingMips = srcMips - srcTexture->ResidentMipLevels();;
const int32 mipCount = Math::Min(dstMips, srcMips);
- ASSERT(mipCount > 0);
- for (int32 mipIndex = 0; mipIndex < mipCount; mipIndex++)
+ for (int32 mipIndex = srcMissingMips; mipIndex < mipCount; mipIndex++)
{
context->GPU->CopySubresource(dstTexture, dstMips - mipIndex - 1, srcTexture, srcMips - mipIndex - 1);
}
- _uploadedMipCount = mipCount;
+ _uploadedMipCount = mipCount - srcMissingMips;
return Result::Ok;
}
From fd7e04fd8c810eaad33ae03f0951d51255ae7319 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Sun, 1 Sep 2024 14:00:50 -0500
Subject: [PATCH 077/114] Fix spelling and comment description wording for
`GetAssetVirtualProxy`
---
Source/Editor/Modules/ContentDatabaseModule.cs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/Source/Editor/Modules/ContentDatabaseModule.cs b/Source/Editor/Modules/ContentDatabaseModule.cs
index aab5d1b39..9bcec8aa2 100644
--- a/Source/Editor/Modules/ContentDatabaseModule.cs
+++ b/Source/Editor/Modules/ContentDatabaseModule.cs
@@ -198,12 +198,11 @@ namespace FlaxEditor.Modules
}
///
/// Gets the virtual proxy object from given path.
- ///
use case if the asset u trying to display is not a flax asset but u like to add custom functionality
- ///
to context menu,or display it the asset
+ ///
Useful if the asset that needs to be displayed is not a Flax asset but needs custom functionality.
///
/// The asset path.
- /// Asset proxy or null if cannot find.
- public AssetProxy GetAssetVirtuallProxy(string path)
+ /// Asset proxy or null if not found.
+ public AssetProxy GetAssetVirtualProxy(string path)
{
for (int i = 0; i < Proxy.Count; i++)
{
@@ -1019,7 +1018,7 @@ namespace FlaxEditor.Modules
}
if (item == null)
{
- var proxy = GetAssetVirtuallProxy(path);
+ var proxy = GetAssetVirtualProxy(path);
item = proxy?.ConstructItem(path, assetInfo.TypeName, ref assetInfo.ID);
if (item == null)
{
From 65fd975b1afc4accce5836454e25ac5bd3a718a3 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Mon, 2 Sep 2024 12:57:23 -0500
Subject: [PATCH 078/114] Add generic CSharpProxy. Add Empty C# template.
---
.../Editor/Scripting/CSharpEmptyTemplate.cs | 6 ++
.../Editor/Content/Items/CSharpScriptItem.cs | 2 +-
.../{CSharpScriptProxy.cs => CSharpProxy.cs} | 56 +++++++++++++++----
Source/Editor/Content/Proxy/CppProxy.cs | 8 +--
.../Editor/Modules/ContentDatabaseModule.cs | 1 +
5 files changed, 58 insertions(+), 15 deletions(-)
create mode 100644 Content/Editor/Scripting/CSharpEmptyTemplate.cs
rename Source/Editor/Content/Proxy/{CSharpScriptProxy.cs => CSharpProxy.cs} (58%)
diff --git a/Content/Editor/Scripting/CSharpEmptyTemplate.cs b/Content/Editor/Scripting/CSharpEmptyTemplate.cs
new file mode 100644
index 000000000..ea9626f7b
--- /dev/null
+++ b/Content/Editor/Scripting/CSharpEmptyTemplate.cs
@@ -0,0 +1,6 @@
+%copyright%using System;
+using System.Collections.Generic;
+using FlaxEngine;
+
+namespace %namespace%;
+
diff --git a/Source/Editor/Content/Items/CSharpScriptItem.cs b/Source/Editor/Content/Items/CSharpScriptItem.cs
index 26e7e98ac..b5e02f9ed 100644
--- a/Source/Editor/Content/Items/CSharpScriptItem.cs
+++ b/Source/Editor/Content/Items/CSharpScriptItem.cs
@@ -5,7 +5,7 @@ using FlaxEngine;
namespace FlaxEditor.Content
{
///
- /// Content item that contains C# script file with source code.
+ /// Content item that contains C# file with source code.
///
///
public class CSharpScriptItem : ScriptItem
diff --git a/Source/Editor/Content/Proxy/CSharpScriptProxy.cs b/Source/Editor/Content/Proxy/CSharpProxy.cs
similarity index 58%
rename from Source/Editor/Content/Proxy/CSharpScriptProxy.cs
rename to Source/Editor/Content/Proxy/CSharpProxy.cs
index 0ea4df501..e6cb9b933 100644
--- a/Source/Editor/Content/Proxy/CSharpScriptProxy.cs
+++ b/Source/Editor/Content/Proxy/CSharpProxy.cs
@@ -9,19 +9,15 @@ using FlaxEngine;
namespace FlaxEditor.Content
{
///
- /// Context proxy object for C# script files.
+ /// Proxy object for C# files
///
- ///
- [ContentContextMenu("New/C# Script")]
- public class CSharpScriptProxy : ScriptProxy
+ /// ///
+ public abstract class CSharpProxy : ScriptProxy
{
///
/// The script files extension filter.
///
- public static readonly string ExtensionFiler = "*.cs";
-
- ///
- public override string Name => "C# Script";
+ public static readonly string ExtensionFilter = "*.cs";
///
public override bool IsProxyFor(ContentItem item)
@@ -29,11 +25,17 @@ namespace FlaxEditor.Content
return item is CSharpScriptItem;
}
+ ///
+ /// Gets the path for the C# template.
+ ///
+ /// The path to the template
+ protected abstract void GetTemplatePath(out string path);
+
///
public override void Create(string outputPath, object arg)
{
// Load template
- var templatePath = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/ScriptTemplate.cs");
+ GetTemplatePath(out var templatePath);
var scriptTemplate = File.ReadAllText(templatePath);
// Find the module that this script is being added (based on the path)
@@ -59,8 +61,42 @@ namespace FlaxEditor.Content
///
public override string FileExtension => "cs";
-
+
///
public override Color AccentColor => Color.FromRGB(0x1c9c2b);
}
+
+ ///
+ /// Context proxy object for C# script files.
+ ///
+ ///
+ [ContentContextMenu("New/C#/C# Script")]
+ public class CSharpScriptProxy : CSharpProxy
+ {
+ ///
+ public override string Name => "C# Script";
+
+ ///
+ protected override void GetTemplatePath(out string path)
+ {
+ path = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/ScriptTemplate.cs");
+ }
+ }
+
+ ///
+ /// Context proxy object for empty C# files.
+ ///
+ ///
+ [ContentContextMenu("New/C#/C# Empty File")]
+ public class CSharpEmptyProxy : CSharpProxy
+ {
+ ///
+ public override string Name => "C# Empty File";
+
+ ///
+ protected override void GetTemplatePath(out string path)
+ {
+ path = StringUtils.CombinePaths(Globals.EngineContentFolder, "Editor/Scripting/CSharpEmptyTemplate.cs");
+ }
+ }
}
diff --git a/Source/Editor/Content/Proxy/CppProxy.cs b/Source/Editor/Content/Proxy/CppProxy.cs
index f4b92322b..46ba365ef 100644
--- a/Source/Editor/Content/Proxy/CppProxy.cs
+++ b/Source/Editor/Content/Proxy/CppProxy.cs
@@ -11,7 +11,7 @@ namespace FlaxEditor.Content
///
/// Context proxy object for C++ files.
///
- ///
+ ///
public abstract class CppProxy : ScriptProxy
{
///
@@ -74,7 +74,7 @@ namespace FlaxEditor.Content
///
/// Context proxy object for C++ script files.
///
- ///
+ ///
[ContentContextMenu("New/C++/C++ Script")]
public class CppScriptProxy : CppProxy
{
@@ -98,7 +98,7 @@ namespace FlaxEditor.Content
///
/// Context proxy object for C++ Json Asset files.
///
- ///
+ ///
[ContentContextMenu("New/C++/C++ Function Library")]
public class CppStaticClassProxy : CppProxy
{
@@ -116,7 +116,7 @@ namespace FlaxEditor.Content
///
/// Context proxy object for C++ Json Asset files.
///
- ///
+ ///
[ContentContextMenu("New/C++/C++ Json Asset")]
public class CppAssetProxy : CppProxy
{
diff --git a/Source/Editor/Modules/ContentDatabaseModule.cs b/Source/Editor/Modules/ContentDatabaseModule.cs
index aab5d1b39..98359b31f 100644
--- a/Source/Editor/Modules/ContentDatabaseModule.cs
+++ b/Source/Editor/Modules/ContentDatabaseModule.cs
@@ -1093,6 +1093,7 @@ namespace FlaxEditor.Modules
Proxy.Add(new ParticleSystemProxy());
Proxy.Add(new SceneAnimationProxy());
Proxy.Add(new CSharpScriptProxy());
+ Proxy.Add(new CSharpEmptyProxy());
Proxy.Add(new CppAssetProxy());
Proxy.Add(new CppStaticClassProxy());
Proxy.Add(new CppScriptProxy());
From ecace3d609685d713f21bcee5051b9af9d738d61 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Mon, 2 Sep 2024 13:07:15 -0500
Subject: [PATCH 079/114] Code style fix.
---
Source/Editor/Content/Proxy/CSharpProxy.cs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Source/Editor/Content/Proxy/CSharpProxy.cs b/Source/Editor/Content/Proxy/CSharpProxy.cs
index e6cb9b933..334592354 100644
--- a/Source/Editor/Content/Proxy/CSharpProxy.cs
+++ b/Source/Editor/Content/Proxy/CSharpProxy.cs
@@ -30,7 +30,7 @@ namespace FlaxEditor.Content
///
/// The path to the template
protected abstract void GetTemplatePath(out string path);
-
+
///
public override void Create(string outputPath, object arg)
{
@@ -61,7 +61,7 @@ namespace FlaxEditor.Content
///
public override string FileExtension => "cs";
-
+
///
public override Color AccentColor => Color.FromRGB(0x1c9c2b);
}
From fc6dc9473c24603af968ea3866566a913cd489ec Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 3 Sep 2024 12:54:11 -0500
Subject: [PATCH 080/114] Add third party and deps module detection.
---
.../Editor/Modules/SourceCodeEditing/CodeEditingModule.cs | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
index b98798e6a..abe663ff7 100644
--- a/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
+++ b/Source/Editor/Modules/SourceCodeEditing/CodeEditingModule.cs
@@ -417,6 +417,14 @@ namespace FlaxEditor.Modules.SourceCodeEditing
{
moduleTextIndex = fileText.IndexOf("GameModule", StringComparison.Ordinal);
}
+ else if (fileText.Contains("ThirdPartyModule", StringComparison.Ordinal))
+ {
+ moduleTextIndex = fileText.IndexOf("ThirdPartyModule", StringComparison.Ordinal);
+ }
+ else if (fileText.Contains("DepsModule", StringComparison.Ordinal))
+ {
+ moduleTextIndex = fileText.IndexOf("DepsModule", StringComparison.Ordinal);
+ }
else if (fileText.Contains("GameEditorModule", StringComparison.Ordinal))
{
moduleTextIndex = fileText.IndexOf("GameEditorModule", StringComparison.Ordinal);
From 34facd87699c3a65b0b8bfbe1590dc339997d6a4 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Thu, 5 Sep 2024 18:54:03 -0500
Subject: [PATCH 081/114] Add Shift+End for textboxbase
---
Source/Engine/UI/GUI/Common/TextBoxBase.cs | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/Source/Engine/UI/GUI/Common/TextBoxBase.cs b/Source/Engine/UI/GUI/Common/TextBoxBase.cs
index 95b49850b..c22899c7b 100644
--- a/Source/Engine/UI/GUI/Common/TextBoxBase.cs
+++ b/Source/Engine/UI/GUI/Common/TextBoxBase.cs
@@ -924,6 +924,19 @@ namespace FlaxEngine.GUI
return newLineLoc;
}
+ private int FindNextLineBegin()
+ {
+ int caretPos = CaretPosition;
+ if (caretPos + 2 > TextLength)
+ return TextLength;
+ int newLineLoc = _text.IndexOf('\n', caretPos + 2);
+ if (newLineLoc == -1)
+ newLineLoc = TextLength;
+ else
+ newLineLoc++;
+ return newLineLoc;
+ }
+
private int FindLineDownChar(int index)
{
if (!IsMultiline)
@@ -1491,8 +1504,13 @@ namespace FlaxEngine.GUI
return true;
case KeyboardKeys.End:
{
+ // Select text from the current cursor point to the beginning of a new line
+ if (shiftDown && _selectionStart != -1)
+ SetSelection(_selectionStart, FindNextLineBegin());
// Move caret after last character
- SetSelection(TextLength);
+ else
+ SetSelection(TextLength);
+
return true;
}
case KeyboardKeys.Tab:
From c844c6b7f007599d53b8e2c7ba509ff3a2ec0c3e Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Thu, 5 Sep 2024 20:51:27 -0500
Subject: [PATCH 082/114] Add page up and down in textboxbase
---
Source/Engine/UI/GUI/Common/TextBoxBase.cs | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/Source/Engine/UI/GUI/Common/TextBoxBase.cs b/Source/Engine/UI/GUI/Common/TextBoxBase.cs
index c22899c7b..55f810211 100644
--- a/Source/Engine/UI/GUI/Common/TextBoxBase.cs
+++ b/Source/Engine/UI/GUI/Common/TextBoxBase.cs
@@ -1436,6 +1436,30 @@ namespace FlaxEngine.GUI
return true;
}
+ case KeyboardKeys.PageDown:
+ {
+ if (IsScrollable && IsMultiline)
+ {
+ var location = GetCharPosition(_selectionStart, out var height);
+ var sizeHeight = Size.Y / height;
+ location.Y += height * (int)sizeHeight;
+ TargetViewOffset = Vector2.Clamp(new Float2(0, location.Y), Float2.Zero, TextSize - new Float2(0, Size.Y));
+ SetSelection(HitTestText(location));
+ }
+ return true;
+ }
+ case KeyboardKeys.PageUp:
+ {
+ if (IsScrollable && IsMultiline)
+ {
+ var location = GetCharPosition(_selectionStart, out var height);
+ var sizeHeight = Size.Y / height;
+ location.Y -= height * (int)sizeHeight;
+ TargetViewOffset = Vector2.Clamp(new Float2(0, location.Y), Float2.Zero, TextSize - new Float2(0, Size.Y));
+ SetSelection(HitTestText(location));
+ }
+ return true;
+ }
case KeyboardKeys.Delete:
{
if (IsReadOnly)
From 2f268cab70f79ec3b55d72c70ab39f984fcb90b3 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 6 Sep 2024 15:47:13 -0500
Subject: [PATCH 083/114] Fix last list element label positioning.
---
Source/Editor/CustomEditors/GUI/PropertiesList.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/CustomEditors/GUI/PropertiesList.cs b/Source/Editor/CustomEditors/GUI/PropertiesList.cs
index 25580c503..49eef13d2 100644
--- a/Source/Editor/CustomEditors/GUI/PropertiesList.cs
+++ b/Source/Editor/CustomEditors/GUI/PropertiesList.cs
@@ -256,7 +256,7 @@ namespace FlaxEditor.CustomEditors.GUI
var firstChild = label.FirstChildControlContainer.Children[label.FirstChildControlIndex];
yStarts[i] = firstChild.PointToParent(this, Float2.Zero).Y;
if (i == count - 1)
- yStarts[i + 1] = firstChild.PointToParent(this, firstChild.Size).Y;
+ yStarts[i + 1] = firstChild.Parent.Bottom;
}
else
{
From f7ea45b14d3b080463478a8b0903e7f5cc444897 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 6 Sep 2024 16:10:35 -0500
Subject: [PATCH 084/114] Fix interface bindings clashing namespace and class
name if class has same name as namespace.
---
.../Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
index a972f1b78..5d0297991 100644
--- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
+++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
@@ -530,7 +530,7 @@ namespace Flax.Build.Bindings
// interface
if (apiType.IsInterface)
- return string.Format("FlaxEngine.Object.GetUnmanagedInterface({{0}}, typeof({0}))", apiType.FullNameManaged);
+ return string.Format("FlaxEngine.Object.GetUnmanagedInterface({{0}}, typeof({0}))", apiType.Name);
}
// Object reference property
@@ -590,7 +590,7 @@ namespace Flax.Build.Bindings
fullReturnValueType = $"{apiType.Namespace}.Interop.{returnValueType}";
// Interfaces are not supported by NativeMarshallingAttribute, marshal the parameter
- returnMarshalType = $"MarshalUsing(typeof({fullReturnValueType}Marshaller))";
+ returnMarshalType = $"MarshalUsing(typeof({returnValueType}Marshaller))";
}
else if (functionInfo.ReturnType.Type == "MonoArray" || functionInfo.ReturnType.Type == "MArray")
returnMarshalType = "MarshalUsing(typeof(FlaxEngine.Interop.SystemArrayMarshaller))";
@@ -2189,7 +2189,7 @@ namespace Flax.Build.Bindings
contents.Append(indent).AppendLine("/// ");
if (buildData.Target != null & buildData.Target.IsEditor)
contents.Append(indent).AppendLine("[HideInEditor]");
- contents.Append(indent).AppendLine($"[CustomMarshaller(typeof({interfaceInfo.Name}), MarshalMode.Default, typeof({marshallerFullName}))]");
+ contents.Append(indent).AppendLine($"[CustomMarshaller(typeof({interfaceInfo.Name}), MarshalMode.Default, typeof({marshallerName}))]");
contents.Append(indent).AppendLine($"public static class {marshallerName}");
contents.Append(indent).AppendLine("{");
contents.AppendLine("#pragma warning disable 1591");
From 6eee25e04a5621b7e68daeb44a17a080e8ebe86e Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 6 Sep 2024 17:45:04 -0500
Subject: [PATCH 085/114] Removed decals from effecting editor camera model.
---
Source/Engine/Level/Actors/Camera.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/Source/Engine/Level/Actors/Camera.cpp b/Source/Engine/Level/Actors/Camera.cpp
index a2822b09e..8263b943d 100644
--- a/Source/Engine/Level/Actors/Camera.cpp
+++ b/Source/Engine/Level/Actors/Camera.cpp
@@ -303,6 +303,7 @@ void Camera::GetMatrices(Matrix& view, Matrix& projection, const Viewport& viewp
void Camera::OnPreviewModelLoaded()
{
_previewModelBuffer.Setup(_previewModel.Get());
+ _previewModelBuffer.At(0).ReceiveDecals = false;
UpdateCache();
}
From 8353afa31cf0c7c50d24c49545a8a89baedf272b Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 6 Sep 2024 20:26:04 -0500
Subject: [PATCH 086/114] Dont close Flag Enum Comboboxes on option selected.
---
Source/Editor/GUI/EnumComboBox.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/Source/Editor/GUI/EnumComboBox.cs b/Source/Editor/GUI/EnumComboBox.cs
index d332bb8d0..94c6c50df 100644
--- a/Source/Editor/GUI/EnumComboBox.cs
+++ b/Source/Editor/GUI/EnumComboBox.cs
@@ -7,6 +7,7 @@ using System.Reflection;
using System.Runtime.InteropServices;
using FlaxEditor.CustomEditors;
using FlaxEditor.CustomEditors.Elements;
+using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.Scripting;
using FlaxEngine;
@@ -277,6 +278,14 @@ namespace FlaxEditor.GUI
}
}
+ ///
+ protected override void OnLayoutMenuButton(ContextMenuButton button, int index, bool construct = false)
+ {
+ base.OnLayoutMenuButton(button, index, construct);
+ if (IsFlags)
+ button.CloseMenuOnClick = false;
+ }
+
///
protected override void OnItemClicked(int index)
{
From fd30872f5ef43ede0dbb71a90c13e26a16e42f9c Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Fri, 6 Sep 2024 20:30:20 -0500
Subject: [PATCH 087/114] Add check for entries count.
---
Source/Engine/Level/Actors/Camera.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Source/Engine/Level/Actors/Camera.cpp b/Source/Engine/Level/Actors/Camera.cpp
index 8263b943d..e5d770343 100644
--- a/Source/Engine/Level/Actors/Camera.cpp
+++ b/Source/Engine/Level/Actors/Camera.cpp
@@ -303,7 +303,8 @@ void Camera::GetMatrices(Matrix& view, Matrix& projection, const Viewport& viewp
void Camera::OnPreviewModelLoaded()
{
_previewModelBuffer.Setup(_previewModel.Get());
- _previewModelBuffer.At(0).ReceiveDecals = false;
+ if (_previewModelBuffer.Count() > 0)
+ _previewModelBuffer.At(0).ReceiveDecals = false;
UpdateCache();
}
From 545e59aba50e7b3af5d7f6103383a821b2e76734 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Mon, 9 Sep 2024 05:59:17 +0200
Subject: [PATCH 088/114] Fix lightmap uvs density view to handle `scale in
lightmap` and outline non-static objects
#2080
---
.../Shaders/Editor/LightmapUVsDensity.flax | 4 +-
Source/Engine/Foliage/Foliage.cpp | 4 +
Source/Engine/Graphics/Models/Mesh.cpp | 4 +
Source/Engine/Graphics/Models/MeshBase.h | 4 +
.../Graphics/Textures/StreamingTexture.cpp | 6 +-
Source/Engine/Level/Actors/StaticModel.cpp | 8 ++
.../Renderer/Editor/LightmapUVsDensity.cpp | 74 +------------------
Source/Engine/Terrain/TerrainChunk.cpp | 8 ++
.../Shaders/Editor/LightmapUVsDensity.shader | 6 +-
9 files changed, 42 insertions(+), 76 deletions(-)
diff --git a/Content/Shaders/Editor/LightmapUVsDensity.flax b/Content/Shaders/Editor/LightmapUVsDensity.flax
index 2aa2cc60f..d7f265055 100644
--- a/Content/Shaders/Editor/LightmapUVsDensity.flax
+++ b/Content/Shaders/Editor/LightmapUVsDensity.flax
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a58cc65b8291c10e4fafa81df67dc30e9e1b80fd903ae2e4d173f3c586faf59f
-size 4391
+oid sha256:a0ed25e40158253b2fdd565e7ad0e745308eadc5091a89502cbc1fa22288039f
+size 4515
diff --git a/Source/Engine/Foliage/Foliage.cpp b/Source/Engine/Foliage/Foliage.cpp
index bb9459677..83a89aba1 100644
--- a/Source/Engine/Foliage/Foliage.cpp
+++ b/Source/Engine/Foliage/Foliage.cpp
@@ -494,6 +494,10 @@ void Foliage::DrawType(RenderContext& renderContext, const FoliageType& type, Dr
batch.DrawCall.Surface.GeometrySize = mesh.GetBox().GetSize();
batch.DrawCall.Surface.Skinning = nullptr;
batch.DrawCall.WorldDeterminantSign = 1;
+#if USE_EDITOR
+ if (renderContext.View.Mode == ViewMode::LightmapUVsDensity)
+ batch.DrawCall.Surface.LODDitherFactor = type.ScaleInLightmap; // See LightmapUVsDensityMaterialShader
+#endif
if (EnumHasAnyFlags(drawModes, DrawPass::Forward))
{
diff --git a/Source/Engine/Graphics/Models/Mesh.cpp b/Source/Engine/Graphics/Models/Mesh.cpp
index 39439af5c..a890da21d 100644
--- a/Source/Engine/Graphics/Models/Mesh.cpp
+++ b/Source/Engine/Graphics/Models/Mesh.cpp
@@ -485,6 +485,8 @@ void Mesh::Draw(const RenderContext& renderContext, const DrawInfo& info, float
const ViewMode viewMode = renderContext.View.Mode;
if (viewMode == ViewMode::LightmapUVsDensity || viewMode == ViewMode::LODPreview)
GBufferPass::AddIndexBufferToModelLOD(_indexBuffer, &((Model*)_model)->LODs[_lodIndex]);
+ if (viewMode == ViewMode::LightmapUVsDensity)
+ drawCall.Surface.LODDitherFactor = info.LightmapScale; // See LightmapUVsDensityMaterialShader
#endif
// Push draw call to the render list
@@ -547,6 +549,8 @@ void Mesh::Draw(const RenderContextBatch& renderContextBatch, const DrawInfo& in
const ViewMode viewMode = renderContextBatch.GetMainContext().View.Mode;
if (viewMode == ViewMode::LightmapUVsDensity || viewMode == ViewMode::LODPreview)
GBufferPass::AddIndexBufferToModelLOD(_indexBuffer, &((Model*)_model)->LODs[_lodIndex]);
+ if (viewMode == ViewMode::LightmapUVsDensity)
+ drawCall.Surface.LODDitherFactor = info.LightmapScale; // See LightmapUVsDensityMaterialShader
#endif
// Push draw call to the render lists
diff --git a/Source/Engine/Graphics/Models/MeshBase.h b/Source/Engine/Graphics/Models/MeshBase.h
index 9963ec8ba..a8f7e36b8 100644
--- a/Source/Engine/Graphics/Models/MeshBase.h
+++ b/Source/Engine/Graphics/Models/MeshBase.h
@@ -241,5 +241,9 @@ public:
/// The object sorting key.
///
int16 SortOrder;
+
+#if USE_EDITOR
+ float LightmapScale = -1.0f;
+#endif
};
};
diff --git a/Source/Engine/Graphics/Textures/StreamingTexture.cpp b/Source/Engine/Graphics/Textures/StreamingTexture.cpp
index ecd9bbd55..2e1aaf457 100644
--- a/Source/Engine/Graphics/Textures/StreamingTexture.cpp
+++ b/Source/Engine/Graphics/Textures/StreamingTexture.cpp
@@ -213,7 +213,7 @@ protected:
const int32 dstMips = dstTexture->MipLevels();
GPUTexture* srcTexture = _streamingTexture->GetTexture();
const int32 srcMips = srcTexture->MipLevels();
- const int32 srcMissingMips = srcMips - srcTexture->ResidentMipLevels();;
+ const int32 srcMissingMips = srcMips - srcTexture->ResidentMipLevels();
const int32 mipCount = Math::Min(dstMips, srcMips);
for (int32 mipIndex = srcMissingMips; mipIndex < mipCount; mipIndex++)
{
@@ -238,10 +238,10 @@ protected:
void OnSync() override
{
+ _newTexture->SetResidentMipLevels(_uploadedMipCount);
Swap(_streamingTexture->_texture, _newTexture);
- _streamingTexture->GetTexture()->SetResidentMipLevels(_uploadedMipCount);
- _streamingTexture->ResidencyChanged();
SAFE_DELETE_GPU_RESOURCE(_newTexture);
+ _streamingTexture->ResidencyChanged();
// Base
GPUTask::OnSync();
diff --git a/Source/Engine/Level/Actors/StaticModel.cpp b/Source/Engine/Level/Actors/StaticModel.cpp
index dd77692b3..8d603ec37 100644
--- a/Source/Engine/Level/Actors/StaticModel.cpp
+++ b/Source/Engine/Level/Actors/StaticModel.cpp
@@ -357,6 +357,10 @@ void StaticModel::Draw(RenderContext& renderContext)
draw.ForcedLOD = _forcedLod;
draw.SortOrder = _sortOrder;
draw.VertexColors = _vertexColorsCount ? _vertexColorsBuffer : nullptr;
+#if USE_EDITOR
+ if (HasStaticFlag(StaticFlags::Lightmap))
+ draw.LightmapScale = _scaleInLightmap;
+#endif
Model->Draw(renderContext, draw);
@@ -391,6 +395,10 @@ void StaticModel::Draw(RenderContextBatch& renderContextBatch)
draw.ForcedLOD = _forcedLod;
draw.SortOrder = _sortOrder;
draw.VertexColors = _vertexColorsCount ? _vertexColorsBuffer : nullptr;
+#if USE_EDITOR
+ if (HasStaticFlag(StaticFlags::Lightmap))
+ draw.LightmapScale = _scaleInLightmap;
+#endif
Model->Draw(renderContextBatch, draw);
diff --git a/Source/Engine/Renderer/Editor/LightmapUVsDensity.cpp b/Source/Engine/Renderer/Editor/LightmapUVsDensity.cpp
index 113d997f2..418ecfc1d 100644
--- a/Source/Engine/Renderer/Editor/LightmapUVsDensity.cpp
+++ b/Source/Engine/Renderer/Editor/LightmapUVsDensity.cpp
@@ -15,7 +15,6 @@
#include "Engine/Renderer/DrawCall.h"
#include "Engine/Foliage/Foliage.h"
#include "Engine/ShadowsOfMordor/Builder.Config.h"
-#include "Engine/Level/Level.h"
#include "Engine/Level/Scene/Scene.h"
#include "Engine/Level/Actors/StaticModel.h"
@@ -70,40 +69,6 @@ DrawPass LightmapUVsDensityMaterialShader::GetDrawModes() const
return DrawPass::GBuffer;
}
-namespace
-{
- Actor* FindActorByDrawCall(Actor* actor, const DrawCall& drawCall, float& scaleInLightmap)
- {
- // TODO: large-worlds
- const auto asStaticModel = ScriptingObject::Cast(actor);
- if (asStaticModel && asStaticModel->GetPerInstanceRandom() == drawCall.PerInstanceRandom && asStaticModel->GetPosition() == drawCall.ObjectPosition)
- {
- scaleInLightmap = asStaticModel->GetScaleInLightmap();
- return asStaticModel;
- }
- const auto asFoliage = ScriptingObject::Cast(actor);
- if (asFoliage)
- {
- for (auto i = asFoliage->Instances.Begin(); i.IsNotEnd(); ++i)
- {
- auto& instance = *i;
- if (instance.Random == drawCall.PerInstanceRandom && instance.Transform.Translation == drawCall.ObjectPosition)
- {
- scaleInLightmap = asFoliage->FoliageTypes[instance.Type].ScaleInLightmap;
- return asFoliage;
- }
- }
- }
- for (Actor* child : actor->Children)
- {
- const auto other = FindActorByDrawCall(child, drawCall, scaleInLightmap);
- if (other)
- return other;
- }
- return nullptr;
- }
-}
-
void LightmapUVsDensityMaterialShader::Bind(BindParameters& params)
{
// Prepare
@@ -121,33 +86,6 @@ void LightmapUVsDensityMaterialShader::Bind(BindParameters& params)
_ps->Init(psDesc);
}
- // Find the static model that produced this draw call
- const Actor* drawCallActor = nullptr;
- float scaleInLightmap = 1.0f;
- if (params.RenderContext.Task)
- {
- // Skip this lookup as it's too slow
-
- /*if (params.RenderContext.Task->ActorsSource & ActorsSources::CustomActors)
- {
- for (auto actor : params.RenderContext.Task->CustomActors)
- {
- drawCallActor = FindActorByDrawCall(actor, drawCall, scaleInLightmap);
- if (drawCallActor)
- break;
- }
- }
- if (!drawCallActor && params.RenderContext.Task->ActorsSource & ActorsSources::Scenes)
- {
- for (auto& scene : Level::Scenes)
- {
- drawCallActor = FindActorByDrawCall(scene, drawCall, scaleInLightmap);
- if (drawCallActor)
- break;
- }
- }*/
- }
-
// Bind constants
if (cb && cb->GetSize())
{
@@ -166,19 +104,15 @@ void LightmapUVsDensityMaterialShader::Bind(BindParameters& params)
data.LightmapSize = 1024.0f;
data.LightmapArea = drawCall.Surface.LightmapUVsArea;
const ModelLOD* drawCallModelLod;
- if (GBufferPass::IndexBufferToModelLOD.TryGet(drawCall.Geometry.IndexBuffer, drawCallModelLod))
+ float scaleInLightmap = drawCall.Surface.LODDitherFactor; // Reuse field
+ if (scaleInLightmap < 0.0f)
+ data.LightmapSize = -1.0f; // Not using lightmap
+ else if (GBufferPass::IndexBufferToModelLOD.TryGet(drawCall.Geometry.IndexBuffer, drawCallModelLod))
{
// Calculate current lightmap slot size for the object (matches the ShadowsOfMordor calculations when baking the lighting)
float globalObjectsScale = 1.0f;
int32 atlasSize = 1024;
int32 chartsPadding = 3;
- const Scene* drawCallScene = drawCallActor ? drawCallActor->GetScene() : (Level::Scenes.Count() != 0 ? Level::Scenes[0] : nullptr);
- if (drawCallScene)
- {
- globalObjectsScale = drawCallScene->Info.LightmapSettings.GlobalObjectsScale;
- atlasSize = (int32)drawCallScene->Info.LightmapSettings.AtlasSize;
- chartsPadding = drawCallScene->Info.LightmapSettings.ChartsPadding;
- }
BoundingBox box = drawCallModelLod->GetBox(drawCall.World);
Float3 size = box.GetSize();
float dimensionsCoeff = size.AverageArithmetic();
diff --git a/Source/Engine/Terrain/TerrainChunk.cpp b/Source/Engine/Terrain/TerrainChunk.cpp
index 6902b5d8d..12613e1f9 100644
--- a/Source/Engine/Terrain/TerrainChunk.cpp
+++ b/Source/Engine/Terrain/TerrainChunk.cpp
@@ -123,6 +123,10 @@ void TerrainChunk::Draw(const RenderContext& renderContext) const
}
drawCall.WorldDeterminantSign = Math::FloatSelect(drawCall.World.RotDeterminant(), 1, -1);
drawCall.PerInstanceRandom = _perInstanceRandom;
+#if USE_EDITOR
+ if (renderContext.View.Mode == ViewMode::LightmapUVsDensity)
+ drawCall.Surface.LODDitherFactor = 1.0f; // See LightmapUVsDensityMaterialShader
+#endif
// Add half-texel offset for heightmap sampling in vertex shader
//const float lodHeightmapSize = Math::Max(1, drawCall.TerrainData.Heightmap->Width() >> lod);
@@ -180,6 +184,10 @@ void TerrainChunk::Draw(const RenderContext& renderContext, MaterialBase* materi
}
drawCall.WorldDeterminantSign = Math::FloatSelect(drawCall.World.RotDeterminant(), 1, -1);
drawCall.PerInstanceRandom = _perInstanceRandom;
+#if USE_EDITOR
+ if (renderContext.View.Mode == ViewMode::LightmapUVsDensity)
+ drawCall.Surface.LODDitherFactor = 1.0f; // See LightmapUVsDensityMaterialShader
+#endif
// Add half-texel offset for heightmap sampling in vertex shader
//const float lodHeightmapSize = Math::Max(1, drawCall.TerrainData.Heightmap->Width() >> lod);
diff --git a/Source/Shaders/Editor/LightmapUVsDensity.shader b/Source/Shaders/Editor/LightmapUVsDensity.shader
index b1fafd193..588332a00 100644
--- a/Source/Shaders/Editor/LightmapUVsDensity.shader
+++ b/Source/Shaders/Editor/LightmapUVsDensity.shader
@@ -98,7 +98,11 @@ void PS(in PixelInput input, out float4 Light : SV_Target0, out float4 RT0 : SV_
float3 minColor = float3(235/255.0, 52/255.0, 67/255.0);
float3 bestColor = float3(51/255.0, 235/255.0, 70/255.0);
float3 maxColor = float3(52/255.0, 149/255.0, 235/255.0);
- if (density < bestDensity)
+ if (LightmapSize < 0.0f)
+ {
+ color = float3(52/255.0, 229/255.0, 235/255.0); // No lightmap
+ }
+ else if (density < bestDensity)
{
color = lerp(minColor, bestColor, (density - minDensity) / (bestDensity - minDensity));
}
From 25aa5bee85bebfe934e01ce87e74386f37078714 Mon Sep 17 00:00:00 2001
From: envision3d
Date: Fri, 9 Aug 2024 00:16:38 -0500
Subject: [PATCH 089/114] fix crash with prefab window open on script reload
---
Source/Editor/Viewport/PrefabWindowViewport.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Viewport/PrefabWindowViewport.cs b/Source/Editor/Viewport/PrefabWindowViewport.cs
index fb5e74d4d..acac4767f 100644
--- a/Source/Editor/Viewport/PrefabWindowViewport.cs
+++ b/Source/Editor/Viewport/PrefabWindowViewport.cs
@@ -632,7 +632,7 @@ namespace FlaxEditor.Viewport
_debugDrawActors.Clear();
foreach (var child in SceneGraphRoot.ChildNodes)
{
- if (child is not ActorNode actorNode)
+ if (child is not ActorNode actorNode || !actorNode.Actor)
continue;
var actor = actorNode.Actor;
if (collectActors)
From c42cc266f9b7187dc05920ae6bb3d68f7b04daba Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Mon, 9 Sep 2024 07:12:40 +0200
Subject: [PATCH 090/114] Add unit test for nested namespace type
#2626 #2914
---
Source/Engine/Tests/TestScripting.cpp | 6 ++++++
Source/Engine/Tests/TestScripting.h | 15 +++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/Source/Engine/Tests/TestScripting.cpp b/Source/Engine/Tests/TestScripting.cpp
index ae1c30a3c..cfeb24a38 100644
--- a/Source/Engine/Tests/TestScripting.cpp
+++ b/Source/Engine/Tests/TestScripting.cpp
@@ -7,6 +7,12 @@
#include "Engine/Scripting/ManagedCLR/MUtils.h"
#include
+Foo::Foo(const SpawnParams& params)
+ : ScriptingObject(params)
+ , FooInterface(nullptr)
+{
+}
+
TestNesting::TestNesting(const SpawnParams& params)
: SerializableScriptingObject(params)
{
diff --git a/Source/Engine/Tests/TestScripting.h b/Source/Engine/Tests/TestScripting.h
index 5cd61cbc7..19fd76351 100644
--- a/Source/Engine/Tests/TestScripting.h
+++ b/Source/Engine/Tests/TestScripting.h
@@ -8,6 +8,21 @@
#include "Engine/Scripting/ScriptingObject.h"
#include "Engine/Scripting/SerializableScriptingObject.h"
+// Test interface (name conflict with namespace)
+API_INTERFACE(Namespace="Foo") class FLAXENGINE_API IFoo
+{
+ DECLARE_SCRIPTING_TYPE_MINIMAL(IFoo);
+};
+
+// Test class (name conflict with namespace)
+API_CLASS(Namespace="Foo") class FLAXENGINE_API Foo : public ScriptingObject
+{
+ DECLARE_SCRIPTING_TYPE(Foo);
+
+ // Test field.
+ API_FIELD() IFoo* FooInterface;
+};
+
// Test compilation with nested types.
API_CLASS() class TestNesting : public SerializableScriptingObject
{
From 89462856e3ec70e31fd18e7df5eada74784886af Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Mon, 9 Sep 2024 07:34:45 +0200
Subject: [PATCH 091/114] Fix mixed tab/spaces in script templates
#2906
---
Content/Editor/Scripting/CSharpEmptyTemplate.cs | 1 -
Content/Editor/Scripting/CppAssetTemplate.h | 4 ++--
Content/Editor/Scripting/ShaderTemplate.shader | 4 ++--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/Content/Editor/Scripting/CSharpEmptyTemplate.cs b/Content/Editor/Scripting/CSharpEmptyTemplate.cs
index ea9626f7b..b221b83d9 100644
--- a/Content/Editor/Scripting/CSharpEmptyTemplate.cs
+++ b/Content/Editor/Scripting/CSharpEmptyTemplate.cs
@@ -3,4 +3,3 @@ using System.Collections.Generic;
using FlaxEngine;
namespace %namespace%;
-
diff --git a/Content/Editor/Scripting/CppAssetTemplate.h b/Content/Editor/Scripting/CppAssetTemplate.h
index f6b1421dd..ad452bc62 100644
--- a/Content/Editor/Scripting/CppAssetTemplate.h
+++ b/Content/Editor/Scripting/CppAssetTemplate.h
@@ -13,10 +13,10 @@ API_CLASS() class %module%%class% : public ISerializable
API_AUTO_SERIALIZATION();
DECLARE_SCRIPTING_TYPE_NO_SPAWN(%class%);
public:
- // Custom float value.
+ // Custom float value.
API_FIELD(Attributes = "Range(0, 20), EditorOrder(0), EditorDisplay(\"Data\")")
float FloatValue = 20.0f;
- // Custom vector data.
+ // Custom vector data.
API_FIELD(Attributes = "EditorOrder(1), EditorDisplay(\"Data\")")
Vector3 Vector3Value = Vector3(0.1f);
};
diff --git a/Content/Editor/Scripting/ShaderTemplate.shader b/Content/Editor/Scripting/ShaderTemplate.shader
index 5e7034adc..869a32219 100644
--- a/Content/Editor/Scripting/ShaderTemplate.shader
+++ b/Content/Editor/Scripting/ShaderTemplate.shader
@@ -7,6 +7,6 @@ META_CB_END
META_PS(true, FEATURE_LEVEL_ES2)
float4 PS_Fullscreen(Quad_VS2PS input) : SV_Target
{
- // Solid color fill from the constant buffer passed from code
- return Color;
+ // Solid color fill from the constant buffer passed from code
+ return Color;
}
From c62575612b32e85f131878327e7f5893833e52e9 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Mon, 9 Sep 2024 12:34:18 +0200
Subject: [PATCH 092/114] Fix missing parameters metadata on nested material
layers
#731
---
Source/Editor/Surface/MaterialSurface.cs | 2 +-
Source/Editor/Surface/SurfaceUtils.cs | 218 ++++++++----------
.../MaterialGenerator.Layer.cpp | 11 +-
3 files changed, 100 insertions(+), 131 deletions(-)
diff --git a/Source/Editor/Surface/MaterialSurface.cs b/Source/Editor/Surface/MaterialSurface.cs
index 0d6e437b8..077e59fc0 100644
--- a/Source/Editor/Surface/MaterialSurface.cs
+++ b/Source/Editor/Surface/MaterialSurface.cs
@@ -17,7 +17,7 @@ namespace FlaxEditor.Surface
public class MaterialSurface : VisjectSurface
{
///
- public MaterialSurface(IVisjectSurfaceOwner owner, Action onSave, FlaxEditor.Undo undo)
+ public MaterialSurface(IVisjectSurfaceOwner owner, Action onSave = null, FlaxEditor.Undo undo = null)
: base(owner, onSave, undo)
{
}
diff --git a/Source/Editor/Surface/SurfaceUtils.cs b/Source/Editor/Surface/SurfaceUtils.cs
index 86acf7b26..fe79ec3af 100644
--- a/Source/Editor/Surface/SurfaceUtils.cs
+++ b/Source/Editor/Surface/SurfaceUtils.cs
@@ -73,9 +73,8 @@ namespace FlaxEditor.Surface
// By name
if (Editor.Instance.Options.Options.General.ScriptMembersOrder == GeneralOptions.MembersOrder.Alphabetical)
- {
return string.Compare(x.DisplayName, y.DisplayName, StringComparison.InvariantCulture);
- }
+
// Keep same order
return 0;
}
@@ -106,6 +105,79 @@ namespace FlaxEditor.Surface
}
}
+ private sealed class DummyMaterialSurfaceOwner : IVisjectSurfaceOwner
+ {
+ public Asset SurfaceAsset => null;
+ public string SurfaceName => null;
+ public FlaxEditor.Undo Undo => null;
+ public byte[] SurfaceData { get; set; }
+ public VisjectSurfaceContext ParentContext => null;
+
+ public void OnContextCreated(VisjectSurfaceContext context)
+ {
+ }
+
+ public void OnSurfaceEditedChanged()
+ {
+ }
+
+ public void OnSurfaceGraphEdited()
+ {
+ }
+
+ public void OnSurfaceClose()
+ {
+ }
+ }
+
+ private static void FindGraphParameters(Material material, List surfaceParameters)
+ {
+ if (material == null || material.WaitForLoaded())
+ return;
+ var surfaceData = material.LoadSurface(false);
+ if (surfaceData != null && surfaceData.Length > 0)
+ {
+ var surfaceOwner = new DummyMaterialSurfaceOwner { SurfaceData = surfaceData };
+ var surface = new MaterialSurface(surfaceOwner);
+ if (!surface.Load())
+ {
+ surfaceParameters.AddRange(surface.Parameters);
+
+ // Search for any nested parameters (eg. via Sample Layer)
+ foreach (var node in surface.Nodes)
+ {
+ if (node.GroupArchetype.GroupID == 8 && node.Archetype.TypeID == 1) // Sample Layer
+ {
+ if (node.Values != null && node.Values.Length > 0 && node.Values[0] is Guid layerId)
+ {
+ var layer = FlaxEngine.Content.Load(layerId);
+ if (layer)
+ {
+ FindGraphParameters(layer, surfaceParameters);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static void FindGraphParameters(MaterialBase materialBase, List surfaceParameters)
+ {
+ while (materialBase != null && !materialBase.WaitForLoaded())
+ {
+ if (materialBase is MaterialInstance materialInstance)
+ {
+ materialBase = materialInstance.BaseMaterial;
+ }
+ else if (materialBase is Material material)
+ {
+ FindGraphParameters(material, surfaceParameters);
+ break;
+ }
+ }
+ }
+
internal static GraphParameterData[] InitGraphParameters(IEnumerable parameters, Material material)
{
int count = parameters.Count();
@@ -113,128 +185,11 @@ namespace FlaxEditor.Surface
int i = 0;
// Load material surface parameters meta to use it for material instance parameters editing
- SurfaceParameter[] surfaceParameters = null;
+ var surfaceParameters = new List();
try
{
Profiler.BeginEvent("Init Material Parameters UI Data");
-
- if (material != null && !material.WaitForLoaded())
- {
- var surfaceData = material.LoadSurface(false);
- if (surfaceData != null && surfaceData.Length > 0)
- {
- using (var memoryStream = new MemoryStream(surfaceData))
- using (var stream = new BinaryReader(memoryStream))
- {
- // IMPORTANT! This must match C++ Graph format
-
- // Magic Code
- int tmp = stream.ReadInt32();
- if (tmp != 1963542358)
- {
- // Error
- throw new Exception("Invalid Graph format version");
- }
-
- // Version
- var version = stream.ReadUInt32();
- var guidBytes = new byte[16];
- if (version < 7000)
- {
- // Time saved (not used anymore to prevent binary diffs after saving unmodified surface)
- stream.ReadInt64();
-
- // Nodes count
- int nodesCount = stream.ReadInt32();
-
- // Parameters count
- int parametersCount = stream.ReadInt32();
-
- // For each node
- for (int j = 0; j < nodesCount; j++)
- {
- // ID
- stream.ReadUInt32();
-
- // Type
- stream.ReadUInt16();
- stream.ReadUInt16();
- }
-
- // For each param
- surfaceParameters = new SurfaceParameter[parametersCount];
- for (int j = 0; j < parametersCount; j++)
- {
- // Create param
- var param = new SurfaceParameter();
- surfaceParameters[j] = param;
-
- // Properties
- param.Type = new ScriptType(VisjectSurfaceContext.GetGraphParameterValueType((VisjectSurfaceContext.GraphParamType_Deprecated)stream.ReadByte()));
- stream.Read(guidBytes, 0, 16);
- param.ID = new Guid(guidBytes);
- param.Name = stream.ReadStr(97);
- param.IsPublic = stream.ReadByte() != 0;
- var isStatic = stream.ReadByte() != 0;
- var isUIVisible = stream.ReadByte() != 0;
- var isUIEditable = stream.ReadByte() != 0;
-
- // References [Deprecated]
- int refsCount = stream.ReadInt32();
- for (int k = 0; k < refsCount; k++)
- stream.ReadUInt32();
-
- // Value
- stream.ReadCommonValue(ref param.Value);
-
- // Meta
- param.Meta.Load(stream);
- }
- }
- else if (version == 7000)
- {
- // Nodes count
- int nodesCount = stream.ReadInt32();
-
- // Parameters count
- int parametersCount = stream.ReadInt32();
-
- // For each node
- for (int j = 0; j < nodesCount; j++)
- {
- // ID
- stream.ReadUInt32();
-
- // Type
- stream.ReadUInt16();
- stream.ReadUInt16();
- }
-
- // For each param
- surfaceParameters = new SurfaceParameter[parametersCount];
- for (int j = 0; j < parametersCount; j++)
- {
- // Create param
- var param = new SurfaceParameter();
- surfaceParameters[j] = param;
-
- // Properties
- param.Type = stream.ReadVariantScriptType();
- stream.Read(guidBytes, 0, 16);
- param.ID = new Guid(guidBytes);
- param.Name = stream.ReadStr(97);
- param.IsPublic = stream.ReadByte() != 0;
-
- // Value
- param.Value = stream.ReadVariant();
-
- // Meta
- param.Meta.Load(stream);
- }
- }
- }
- }
- }
+ FindGraphParameters(material, surfaceParameters);
}
catch (Exception ex)
{
@@ -248,7 +203,26 @@ namespace FlaxEditor.Surface
foreach (var parameter in parameters)
{
- var surfaceParameter = surfaceParameters?.FirstOrDefault(x => x.ID == parameter.ParameterID);
+ var parameterId = parameter.ParameterID;
+ var surfaceParameter = surfaceParameters.FirstOrDefault(x => x.ID == parameterId);
+ if (surfaceParameter == null)
+ {
+ // Permutate original parameter ID to reflect logic in MaterialGenerator::prepareLayer used for nested layers
+ unsafe
+ {
+ var raw = parameterId;
+ var interop = *(FlaxEngine.Json.JsonSerializer.GuidInterop*)&raw;
+ interop.A -= (uint)(i * 17 + 13);
+ parameterId = *(Guid*)&interop;
+ }
+ surfaceParameter = surfaceParameters.FirstOrDefault(x => x.ID == parameterId);
+ }
+ if (surfaceParameter != null)
+ {
+ // Reorder so it won't be picked by other parameter that uses the same ID (eg. params from duplicated materials used as layers in other material)
+ surfaceParameters.Remove(surfaceParameter);
+ surfaceParameters.Add(surfaceParameter);
+ }
var attributes = surfaceParameter?.Meta.GetAttributes() ?? FlaxEngine.Utils.GetEmptyArray();
data[i] = new GraphParameterData(null, parameter.Name, parameter.IsPublic, ToType(parameter.ParameterType), attributes, parameter);
i++;
diff --git a/Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Layer.cpp b/Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Layer.cpp
index 4b3654865..7f316dfd5 100644
--- a/Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Layer.cpp
+++ b/Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Layer.cpp
@@ -192,15 +192,10 @@ void MaterialGenerator::prepareLayer(MaterialLayer* layer, bool allowVisiblePara
// For all not root layers (sub-layers) we won't to change theirs ID in order to prevent duplicated ID)
m.SrcId = param->Identifier;
- if (isRooLayer)
+ m.DstId = param->Identifier;
+ if (!isRooLayer)
{
- // Use the same ID (so we can edit it)
- m.DstId = param->Identifier;
- }
- else
- {
- // Generate new ID
- m.DstId = param->Identifier;
+ // Generate new ID (stable permutation based on the original ID)
m.DstId.A += _parameters.Count() * 17 + 13;
}
layer->ParamIdsMappings.Add(m);
From bbb0d36494dc560deac0d30293e4050243a562b2 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Mon, 9 Sep 2024 18:21:59 +0200
Subject: [PATCH 093/114] Fixed issues found by PVS-Studio
---
.../Editors/ActorTransformEditor.cs | 4 ++--
.../CustomEditors/Editors/IntegerEditor.cs | 1 -
Source/Editor/GUI/ContextMenu/ContextMenu.cs | 4 +---
Source/Editor/GUI/Timeline/AnimationTimeline.cs | 2 +-
.../Editor/GUI/Timeline/Undo/EditTrackAction.cs | 9 ++++-----
Source/Editor/States/LoadingState.cs | 5 +++--
Source/Editor/Surface/SurfaceNode.cs | 4 +++-
.../Surface/VisjectSurface.Serialization.cs | 14 ++++++--------
.../Editor/Windows/Assets/BehaviorTreeWindow.cs | 3 +--
.../Editor/Windows/Assets/VisualScriptWindow.cs | 3 ++-
Source/Engine/UI/GUI/ContainerControl.cs | 16 ++++++++--------
11 files changed, 31 insertions(+), 34 deletions(-)
diff --git a/Source/Editor/CustomEditors/Editors/ActorTransformEditor.cs b/Source/Editor/CustomEditors/Editors/ActorTransformEditor.cs
index e341d4d4f..1d65ec71c 100644
--- a/Source/Editor/CustomEditors/Editors/ActorTransformEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/ActorTransformEditor.cs
@@ -123,10 +123,10 @@ namespace FlaxEditor.CustomEditors.Editors
_linkButton.Clicked += ToggleLink;
ToggleEnabled();
SetLinkStyle();
- var textSize = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText(LinkedLabel.Text.Value);
- _linkButton.LocalX += textSize.X + 10;
if (LinkedLabel != null)
{
+ var textSize = FlaxEngine.GUI.Style.Current.FontMedium.MeasureText(LinkedLabel.Text.Value);
+ _linkButton.LocalX += textSize.X + 10;
LinkedLabel.SetupContextMenu += (label, menu, editor) =>
{
menu.AddSeparator();
diff --git a/Source/Editor/CustomEditors/Editors/IntegerEditor.cs b/Source/Editor/CustomEditors/Editors/IntegerEditor.cs
index 4f6c2a9e7..16bcde242 100644
--- a/Source/Editor/CustomEditors/Editors/IntegerEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/IntegerEditor.cs
@@ -50,7 +50,6 @@ namespace FlaxEditor.CustomEditors.Editors
return;
}
}
- if (_element == null)
{
// Use int value editor
var element = layout.IntegerValue();
diff --git a/Source/Editor/GUI/ContextMenu/ContextMenu.cs b/Source/Editor/GUI/ContextMenu/ContextMenu.cs
index cb197e141..80a2d7494 100644
--- a/Source/Editor/GUI/ContextMenu/ContextMenu.cs
+++ b/Source/Editor/GUI/ContextMenu/ContextMenu.cs
@@ -337,14 +337,12 @@ namespace FlaxEditor.GUI.ContextMenu
///
/// Adds the separator.
///
- /// Created context menu item control.
- public ContextMenuSeparator AddSeparator()
+ public void AddSeparator()
{
var item = new ContextMenuSeparator(this)
{
Parent = _panel
};
- return item;
}
///
diff --git a/Source/Editor/GUI/Timeline/AnimationTimeline.cs b/Source/Editor/GUI/Timeline/AnimationTimeline.cs
index 331cb6f44..63329bfc0 100644
--- a/Source/Editor/GUI/Timeline/AnimationTimeline.cs
+++ b/Source/Editor/GUI/Timeline/AnimationTimeline.cs
@@ -130,9 +130,9 @@ namespace FlaxEditor.GUI.Timeline
public override void OnPlay()
{
var time = CurrentTime;
- _preview.Play();
if (_preview != null)
{
+ _preview.Play();
Editor.Internal_SetAnimationTime(Object.GetUnmanagedPtr(_preview.PreviewActor), time);
}
diff --git a/Source/Editor/GUI/Timeline/Undo/EditTrackAction.cs b/Source/Editor/GUI/Timeline/Undo/EditTrackAction.cs
index 0714b02e2..b03dc3d76 100644
--- a/Source/Editor/GUI/Timeline/Undo/EditTrackAction.cs
+++ b/Source/Editor/GUI/Timeline/Undo/EditTrackAction.cs
@@ -34,6 +34,8 @@ namespace FlaxEditor.GUI.Timeline.Undo
private void Set(byte[] data)
{
+ if (_timeline == null)
+ return;
var track = _timeline.FindTrack(_name);
using (var memory = new MemoryStream(data))
using (var stream = new BinaryReader(memory))
@@ -42,11 +44,8 @@ namespace FlaxEditor.GUI.Timeline.Undo
track.Flags = (TrackFlags)stream.ReadByte();
track.Archetype.Load(Timeline.FormatVersion, track, stream);
}
- if (_timeline != null)
- {
- _timeline.ArrangeTracks();
- _timeline.MarkAsEdited();
- }
+ _timeline.ArrangeTracks();
+ _timeline.MarkAsEdited();
track.OnUndo();
}
diff --git a/Source/Editor/States/LoadingState.cs b/Source/Editor/States/LoadingState.cs
index 93495f750..bc7984af9 100644
--- a/Source/Editor/States/LoadingState.cs
+++ b/Source/Editor/States/LoadingState.cs
@@ -57,8 +57,9 @@ namespace FlaxEditor.States
{
// Generate project files when Cache is missing or was cleared previously
var projectFolderPath = Editor.GameProject?.ProjectFolderPath;
- if (!Directory.Exists(Path.Combine(projectFolderPath, "Cache", "Intermediate")) ||
- !Directory.Exists(Path.Combine(projectFolderPath, "Cache", "Projects")))
+ if (!string.IsNullOrEmpty(projectFolderPath) &&
+ (!Directory.Exists(Path.Combine(projectFolderPath, "Cache", "Intermediate")) ||
+ !Directory.Exists(Path.Combine(projectFolderPath, "Cache", "Projects"))))
{
var customArgs = Editor.CodeEditing.SelectedEditor?.GenerateProjectCustomArgs;
ScriptsBuilder.GenerateProject(customArgs);
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index 10f079579..936b68f04 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -976,10 +976,12 @@ namespace FlaxEditor.Surface
else
Array.Copy(values, Values, values.Length);
OnValuesChanged();
- Surface.MarkAsEdited(graphEdited);
if (Surface != null)
+ {
+ Surface.MarkAsEdited(graphEdited);
Surface.AddBatchedUndoAction(new EditNodeValuesAction(this, before, graphEdited));
+ }
_isDuringValuesEditing = false;
}
diff --git a/Source/Editor/Surface/VisjectSurface.Serialization.cs b/Source/Editor/Surface/VisjectSurface.Serialization.cs
index cbfcf1b20..646e1add5 100644
--- a/Source/Editor/Surface/VisjectSurface.Serialization.cs
+++ b/Source/Editor/Surface/VisjectSurface.Serialization.cs
@@ -62,7 +62,8 @@ namespace FlaxEditor.Surface
///
/// The method calls the setter to assign the result bytes. Sets null value if failed.
///
- public virtual void Save()
+ /// True if failed, otherwise false.
+ public virtual bool Save()
{
var wasEdited = IsEdited;
@@ -71,19 +72,16 @@ namespace FlaxEditor.Surface
_context.CachedSurfaceMeta.Scale = ViewScale;
// Save context (and every modified child context)
- bool failed = RootContext.Save();
-
- if (failed)
- {
- // Error
- return;
- }
+ if (RootContext.Save())
+ return true;
// Clear flag
if (wasEdited)
{
Owner.OnSurfaceEditedChanged();
}
+
+ return false;
}
}
}
diff --git a/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs b/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs
index d443fc166..47d6f2840 100644
--- a/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs
+++ b/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs
@@ -430,8 +430,7 @@ namespace FlaxEditor.Windows.Assets
private bool SaveSurface()
{
- _surface.Save();
- return false;
+ return _surface.Save();
}
private void SetCanEdit(bool canEdit)
diff --git a/Source/Editor/Windows/Assets/VisualScriptWindow.cs b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
index 4a2cb74cf..a7201e81c 100644
--- a/Source/Editor/Windows/Assets/VisualScriptWindow.cs
+++ b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
@@ -1202,7 +1202,8 @@ namespace FlaxEditor.Windows.Assets
private bool SaveSurface()
{
- _surface.Save();
+ if (_surface.Save())
+ return true;
// Reselect actors to prevent issues after Visual Script properties were modified
Editor.Windows.PropertiesWin.Presenter.BuildLayoutOnUpdate();
diff --git a/Source/Engine/UI/GUI/ContainerControl.cs b/Source/Engine/UI/GUI/ContainerControl.cs
index c53307c65..530663761 100644
--- a/Source/Engine/UI/GUI/ContainerControl.cs
+++ b/Source/Engine/UI/GUI/ContainerControl.cs
@@ -750,7 +750,7 @@ namespace FlaxEngine.GUI
{
if (base.IsTouchOver)
return true;
- for (int i = 0; i < _children.Count && _children.Count > 0; i++)
+ for (int i = 0; i < _children.Count; i++)
{
if (_children[i].IsTouchOver)
return true;
@@ -960,7 +960,7 @@ namespace FlaxEngine.GUI
public override void OnMouseLeave()
{
// Check all children collisions with mouse and fire events for them
- for (int i = 0; i < _children.Count && _children.Count > 0; i++)
+ for (int i = 0; i < _children.Count; i++)
{
var child = _children[i];
if (child.Visible && child.Enabled && child.IsMouseOver)
@@ -1063,7 +1063,7 @@ namespace FlaxEngine.GUI
if (base.IsTouchPointerOver(pointerId))
return true;
- for (int i = 0; i < _children.Count && _children.Count > 0; i++)
+ for (int i = 0; i < _children.Count; i++)
{
if (_children[i].IsTouchPointerOver(pointerId))
return true;
@@ -1168,7 +1168,7 @@ namespace FlaxEngine.GUI
///
public override void OnTouchLeave(int pointerId)
{
- for (int i = 0; i < _children.Count && _children.Count > 0; i++)
+ for (int i = 0; i < _children.Count; i++)
{
var child = _children[i];
if (child.Visible && child.Enabled && child.IsTouchPointerOver(pointerId))
@@ -1183,7 +1183,7 @@ namespace FlaxEngine.GUI
///
public override bool OnCharInput(char c)
{
- for (int i = 0; i < _children.Count && _children.Count > 0; i++)
+ for (int i = 0; i < _children.Count; i++)
{
var child = _children[i];
if (child.Enabled && child.ContainsFocus)
@@ -1197,7 +1197,7 @@ namespace FlaxEngine.GUI
///
public override bool OnKeyDown(KeyboardKeys key)
{
- for (int i = 0; i < _children.Count && _children.Count > 0; i++)
+ for (int i = 0; i < _children.Count; i++)
{
var child = _children[i];
if (child.Enabled && child.ContainsFocus)
@@ -1211,7 +1211,7 @@ namespace FlaxEngine.GUI
///
public override void OnKeyUp(KeyboardKeys key)
{
- for (int i = 0; i < _children.Count && _children.Count > 0; i++)
+ for (int i = 0; i < _children.Count; i++)
{
var child = _children[i];
if (child.Enabled && child.ContainsFocus)
@@ -1294,7 +1294,7 @@ namespace FlaxEngine.GUI
base.OnDragLeave();
// Check all children collisions with mouse and fire events for them
- for (int i = 0; i < _children.Count && _children.Count > 0; i++)
+ for (int i = 0; i < _children.Count; i++)
{
var child = _children[i];
if (child.IsDragOver)
From abb684aed2365686d4e56a928a754aae78590148 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Mon, 9 Sep 2024 20:47:49 +0200
Subject: [PATCH 094/114] Fix spline length calculations bug
#2385
---
Source/Engine/Level/Actors/Spline.cpp | 35 ++++++++++++---------------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/Source/Engine/Level/Actors/Spline.cpp b/Source/Engine/Level/Actors/Spline.cpp
index 01a4cde78..01b4248ec 100644
--- a/Source/Engine/Level/Actors/Spline.cpp
+++ b/Source/Engine/Level/Actors/Spline.cpp
@@ -150,35 +150,30 @@ float Spline::GetSplineLength() const
{
float sum = 0.0f;
constexpr int32 slices = 20;
- constexpr float step = 1.0f / (float)slices;
- Vector3 prevPoint = Vector3::Zero;
- if (Curve.GetKeyframes().Count() != 0)
- {
- const auto& a = Curve[0];
- prevPoint = a.Value.Translation * _transform.Scale;
- }
+ constexpr float step = 1.0f / (float)(slices - 1);
+ const Vector3 scale = _transform.Scale;
for (int32 i = 1; i < Curve.GetKeyframes().Count(); i++)
{
const auto& a = Curve[i - 1];
const auto& b = Curve[i];
+ Vector3 prevPoint = a.Value.Translation * scale;
const float length = Math::Abs(b.Time - a.Time);
Vector3 leftTangent, rightTangent;
AnimationUtils::GetTangent(a.Value.Translation, a.TangentOut.Translation, length, leftTangent);
AnimationUtils::GetTangent(b.Value.Translation, b.TangentIn.Translation, length, rightTangent);
- // TODO: implement sth more analytical than brute-force solution
- for (int32 slice = 0; slice < slices; slice++)
+ for (int32 slice = 1; slice < slices; slice++)
{
const float t = (float)slice * step;
Vector3 pos;
AnimationUtils::Bezier(a.Value.Translation, leftTangent, rightTangent, b.Value.Translation, t, pos);
- pos *= _transform.Scale;
- sum += (float)Vector3::DistanceSquared(pos, prevPoint);
+ pos *= scale;
+ sum += (float)Vector3::Distance(pos, prevPoint);
prevPoint = pos;
}
}
- return Math::Sqrt(sum);
+ return sum;
}
float Spline::GetSplineSegmentLength(int32 index) const
@@ -188,28 +183,28 @@ float Spline::GetSplineSegmentLength(int32 index) const
CHECK_RETURN(index > 0 && index < GetSplinePointsCount(), 0.0f);
float sum = 0.0f;
constexpr int32 slices = 20;
- constexpr float step = 1.0f / (float)slices;
+ constexpr float step = 1.0f / (float)(slices - 1);
const auto& a = Curve[index - 1];
const auto& b = Curve[index];
- Vector3 startPoint = a.Value.Translation * _transform.Scale;
+ const Vector3 scale = _transform.Scale;
+ Vector3 prevPoint = a.Value.Translation * scale;
{
const float length = Math::Abs(b.Time - a.Time);
Vector3 leftTangent, rightTangent;
AnimationUtils::GetTangent(a.Value.Translation, a.TangentOut.Translation, length, leftTangent);
AnimationUtils::GetTangent(b.Value.Translation, b.TangentIn.Translation, length, rightTangent);
- // TODO: implement sth more analytical than brute-force solution
- for (int32 slice = 0; slice < slices; slice++)
+ for (int32 slice = 1; slice < slices; slice++)
{
const float t = (float)slice * step;
Vector3 pos;
AnimationUtils::Bezier(a.Value.Translation, leftTangent, rightTangent, b.Value.Translation, t, pos);
- pos *= _transform.Scale;
- sum += (float)Vector3::DistanceSquared(pos, startPoint);
- startPoint = pos;
+ pos *= scale;
+ sum += (float)Vector3::Distance(pos, prevPoint);
+ prevPoint = pos;
}
}
- return Math::Sqrt(sum);
+ return sum;
}
float Spline::GetSplineTime(int32 index) const
From 05d191f4910c891829be7c140205607f852d7e98 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Mon, 9 Sep 2024 22:25:37 +0200
Subject: [PATCH 095/114] Remove any leftover executable files deployed from
.NET SDK
---
Source/Editor/Cooker/Steps/DeployDataStep.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/Source/Editor/Cooker/Steps/DeployDataStep.cpp b/Source/Editor/Cooker/Steps/DeployDataStep.cpp
index e9e41a8ea..8c96abe9b 100644
--- a/Source/Editor/Cooker/Steps/DeployDataStep.cpp
+++ b/Source/Editor/Cooker/Steps/DeployDataStep.cpp
@@ -271,6 +271,17 @@ bool DeployDataStep::Perform(CookingData& data)
}
}
+ // Remove any leftover files copied from .NET SDK that are not needed by the engine runtime
+ {
+ Array files;
+ FileSystem::DirectoryGetFiles(files, dstDotnet, TEXT("*.exe"));
+ for (const String& file : files)
+ {
+ LOG(Info, "Removing '{}'", FileSystem::ConvertAbsolutePathToRelative(dstDotnet, file));
+ FileSystem::DeleteFile(file);
+ }
+ }
+
// Optimize deployed C# class library (remove DLLs unused by scripts)
if (aotMode == DotNetAOTModes::None && buildSettings.SkipUnusedDotnetLibsPackaging)
{
From aef06656f07ca589df07eb980d82d16035d877f1 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Mon, 9 Sep 2024 22:30:01 +0200
Subject: [PATCH 096/114] Fix using `Tag` as key of serialized dictionary in
cooked build
#2560
---
Source/Editor/Editor.Build.cs | 1 -
Source/Engine/Level/Tags.cs | 4 ----
Source/Tools/Flax.Build/Build/EngineModule.cs | 1 +
3 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/Source/Editor/Editor.Build.cs b/Source/Editor/Editor.Build.cs
index 1c065cdd8..e76cb5dfe 100644
--- a/Source/Editor/Editor.Build.cs
+++ b/Source/Editor/Editor.Build.cs
@@ -40,7 +40,6 @@ public class Editor : EditorModule
options.ScriptingAPI.SystemReferences.Add("System.Xml");
options.ScriptingAPI.SystemReferences.Add("System.Xml.ReaderWriter");
options.ScriptingAPI.SystemReferences.Add("System.Text.RegularExpressions");
- options.ScriptingAPI.SystemReferences.Add("System.ComponentModel.TypeConverter");
options.ScriptingAPI.SystemReferences.Add("System.IO.Compression.ZipFile");
// Enable optimizations for Editor, disable this for debugging the editor
diff --git a/Source/Engine/Level/Tags.cs b/Source/Engine/Level/Tags.cs
index 3a25a8efa..3c1bb2047 100644
--- a/Source/Engine/Level/Tags.cs
+++ b/Source/Engine/Level/Tags.cs
@@ -7,9 +7,7 @@ using System.Runtime.CompilerServices;
namespace FlaxEngine
{
-#if FLAX_EDITOR
[TypeConverter(typeof(TypeConverters.TagConverter))]
-#endif
partial struct Tag : IEquatable, IEquatable, IComparable, IComparable, IComparable
{
///
@@ -254,7 +252,6 @@ namespace FlaxEngine
}
}
-#if FLAX_EDITOR
namespace FlaxEngine.TypeConverters
{
internal class TagConverter : TypeConverter
@@ -291,4 +288,3 @@ namespace FlaxEngine.TypeConverters
}
}
}
-#endif
diff --git a/Source/Tools/Flax.Build/Build/EngineModule.cs b/Source/Tools/Flax.Build/Build/EngineModule.cs
index 021a31f44..7fdb9de40 100644
--- a/Source/Tools/Flax.Build/Build/EngineModule.cs
+++ b/Source/Tools/Flax.Build/Build/EngineModule.cs
@@ -43,6 +43,7 @@ namespace Flax.Build
options.ScriptingAPI.Defines.Add("FLAX");
options.ScriptingAPI.Defines.Add("FLAX_ASSERTIONS");
options.ScriptingAPI.FileReferences.Add(Utilities.RemovePathRelativeParts(Path.Combine(Globals.EngineRoot, "Source", "Platforms", "DotNet", "Newtonsoft.Json.dll")));
+ options.ScriptingAPI.SystemReferences.Add("System.ComponentModel.TypeConverter");
}
}
}
From c1a5db616e0f45beebbfb572b0c33c073075ff24 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Tue, 10 Sep 2024 11:10:15 +0200
Subject: [PATCH 097/114] Add `ProjectPoint` for Editor Viewport
#2814
---
Source/Editor/Viewport/EditorViewport.cs | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/Source/Editor/Viewport/EditorViewport.cs b/Source/Editor/Viewport/EditorViewport.cs
index 81014acf4..d6e44fcd0 100644
--- a/Source/Editor/Viewport/EditorViewport.cs
+++ b/Source/Editor/Viewport/EditorViewport.cs
@@ -1427,6 +1427,26 @@ namespace FlaxEditor.Viewport
return new Ray(nearPoint + viewOrigin, Vector3.Normalize(farPoint - nearPoint));
}
+ ///
+ /// Projects the point from 3D world-space to viewport coordinates.
+ ///
+ /// The input world-space location (XYZ in world).
+ /// The output viewport window coordinates (XY in screen pixels).
+ public void ProjectPoint(Vector3 worldSpaceLocation, out Float2 viewportSpaceLocation)
+ {
+ viewportSpaceLocation = Float2.Minimum;
+ var viewport = new FlaxEngine.Viewport(0, 0, Width, Height);
+ if (viewport.Width < Mathf.Epsilon || viewport.Height < Mathf.Epsilon)
+ return;
+ Vector3 viewOrigin = Task.View.Origin;
+ Float3 position = ViewPosition - viewOrigin;
+ CreateProjectionMatrix(out var p);
+ CreateViewMatrix(position, out var v);
+ Matrix.Multiply(ref v, ref p, out var vp);
+ viewport.Project(ref worldSpaceLocation, ref vp, out var projected);
+ viewportSpaceLocation = new Float2(projected.X, projected.Y);
+ }
+
///
/// Called when mouse control begins.
///
From 21ed4a2371f527161af58b89a57cc32b477b9a2a Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Tue, 10 Sep 2024 12:13:28 +0200
Subject: [PATCH 098/114] Fix Flipbook node bug
#2690
---
.../MaterialGenerator/MaterialGenerator.Textures.cpp | 10 +---------
Source/Shaders/MaterialCommon.hlsl | 8 ++++++++
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Textures.cpp b/Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Textures.cpp
index 1ed776646..a69172e0a 100644
--- a/Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Textures.cpp
+++ b/Source/Engine/Tools/MaterialGenerator/MaterialGenerator.Textures.cpp
@@ -644,20 +644,12 @@ void MaterialGenerator::ProcessGroupTextures(Box* box, Node* node, Value& value)
// Flipbook
case 10:
{
- // Get input values
auto uv = Value::Cast(tryGetValue(node->GetBox(0), getUVs), VariantType::Float2);
auto frame = Value::Cast(tryGetValue(node->GetBox(1), node->Values[0]), VariantType::Float);
auto framesXY = Value::Cast(tryGetValue(node->GetBox(2), node->Values[1]), VariantType::Float2);
auto invertX = Value::Cast(tryGetValue(node->GetBox(3), node->Values[2]), VariantType::Float);
auto invertY = Value::Cast(tryGetValue(node->GetBox(4), node->Values[3]), VariantType::Float);
-
- // Write operations
- auto framesCount = writeLocal(VariantType::Float, String::Format(TEXT("{0}.x * {1}.y"), framesXY.Value, framesXY.Value), node);
- frame = writeLocal(VariantType::Float, String::Format(TEXT("fmod({0}, {1})"), frame.Value, framesCount.Value), node);
- auto framesXYInv = writeOperation2(node, Value::One.AsFloat2(), framesXY, '/');
- auto frameY = writeLocal(VariantType::Float, String::Format(TEXT("abs({0} * {1}.y - (floor({2} * {3}.x) + {0} * 1))"), invertY.Value, framesXY.Value, frame.Value, framesXYInv.Value), node);
- auto frameX = writeLocal(VariantType::Float, String::Format(TEXT("abs({0} * {1}.x - (({2} - {1}.x * floor({2} * {3}.x)) + {0} * 1))"), invertX.Value, framesXY.Value, frame.Value, framesXYInv.Value), node);
- value = writeLocal(VariantType::Float2, String::Format(TEXT("({3} + float2({0}, {1})) * {2}"), frameX.Value, frameY.Value, framesXYInv.Value, uv.Value), node);
+ value = writeLocal(VariantType::Float2, String::Format(TEXT("Flipbook({0}, {1}, {2}, float2({3}, {4}))"), uv.Value, frame.Value, framesXY.Value, invertX.Value, invertY.Value), node);
break;
}
// Sample Global SDF
diff --git a/Source/Shaders/MaterialCommon.hlsl b/Source/Shaders/MaterialCommon.hlsl
index 7fcfae018..75144dfeb 100644
--- a/Source/Shaders/MaterialCommon.hlsl
+++ b/Source/Shaders/MaterialCommon.hlsl
@@ -211,4 +211,12 @@ float3 AOMultiBounce(float visibility, float3 albedo)
return max(visibility, ((visibility * a + b) * visibility + c) * visibility);
}
+float2 Flipbook(float2 uv, float frame, float2 sizeXY, float2 flipXY = 0.0f)
+{
+ float2 frameXY = float2((uint)frame % (uint)sizeXY.y, (uint)frame / (uint)sizeXY.x);
+ float2 flipFrameXY = sizeXY - frameXY - float2(1, 1);
+ frameXY = lerp(frameXY, flipFrameXY, flipXY);
+ return (uv + frameXY) / sizeXY;
+}
+
#endif
From 09b36401168f97c8d05bd3a7c2cf508f720159b0 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 10 Sep 2024 13:04:33 -0500
Subject: [PATCH 099/114] Add code gen for FixedAllocation arrays to generate
Collection attribute with accolation count.
---
.../Bindings/BindingsGenerator.CSharp.cs | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
index 5d0297991..604e36cfd 100644
--- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
+++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
@@ -898,6 +898,29 @@ namespace Flax.Build.Bindings
if (defaultValue != null)
contents.Append(indent).Append("[DefaultValue(").Append(defaultValue).Append(")]").AppendLine();
}
+
+ // Check if array has fixed allocation and add in MaxCount Collection attribute if a Collection attribute does not already exist.
+ if (defaultValueType != null && (string.IsNullOrEmpty(attributes) || !attributes.Contains("Collection", StringComparison.Ordinal)))
+ {
+ // Array or Span or DataContainer
+#if USE_NETCORE
+ if ((defaultValueType.Type == "Array" || defaultValueType.Type == "Span" || defaultValueType.Type == "DataContainer" || defaultValueType.Type == "MonoArray" || defaultValueType.Type == "MArray") && defaultValueType.GenericArgs != null)
+#else
+ if ((defaultValueType.Type == "Array" || defaultValueType.Type == "Span" || defaultValueType.Type == "DataContainer") && defaultValueType.GenericArgs != null)
+#endif
+ {
+ if (defaultValueType.GenericArgs.Count > 1)
+ {
+ if (defaultValueType.GenericArgs[1].Type.Contains("FixedAllocation", StringComparison.Ordinal))
+ {
+ if (int.TryParse(defaultValueType.GenericArgs[1].GenericArgs[0].ToString(), out int allocation))
+ {
+ contents.Append(indent).Append($"[Collection(MaxCount={allocation.ToString()})]").AppendLine();
+ }
+ }
+ }
+ }
+ }
}
private static void GenerateCSharpAttributes(BuildData buildData, StringBuilder contents, string indent, ApiTypeInfo apiTypeInfo, bool useUnmanaged, string defaultValue = null, TypeInfo defaultValueType = null)
From c452ffec8bb76dc8135cb0ac6a10b628ca1f2984 Mon Sep 17 00:00:00 2001
From: Chandler Cox
Date: Tue, 10 Sep 2024 13:08:44 -0500
Subject: [PATCH 100/114] Add aadditional check for allocation args generic arg
count.
---
Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
index 604e36cfd..bd7a58659 100644
--- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
+++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
@@ -911,9 +911,10 @@ namespace Flax.Build.Bindings
{
if (defaultValueType.GenericArgs.Count > 1)
{
- if (defaultValueType.GenericArgs[1].Type.Contains("FixedAllocation", StringComparison.Ordinal))
+ var allocationArg = defaultValueType.GenericArgs[1];
+ if (allocationArg.Type.Contains("FixedAllocation", StringComparison.Ordinal) && allocationArg.GenericArgs.Count > 0)
{
- if (int.TryParse(defaultValueType.GenericArgs[1].GenericArgs[0].ToString(), out int allocation))
+ if (int.TryParse(allocationArg.GenericArgs[0].ToString(), out int allocation))
{
contents.Append(indent).Append($"[Collection(MaxCount={allocation.ToString()})]").AppendLine();
}
From 4683262cf307f7f3459efa5324805eba8104d11f Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 11 Sep 2024 13:38:31 +0200
Subject: [PATCH 101/114] Small codestyle tweaks
#2415
---
.../Content/Create/PrefabCreateEntry.cs | 30 +++++++------------
Source/Editor/Content/Items/PrefabItem.cs | 24 +++++++--------
Source/Editor/Content/Proxy/PrefabProxy.cs | 7 +++--
.../Editor/Content/Proxy/SkinnedModelProxy.cs | 6 ++--
4 files changed, 29 insertions(+), 38 deletions(-)
diff --git a/Source/Editor/Content/Create/PrefabCreateEntry.cs b/Source/Editor/Content/Create/PrefabCreateEntry.cs
index e207343a5..06d0c94d4 100644
--- a/Source/Editor/Content/Create/PrefabCreateEntry.cs
+++ b/Source/Editor/Content/Create/PrefabCreateEntry.cs
@@ -49,12 +49,8 @@ namespace FlaxEditor.Content.Create
///
public override bool Create()
{
- if (_options.RootActorType == null)
- _options.RootActorType = typeof(EmptyActor);
-
- ScriptType actorType = new ScriptType(_options.RootActorType);
-
- Actor actor = null;
+ var actorType = new ScriptType(_options.RootActorType ?? typeof(EmptyActor));
+ Actor actor;
try
{
actor = actorType.CreateInstance() as Actor;
@@ -102,7 +98,7 @@ namespace FlaxEditor.Content.Create
/// The mode used to initialize the widget.
///
[Tooltip("Whether to initialize the widget with a canvas or a control.")]
- public WidgetMode WidgetInitializationMode = WidgetMode.Canvas;
+ public WidgetMode WidgetInitializationMode = WidgetMode.Control;
bool ShowRoot => WidgetInitializationMode == WidgetMode.Control;
@@ -111,7 +107,7 @@ namespace FlaxEditor.Content.Create
///
[TypeReference(typeof(Control), nameof(IsValid))]
[Tooltip("The control type of the root of the new Widget's root control."), VisibleIf(nameof(ShowRoot))]
- public Type RootControlType = typeof(Panel);
+ public Type RootControlType = typeof(Button);
private static bool IsValid(Type type)
{
@@ -140,12 +136,8 @@ namespace FlaxEditor.Content.Create
if (_options.WidgetInitializationMode == Options.WidgetMode.Control)
{
- if (_options.RootControlType == null)
- _options.RootControlType = typeof(Control);
-
- ScriptType controlType = new ScriptType(_options.RootControlType);
-
- Control control = null;
+ var controlType = new ScriptType(_options.RootControlType ?? typeof(Control));
+ Control control;
try
{
control = controlType.CreateInstance() as Control;
@@ -157,10 +149,11 @@ namespace FlaxEditor.Content.Create
return true;
}
- UIControl newControl = new UIControl();
- newControl.Control = control;
-
- actor = newControl;
+ actor = new UIControl
+ {
+ Control = control,
+ Name = controlType.Name
+ };
}
else if (_options.WidgetInitializationMode == Options.WidgetMode.Canvas)
{
@@ -172,7 +165,6 @@ namespace FlaxEditor.Content.Create
Editor.LogError("Failed to create widget. Final actor was null.");
return true;
}
-
Object.Destroy(actor, 20.0f);
return PrefabManager.CreatePrefab(actor, ResultUrl, true);
diff --git a/Source/Editor/Content/Items/PrefabItem.cs b/Source/Editor/Content/Items/PrefabItem.cs
index 6394ed52c..3638f274f 100644
--- a/Source/Editor/Content/Items/PrefabItem.cs
+++ b/Source/Editor/Content/Items/PrefabItem.cs
@@ -11,6 +11,8 @@ namespace FlaxEditor.Content
///
public sealed class PrefabItem : JsonAssetItem
{
+ private string _cachedTypeDescription = null;
+
///
/// Initializes a new instance of the class.
///
@@ -42,28 +44,22 @@ namespace FlaxEditor.Content
///
public override SpriteHandle DefaultThumbnail => SpriteHandle.Invalid;
- private string _cachedTypeDescription = null;
-
///
public override string TypeDescription
{
get
{
- if (_cachedTypeDescription != null)
- return _cachedTypeDescription;
-
- Prefab prefab = FlaxEngine.Content.LoadAsync(ID);
- if (prefab.WaitForLoaded(5000))
+ if (_cachedTypeDescription == null)
{
_cachedTypeDescription = "Prefab";
+ var prefab = FlaxEngine.Content.Load(ID);
+ if (prefab)
+ {
+ Actor root = prefab.GetDefaultInstance();
+ if (root is UIControl or UICanvas)
+ _cachedTypeDescription = "Widget";
+ }
}
-
- Actor root = prefab.GetDefaultInstance();
- if (root is UIControl or UICanvas)
- _cachedTypeDescription = "Widget";
- else
- _cachedTypeDescription = "Prefab";
-
return _cachedTypeDescription;
}
}
diff --git a/Source/Editor/Content/Proxy/PrefabProxy.cs b/Source/Editor/Content/Proxy/PrefabProxy.cs
index 5f5a782b8..27bece29c 100644
--- a/Source/Editor/Content/Proxy/PrefabProxy.cs
+++ b/Source/Editor/Content/Proxy/PrefabProxy.cs
@@ -1,7 +1,6 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
-using System.IO;
using FlaxEditor.Content.Create;
using FlaxEditor.Content.Thumbnails;
using FlaxEditor.Viewport.Previews;
@@ -9,7 +8,6 @@ using FlaxEditor.Windows;
using FlaxEditor.Windows.Assets;
using FlaxEngine;
using FlaxEngine.GUI;
-using Object = FlaxEngine.Object;
namespace FlaxEditor.Content
{
@@ -87,6 +85,7 @@ namespace FlaxEditor.Content
///
public override void Create(string outputPath, object arg)
{
+ bool resetTransform = false;
var transform = Transform.Identity;
if (!(arg is Actor actor))
{
@@ -96,12 +95,14 @@ namespace FlaxEditor.Content
else if (actor.HasScene)
{
// Create prefab with identity transform so the actor instance on a level will have it customized
+ resetTransform = true;
transform = actor.LocalTransform;
actor.LocalTransform = Transform.Identity;
}
PrefabManager.CreatePrefab(actor, outputPath, true);
- actor.LocalTransform = transform;
+ if (resetTransform)
+ actor.LocalTransform = transform;
}
///
diff --git a/Source/Editor/Content/Proxy/SkinnedModelProxy.cs b/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
index 163df87da..551dd1beb 100644
--- a/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
+++ b/Source/Editor/Content/Proxy/SkinnedModelProxy.cs
@@ -71,13 +71,15 @@ namespace FlaxEditor.Content
private static void OnAnimationGraphCreated(ContentItem item, BinaryAssetItem skinnedModelItem)
{
- var skinnedModel = FlaxEngine.Content.LoadAsync(skinnedModelItem.ID);
- if (skinnedModel == null || skinnedModel.WaitForLoaded())
+ var skinnedModel = FlaxEngine.Content.Load(skinnedModelItem.ID);
+ if (skinnedModel == null)
{
Editor.LogError("Failed to load base skinned model.");
+ return;
}
// Hack the animation graph window to modify the base model of the animation graph.
+ // TODO: implement it without window logic (load AnimGraphSurface and set AnimationGraphWindow.BaseModelId to model)
AnimationGraphWindow win = new AnimationGraphWindow(Editor.Instance, item as AssetItem);
win.Show();
From 7311522328d078c6faf983d55de883972e7a2922 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 11 Sep 2024 13:39:15 +0200
Subject: [PATCH 102/114] Fix compile regression with large worlds
---
Source/Editor/Viewport/EditorViewport.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Editor/Viewport/EditorViewport.cs b/Source/Editor/Viewport/EditorViewport.cs
index d6e44fcd0..edb3e0e39 100644
--- a/Source/Editor/Viewport/EditorViewport.cs
+++ b/Source/Editor/Viewport/EditorViewport.cs
@@ -1444,7 +1444,7 @@ namespace FlaxEditor.Viewport
CreateViewMatrix(position, out var v);
Matrix.Multiply(ref v, ref p, out var vp);
viewport.Project(ref worldSpaceLocation, ref vp, out var projected);
- viewportSpaceLocation = new Float2(projected.X, projected.Y);
+ viewportSpaceLocation = new Float2((float)projected.X, (float)projected.Y);
}
///
From c26a806a351324623e5b8d3311b1115f421b6767 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 11 Sep 2024 19:57:57 +0200
Subject: [PATCH 103/114] Code cleanup
#1456
---
Source/Editor/Options/InterfaceOptions.cs | 14 ++++++
Source/Editor/Surface/NodeArchetype.cs | 13 +-----
Source/Editor/Surface/SurfaceUtils.cs | 43 +++++++------------
Source/Editor/Surface/VisjectSurface.Input.cs | 40 +++++++----------
Source/Editor/Surface/VisjectSurface.cs | 19 ++++++--
Source/Editor/Surface/VisjectSurfaceWindow.cs | 30 ++++++-------
.../Windows/Assets/AnimationGraphWindow.cs | 1 +
.../Windows/Assets/BehaviorTreeWindow.cs | 12 +-----
.../Editor/Windows/Assets/MaterialWindow.cs | 3 +-
.../Windows/Assets/ParticleEmitterWindow.cs | 3 +-
.../Assets/VisjectFunctionSurfaceWindow.cs | 10 +----
.../Windows/Assets/VisualScriptWindow.cs | 12 +-----
Source/Engine/Core/Math/Float2.cs | 10 +++++
13 files changed, 95 insertions(+), 115 deletions(-)
diff --git a/Source/Editor/Options/InterfaceOptions.cs b/Source/Editor/Options/InterfaceOptions.cs
index 8f786362d..f7cc7107a 100644
--- a/Source/Editor/Options/InterfaceOptions.cs
+++ b/Source/Editor/Options/InterfaceOptions.cs
@@ -382,6 +382,20 @@ namespace FlaxEditor.Options
[EditorDisplay("Visject"), EditorOrder(550), Tooltip("Shows/hides the description panel in the visual scripting context menu.")]
public bool VisualScriptingDescriptionPanel { get; set; } = true;
+ ///
+ /// Gets or sets the surface grid snapping option.
+ ///
+ [DefaultValue(false)]
+ [EditorDisplay("Visject", "Grid Snapping"), EditorOrder(551), Tooltip("Toggles grid snapping when moving nodes.")]
+ public bool SurfaceGridSnapping { get; set; } = false;
+
+ ///
+ /// Gets or sets the surface grid snapping option.
+ ///
+ [DefaultValue(20.0f)]
+ [EditorDisplay("Visject", "Grid Snapping Size"), EditorOrder(551), Tooltip("Defines the size of the grid for nodes snapping."), VisibleIf(nameof(SurfaceGridSnapping))]
+ public float SurfaceGridSnappingSize { get; set; } = 20.0f;
+
private static FontAsset DefaultFont => FlaxEngine.Content.LoadAsyncInternal(EditorAssets.PrimaryFont);
private static FontAsset ConsoleFont => FlaxEngine.Content.LoadAsyncInternal(EditorAssets.InconsolataRegularFont);
diff --git a/Source/Editor/Surface/NodeArchetype.cs b/Source/Editor/Surface/NodeArchetype.cs
index 32d75c71c..609b7b5f7 100644
--- a/Source/Editor/Surface/NodeArchetype.cs
+++ b/Source/Editor/Surface/NodeArchetype.cs
@@ -109,7 +109,6 @@ namespace FlaxEditor.Surface
///
public CreateCustomNodeFunc Create;
- private Float2 _size;
///
/// Function for asynchronously loaded nodes to check if input ports are compatible, for filtering.
///
@@ -123,17 +122,7 @@ namespace FlaxEditor.Surface
///
/// Default initial size of the node.
///
- public Float2 Size
- {
- get
- {
- return _size;
- }
- set
- {
- _size = VisjectSurface.RoundToGrid(value, true);
- }
- }
+ public Float2 Size;
///
/// Custom set of flags.
diff --git a/Source/Editor/Surface/SurfaceUtils.cs b/Source/Editor/Surface/SurfaceUtils.cs
index a6fc82d55..c1f966812 100644
--- a/Source/Editor/Surface/SurfaceUtils.cs
+++ b/Source/Editor/Surface/SurfaceUtils.cs
@@ -2,7 +2,6 @@
using System;
using System.Collections.Generic;
-using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
@@ -10,12 +9,9 @@ using FlaxEditor.CustomEditors;
using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.Options;
using FlaxEditor.Scripting;
-using FlaxEditor.Utilities;
using FlaxEngine.Utilities;
using FlaxEngine;
using FlaxEditor.GUI;
-using FlaxEngine.GUI;
-using FlaxEditor.Options;
namespace FlaxEditor.Surface
{
@@ -560,41 +556,32 @@ namespace FlaxEditor.Surface
return AreScriptTypesEqualInner(left, right) || AreScriptTypesEqualInner(right, left);
}
- // This might not be the greatest place to put this but I couldn't find anything better yet.
- public static void VisjectCommonToolstripSetup(Editor editor, ToolStrip toolStrip, FlaxEditor.Undo undo,
- Action save, Action showWholeGraph, Action toggleGridSnap, InputActionsContainer actionsContainer,
- out ToolStripButton saveButton, out ToolStripButton undoButton, out ToolStripButton redoButton, out ToolStripButton gridSnapButton)
+ internal static void PerformCommonSetup(Windows.Assets.AssetEditorWindow window, ToolStrip toolStrip, VisjectSurface surface,
+ out ToolStripButton saveButton, out ToolStripButton undoButton, out ToolStripButton redoButton)
{
+ var editor = window.Editor;
+ var interfaceOptions = editor.Options.Options.Interface;
var inputOptions = editor.Options.Options.Input;
+ var undo = surface.Undo;
// Toolstrip
- saveButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Save64, save).LinkTooltip("Save");
+ saveButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Save64, window.Save).LinkTooltip("Save");
toolStrip.AddSeparator();
undoButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Undo64, undo.PerformUndo).LinkTooltip($"Undo ({inputOptions.Undo})");
redoButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Redo64, undo.PerformRedo).LinkTooltip($"Redo ({inputOptions.Redo})");
toolStrip.AddSeparator();
toolStrip.AddButton(editor.Icons.Search64, editor.ContentFinding.ShowSearch).LinkTooltip($"Open content search tool ({inputOptions.Search})");
- toolStrip.AddButton(editor.Icons.CenterView64, showWholeGraph).LinkTooltip("Show whole graph");
- gridSnapButton = (ToolStripButton)toolStrip.AddButton(editor.Icons.Stop64, toggleGridSnap).LinkTooltip("Toggle grid snapping for nodes.");
- gridSnapButton.BackgroundColor = Style.Current.Background; // Default color for grid snap button.
+ toolStrip.AddButton(editor.Icons.CenterView64, surface.ShowWholeGraph).LinkTooltip("Show whole graph");
+ var gridSnapButton = toolStrip.AddButton(editor.Icons.Grid32, surface.ToggleGridSnapping);
+ gridSnapButton.LinkTooltip("Toggle grid snapping for nodes.");
+ gridSnapButton.AutoCheck = true;
+ gridSnapButton.Checked = surface.GridSnappingEnabled = interfaceOptions.SurfaceGridSnapping;
+ surface.GridSnappingSize = interfaceOptions.SurfaceGridSnappingSize;
// Setup input actions
- actionsContainer.Add(options => options.Undo, undo.PerformUndo);
- actionsContainer.Add(options => options.Redo, undo.PerformRedo);
- actionsContainer.Add(options => options.Search, editor.ContentFinding.ShowSearch);
- }
-
- public static void ToggleSurfaceGridSnap(VisjectSurface surface, ToolStripButton gridSnapButton)
- {
- surface.GridSnappingEnabled = !surface.GridSnappingEnabled;
- if (surface.GridSnappingEnabled)
- {
- gridSnapButton.BackgroundColor = Style.Current.BackgroundSelected;
- }
- else
- {
- gridSnapButton.BackgroundColor = Style.Current.Background;
- }
+ window.InputActions.Add(options => options.Undo, undo.PerformUndo);
+ window.InputActions.Add(options => options.Redo, undo.PerformRedo);
+ window.InputActions.Add(options => options.Search, editor.ContentFinding.ShowSearch);
}
}
}
diff --git a/Source/Editor/Surface/VisjectSurface.Input.cs b/Source/Editor/Surface/VisjectSurface.Input.cs
index c540a2bd1..416f0152e 100644
--- a/Source/Editor/Surface/VisjectSurface.Input.cs
+++ b/Source/Editor/Surface/VisjectSurface.Input.cs
@@ -192,26 +192,19 @@ namespace FlaxEditor.Surface
}
///
- /// Round a visject coordinate point to the grid.
+ /// Snaps a coordinate point to the grid.
///
/// The point to be rounded.
/// Round to ceiling instead?
- ///
- public static Float2 RoundToGrid(Float2 point, bool ceil = false)
+ /// Rounded coordinate.
+ public Float2 SnapToGrid(Float2 point, bool ceil = false)
{
- Func round = x =>
- {
- double pointGridUnits = Math.Abs((double)x) / GridSize;
- pointGridUnits = ceil ? Math.Ceiling(pointGridUnits) : Math.Floor(pointGridUnits);
-
- return (float)Math.CopySign(pointGridUnits * GridSize, x);
- };
-
- Float2 pointToRound = point;
- pointToRound.X = round(pointToRound.X);
- pointToRound.Y = round(pointToRound.Y);
-
- return pointToRound;
+ float gridSize = GridSnappingSize;
+ Float2 snapped = point.Absolute / gridSize;
+ snapped = ceil ? Float2.Ceil(snapped) : Float2.Floor(snapped);
+ snapped.X = (float)Math.CopySign(snapped.X * gridSize, point.X);
+ snapped.Y = (float)Math.CopySign(snapped.Y * gridSize, point.Y);
+ return snapped;
}
///
@@ -281,7 +274,8 @@ namespace FlaxEditor.Surface
// Moving
else if (_isMovingSelection)
{
- if (!GridSnappingEnabled)
+ var gridSnap = GridSnappingEnabled;
+ if (!gridSnap)
_gridRoundingDelta = Float2.Zero; // Reset in case user toggled option between frames.
// Calculate delta (apply view offset)
@@ -291,25 +285,23 @@ namespace FlaxEditor.Surface
var deltaLengthSquared = delta.LengthSquared;
delta /= _targetScale;
- if ((!GridSnappingEnabled || Math.Abs(delta.X) >= GridSize || (Math.Abs(delta.Y) >= GridSize))
+ if ((!gridSnap || Mathf.Abs(delta.X) >= GridSnappingSize || (Mathf.Abs(delta.Y) >= GridSnappingSize))
&& deltaLengthSquared > 0.01f)
{
- if (GridSnappingEnabled)
+ if (gridSnap)
{
Float2 unroundedDelta = delta;
-
- delta = RoundToGrid(unroundedDelta);
+ delta = SnapToGrid(unroundedDelta);
_gridRoundingDelta = (unroundedDelta - delta) * _targetScale; // Standardize unit of the rounding delta, in case user zooms between node movements.
}
foreach (var node in _movingNodes)
{
- if (GridSnappingEnabled)
+ if (gridSnap)
{
Float2 unroundedLocation = node.Location;
- node.Location = RoundToGrid(unroundedLocation);
+ node.Location = SnapToGrid(unroundedLocation);
}
-
node.Location += delta;
}
diff --git a/Source/Editor/Surface/VisjectSurface.cs b/Source/Editor/Surface/VisjectSurface.cs
index e4eb3269b..28ec17d53 100644
--- a/Source/Editor/Surface/VisjectSurface.cs
+++ b/Source/Editor/Surface/VisjectSurface.cs
@@ -34,18 +34,26 @@ namespace FlaxEditor.Surface
///
/// Is grid snapping enabled for this surface?
///
- public bool GridSnappingEnabled = false;
+ public bool GridSnappingEnabled
+ {
+ get => _gridSnappingEnabled;
+ set
+ {
+ _gridSnappingEnabled = value;
+ _gridRoundingDelta = Float2.Zero;
+ }
+ }
///
/// The size of the snapping grid.
///
- public static readonly float GridSize = 20f;
+ public float GridSnappingSize = 20f;
private float _targetScale = 1.0f;
private float _moveViewWithMouseDragSpeed = 1.0f;
private bool _canEdit = true;
private readonly bool _supportsDebugging;
- private bool _isReleasing;
+ private bool _isReleasing, _gridSnappingEnabled;
private VisjectCM _activeVisjectCM;
private GroupArchetype _customNodesGroup;
private List _customNodes;
@@ -642,6 +650,11 @@ namespace FlaxEditor.Surface
SelectionChanged?.Invoke();
}
+ internal void ToggleGridSnapping()
+ {
+ GridSnappingEnabled = !GridSnappingEnabled;
+ }
+
///
/// Selects all the nodes.
///
diff --git a/Source/Editor/Surface/VisjectSurfaceWindow.cs b/Source/Editor/Surface/VisjectSurfaceWindow.cs
index ec3db7a9d..16e4f303b 100644
--- a/Source/Editor/Surface/VisjectSurfaceWindow.cs
+++ b/Source/Editor/Surface/VisjectSurfaceWindow.cs
@@ -891,10 +891,21 @@ namespace FlaxEditor.Surface
///
protected Tabs _tabs;
- private readonly ToolStripButton _saveButton;
- private readonly ToolStripButton _undoButton;
- private readonly ToolStripButton _redoButton;
- private readonly ToolStripButton _gridSnapButton;
+ ///
+ /// Save button on a toolstrip.
+ ///
+ protected ToolStripButton _saveButton;
+
+ ///
+ /// Undo button on a toolstrip.
+ ///
+ protected ToolStripButton _undoButton;
+
+ ///
+ /// Redo button on a toolstrip.
+ ///
+ protected ToolStripButton _redoButton;
+
private bool _showWholeGraphOnLoad = true;
///
@@ -951,8 +962,6 @@ namespace FlaxEditor.Surface
protected VisjectSurfaceWindow(Editor editor, AssetItem item, bool useTabs = false)
: base(editor, item)
{
- var inputOptions = Editor.Options.Options.Input;
-
// Undo
_undo = new FlaxEditor.Undo();
_undo.UndoDone += OnUndoRedo;
@@ -999,10 +1008,6 @@ namespace FlaxEditor.Surface
_propertiesEditor.Panel.Parent = _split2.Panel2;
}
_propertiesEditor.Modified += OnPropertyEdited;
-
- SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo,
- Save, ShowWholeGraph, ToggleGridSnap, InputActions,
- out _saveButton, out _undoButton, out _redoButton, out _gridSnapButton);
}
private void OnUndoRedo(IUndoAction action)
@@ -1041,11 +1046,6 @@ namespace FlaxEditor.Surface
_surface.ShowWholeGraph();
}
- private void ToggleGridSnap()
- {
- SurfaceUtils.ToggleSurfaceGridSnap(_surface, _gridSnapButton);
- }
-
///
/// Refreshes temporary asset to see changes live when editing the surface.
///
diff --git a/Source/Editor/Windows/Assets/AnimationGraphWindow.cs b/Source/Editor/Windows/Assets/AnimationGraphWindow.cs
index e75becf72..1cf03f062 100644
--- a/Source/Editor/Windows/Assets/AnimationGraphWindow.cs
+++ b/Source/Editor/Windows/Assets/AnimationGraphWindow.cs
@@ -206,6 +206,7 @@ namespace FlaxEditor.Windows.Assets
_surface.ContextChanged += OnSurfaceContextChanged;
// Toolstrip
+ SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
_showNodesButton = (ToolStripButton)_toolstrip.AddButton(editor.Icons.Bone64, () => _preview.ShowNodes = !_preview.ShowNodes).LinkTooltip("Show animated model nodes debug view");
_toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/animation/anim-graph/index.html")).LinkTooltip("See documentation to learn more");
diff --git a/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs b/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs
index 47d6f2840..f4e7a4f6a 100644
--- a/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs
+++ b/Source/Editor/Windows/Assets/BehaviorTreeWindow.cs
@@ -172,13 +172,8 @@ namespace FlaxEditor.Windows.Assets
_knowledgePropertiesEditor.Panel.Parent = _split2.Panel2;
// Toolstrip
- _saveButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Save64, Save).LinkTooltip("Save");
+ SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
_toolstrip.AddSeparator();
- _undoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Undo64, _undo.PerformUndo).LinkTooltip($"Undo ({inputOptions.Undo})");
- _redoButton = (ToolStripButton)_toolstrip.AddButton(Editor.Icons.Redo64, _undo.PerformRedo).LinkTooltip($"Redo ({inputOptions.Redo})");
- _toolstrip.AddSeparator();
- _toolstrip.AddButton(Editor.Icons.Search64, Editor.ContentFinding.ShowSearch).LinkTooltip($"Open content search tool ({inputOptions.Search})");
- _toolstrip.AddButton(editor.Icons.CenterView64, _surface.ShowWholeGraph).LinkTooltip("Show whole graph");
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/scripting/ai/behavior-trees/index.html")).LinkTooltip("See documentation to learn more");
// Debug behavior picker
@@ -206,11 +201,6 @@ namespace FlaxEditor.Windows.Assets
_behaviorPicker.CheckValid = OnBehaviorPickerCheckValid;
_behaviorPicker.ValueChanged += OnBehaviorPickerValueChanged;
- // Setup input actions
- InputActions.Add(options => options.Undo, _undo.PerformUndo);
- InputActions.Add(options => options.Redo, _undo.PerformRedo);
- InputActions.Add(options => options.Search, Editor.ContentFinding.ShowSearch);
-
SetCanEdit(!Editor.IsPlayMode);
ScriptsBuilder.ScriptsReloadBegin += OnScriptsReloadBegin;
}
diff --git a/Source/Editor/Windows/Assets/MaterialWindow.cs b/Source/Editor/Windows/Assets/MaterialWindow.cs
index ef37fbe67..ad72c92d9 100644
--- a/Source/Editor/Windows/Assets/MaterialWindow.cs
+++ b/Source/Editor/Windows/Assets/MaterialWindow.cs
@@ -257,8 +257,9 @@ namespace FlaxEditor.Windows.Assets
};
// Toolstrip
- _toolstrip.AddSeparator();
+ SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
_toolstrip.AddButton(editor.Icons.Code64, ShowSourceCode).LinkTooltip("Show generated shader source code");
+ _toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/graphics/materials/index.html")).LinkTooltip("See documentation to learn more");
}
diff --git a/Source/Editor/Windows/Assets/ParticleEmitterWindow.cs b/Source/Editor/Windows/Assets/ParticleEmitterWindow.cs
index 93dce7034..c373b4cdc 100644
--- a/Source/Editor/Windows/Assets/ParticleEmitterWindow.cs
+++ b/Source/Editor/Windows/Assets/ParticleEmitterWindow.cs
@@ -141,8 +141,9 @@ namespace FlaxEditor.Windows.Assets
};
// Toolstrip
- _toolstrip.AddSeparator();
+ SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
_toolstrip.AddButton(editor.Icons.Code64, ShowSourceCode).LinkTooltip("Show generated shader source code");
+ _toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/particles/index.html")).LinkTooltip("See documentation to learn more");
}
diff --git a/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs b/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
index 1cdd07611..24b3e3f9b 100644
--- a/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
+++ b/Source/Editor/Windows/Assets/VisjectFunctionSurfaceWindow.cs
@@ -30,7 +30,6 @@ namespace FlaxEditor.Windows.Assets
private readonly ToolStripButton _saveButton;
private readonly ToolStripButton _undoButton;
private readonly ToolStripButton _redoButton;
- private readonly ToolStripButton _gridSnapButton;
private bool _showWholeGraphOnLoad = true;
///
@@ -71,9 +70,7 @@ namespace FlaxEditor.Windows.Assets
_undo.ActionDone += OnUndoRedo;
// Toolstrip
- SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo,
- Save, ShowWholeGraph, ToggleGridSnap, InputActions,
- out _saveButton, out _undoButton, out _redoButton, out _gridSnapButton);
+ SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
// Panel
_panel = new Panel(ScrollBars.None)
@@ -98,11 +95,6 @@ namespace FlaxEditor.Windows.Assets
_surface.ShowWholeGraph();
}
- private void ToggleGridSnap()
- {
- SurfaceUtils.ToggleSurfaceGridSnap(_surface, _gridSnapButton);
- }
-
///
/// Refreshes temporary asset to see changes live when editing the surface.
///
diff --git a/Source/Editor/Windows/Assets/VisualScriptWindow.cs b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
index 3f742e09d..b424ecffc 100644
--- a/Source/Editor/Windows/Assets/VisualScriptWindow.cs
+++ b/Source/Editor/Windows/Assets/VisualScriptWindow.cs
@@ -533,7 +533,6 @@ namespace FlaxEditor.Windows.Assets
private readonly ToolStripButton _saveButton;
private readonly ToolStripButton _undoButton;
private readonly ToolStripButton _redoButton;
- private readonly ToolStripButton _gridSnapButton;
private Control[] _debugToolstripControls;
private bool _showWholeGraphOnLoad = true;
private bool _tmpAssetIsDirty;
@@ -598,11 +597,7 @@ namespace FlaxEditor.Windows.Assets
_propertiesEditor.Select(_properties);
// Toolstrip
- SurfaceUtils.VisjectCommonToolstripSetup(editor, _toolstrip, _undo,
- Save, ShowWholeGraph, ToggleGridSnap, InputActions,
- out _saveButton, out _undoButton, out _redoButton, out _gridSnapButton);
-
- // The rest of the toolstrip
+ SurfaceUtils.PerformCommonSetup(this, _toolstrip, _surface, out _saveButton, out _undoButton, out _redoButton);
_toolstrip.AddSeparator();
_toolstrip.AddButton(editor.Icons.Docs64, () => Platform.OpenUrl(Utilities.Constants.DocsUrl + "manual/scripting/visual/index.html")).LinkTooltip("See documentation to learn more");
_debugToolstripControls = new[]
@@ -683,11 +678,6 @@ namespace FlaxEditor.Windows.Assets
_surface.ShowWholeGraph();
}
- private void ToggleGridSnap()
- {
- SurfaceUtils.ToggleSurfaceGridSnap(_surface, _gridSnapButton);
- }
-
///
/// Refreshes temporary asset to see changes live when editing the surface.
///
diff --git a/Source/Engine/Core/Math/Float2.cs b/Source/Engine/Core/Math/Float2.cs
index adbe61508..92247d865 100644
--- a/Source/Engine/Core/Math/Float2.cs
+++ b/Source/Engine/Core/Math/Float2.cs
@@ -865,6 +865,16 @@ namespace FlaxEngine
return new Float2(Mathf.Ceil(v.X), Mathf.Ceil(v.Y));
}
+ ///
+ /// Returns the vector with components containing the smallest integer smaller to or equal to the original value.
+ ///
+ /// The value.
+ /// The result.
+ public static Float2 Floor(Float2 v)
+ {
+ return new Float2(Mathf.Floor(v.X), Mathf.Floor(v.Y));
+ }
+
///
/// Breaks the components of the vector into an integral and a fractional part. Returns vector made of fractional parts.
///
From 12c9ae1490079b8ea2844019a53c181415ac8d61 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 11 Sep 2024 20:24:19 +0200
Subject: [PATCH 104/114] Add surface nodes size snapping when using grid
#1456
---
Source/Editor/Surface/SurfaceComment.cs | 11 ++++++++---
Source/Editor/Surface/SurfaceControl.cs | 9 +++++++++
Source/Editor/Surface/SurfaceNode.cs | 10 ++++++++++
3 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/Source/Editor/Surface/SurfaceComment.cs b/Source/Editor/Surface/SurfaceComment.cs
index 86b68da4e..54c438fe3 100644
--- a/Source/Editor/Surface/SurfaceComment.cs
+++ b/Source/Editor/Surface/SurfaceComment.cs
@@ -1,7 +1,6 @@
// Copyright (c) 2012-2024 Wojciech Figat. All rights reserved.
using System;
-using FlaxEditor.GUI;
using FlaxEditor.GUI.ContextMenu;
using FlaxEditor.GUI.Input;
using FlaxEngine;
@@ -86,7 +85,10 @@ namespace FlaxEditor.Surface
// Read node data
Title = TitleValue;
Color = ColorValue;
- Size = SizeValue;
+ var size = SizeValue;
+ if (Surface.GridSnappingEnabled)
+ size = Surface.SnapToGrid(size, true);
+ Size = size;
// Order
// Backwards compatibility - When opening with an older version send the old comments to the back
@@ -299,7 +301,10 @@ namespace FlaxEditor.Surface
if (_isResizing)
{
// Update size
- Size = Float2.Max(location, new Float2(140.0f, _headerRect.Bottom));
+ var size = Float2.Max(location, new Float2(140.0f, _headerRect.Bottom));
+ if (Surface.GridSnappingEnabled)
+ size = Surface.SnapToGrid(size, true);
+ Size = size;
}
else
{
diff --git a/Source/Editor/Surface/SurfaceControl.cs b/Source/Editor/Surface/SurfaceControl.cs
index 9774d76ba..29d7c1768 100644
--- a/Source/Editor/Surface/SurfaceControl.cs
+++ b/Source/Editor/Surface/SurfaceControl.cs
@@ -131,6 +131,15 @@ namespace FlaxEditor.Surface
///
public virtual void OnSurfaceLoaded(SurfaceNodeActions action)
{
+ // Snap bounds (with ceil) when using grid snapping
+ if (Surface.GridSnappingEnabled)
+ {
+ var bounds = Bounds;
+ bounds.Location = Surface.SnapToGrid(bounds.Location, false);
+ bounds.Size = Surface.SnapToGrid(bounds.Size, true);
+ Bounds = bounds;
+ }
+
UpdateRectangles();
}
diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs
index 936b68f04..c5c011db0 100644
--- a/Source/Editor/Surface/SurfaceNode.cs
+++ b/Source/Editor/Surface/SurfaceNode.cs
@@ -167,6 +167,15 @@ namespace FlaxEditor.Surface
if (Surface == null)
return;
+ // Snap bounds (with ceil) when using grid snapping
+ if (Surface.GridSnappingEnabled)
+ {
+ var size = Surface.SnapToGrid(new Float2(width, height), true);
+ width = size.X;
+ height = size.Y;
+ }
+
+ // Arrange output boxes on the right edge
for (int i = 0; i < Elements.Count; i++)
{
if (Elements[i] is OutputBox box)
@@ -175,6 +184,7 @@ namespace FlaxEditor.Surface
}
}
+ // Resize
Size = CalculateNodeSize(width, height);
}
From cc019520590428ec896fab37e0079a386036dec5 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Wed, 11 Sep 2024 20:44:45 +0200
Subject: [PATCH 105/114] Fix Visject parameter values restore after script is
saved in editor by using original value diff
#2276
---
Source/Engine/Content/Assets/VisualScript.cpp | 8 +++++++-
Source/Engine/Content/Assets/VisualScript.h | 1 +
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/Source/Engine/Content/Assets/VisualScript.cpp b/Source/Engine/Content/Assets/VisualScript.cpp
index 616fbe91a..4fd1718ab 100644
--- a/Source/Engine/Content/Assets/VisualScript.cpp
+++ b/Source/Engine/Content/Assets/VisualScript.cpp
@@ -1471,7 +1471,8 @@ Asset::LoadResult VisualScript::load()
for (int32 i = 0; i < count; i++)
{
const int32 oldIndex = _oldParamsLayout.Find(Graph.Parameters[i].Identifier);
- instanceParams[i] = oldIndex != -1 ? valuesCache[oldIndex] : Graph.Parameters[i].Value;
+ const bool useOldValue = oldIndex != -1 && valuesCache[oldIndex] != _oldParamsValues[i];
+ instanceParams[i] = useOldValue ? valuesCache[oldIndex] : Graph.Parameters[i].Value;
}
}
}
@@ -1486,6 +1487,8 @@ Asset::LoadResult VisualScript::load()
instanceParams[i] = Graph.Parameters[i].Value;
}
}
+ _oldParamsLayout.Clear();
+ _oldParamsValues.Clear();
}
#endif
@@ -1499,15 +1502,18 @@ void VisualScript::unload(bool isReloading)
{
// Cache existing instanced parameters IDs to restore values after asset reload (params order might be changed but the IDs are stable)
_oldParamsLayout.Resize(Graph.Parameters.Count());
+ _oldParamsValues.Resize(Graph.Parameters.Count());
for (int32 i = 0; i < Graph.Parameters.Count(); i++)
{
auto& param = Graph.Parameters[i];
_oldParamsLayout[i] = param.Identifier;
+ _oldParamsValues[i] = param.Value;
}
}
else
{
_oldParamsLayout.Clear();
+ _oldParamsValues.Clear();
}
#else
_instances.Clear();
diff --git a/Source/Engine/Content/Assets/VisualScript.h b/Source/Engine/Content/Assets/VisualScript.h
index 4fda11fef..be90f4a68 100644
--- a/Source/Engine/Content/Assets/VisualScript.h
+++ b/Source/Engine/Content/Assets/VisualScript.h
@@ -154,6 +154,7 @@ private:
Array> _fields;
#if USE_EDITOR
Array _oldParamsLayout;
+ Array _oldParamsValues;
#endif
public:
From 3a1dde0081d56988bed89da4e023fba39a17a8d0 Mon Sep 17 00:00:00 2001
From: xxSeys1
Date: Wed, 11 Sep 2024 22:19:44 +0200
Subject: [PATCH 106/114] rename VisualScriptingDescriptionPanel to
NodeDescriptionPanel
The description panel no longer only shows in the visual scripting editor but also in the material editor.
There is one editor setting that shows/ hides both so I changed the name to something more general.
---
Source/Editor/Options/InterfaceOptions.cs | 6 +++---
Source/Editor/Surface/ContextMenu/VisjectCM.cs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Source/Editor/Options/InterfaceOptions.cs b/Source/Editor/Options/InterfaceOptions.cs
index f7cc7107a..3417f72a0 100644
--- a/Source/Editor/Options/InterfaceOptions.cs
+++ b/Source/Editor/Options/InterfaceOptions.cs
@@ -376,11 +376,11 @@ namespace FlaxEditor.Options
public float ConnectionCurvature { get; set; } = 1.0f;
///
- /// Gets or sets the visject connection curvature.
+ /// Gets or sets a value that indicates wether the context menu description panel is shown or not.
///
[DefaultValue(true)]
- [EditorDisplay("Visject"), EditorOrder(550), Tooltip("Shows/hides the description panel in the visual scripting context menu.")]
- public bool VisualScriptingDescriptionPanel { get; set; } = true;
+ [EditorDisplay("Visject"), EditorOrder(550), Tooltip("Shows/hides the description panel in visual scripting context menu.")]
+ public bool NodeDescriptionPanel { get; set; } = true;
///
/// Gets or sets the surface grid snapping option.
diff --git a/Source/Editor/Surface/ContextMenu/VisjectCM.cs b/Source/Editor/Surface/ContextMenu/VisjectCM.cs
index 1f70cd645..f31f1245a 100644
--- a/Source/Editor/Surface/ContextMenu/VisjectCM.cs
+++ b/Source/Editor/Surface/ContextMenu/VisjectCM.cs
@@ -809,7 +809,7 @@ namespace FlaxEditor.Surface.ContextMenu
if (!_useDescriptionPanel)
return;
- if (archetype == null || !Editor.Instance.Options.Options.Interface.VisualScriptingDescriptionPanel)
+ if (archetype == null || !Editor.Instance.Options.Options.Interface.NodeDescriptionPanel)
{
HideDescriptionPanel();
return;
From 33ccdea7617b05bef22e8484ad1fa0d0d6d464ce Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 12 Sep 2024 09:02:48 +0200
Subject: [PATCH 107/114] Fixes and shader update
#2673
---
Content/Shaders/ColorGrading.flax | 4 ++--
.../Graphics/GPUPipelineStatePermutations.h | 3 +++
Source/Engine/Renderer/ColorGradingPass.h | 2 +-
Source/Shaders/ColorGrading.shader | 21 +++++++------------
4 files changed, 13 insertions(+), 17 deletions(-)
diff --git a/Content/Shaders/ColorGrading.flax b/Content/Shaders/ColorGrading.flax
index c797e5b26..269dfa4a2 100644
--- a/Content/Shaders/ColorGrading.flax
+++ b/Content/Shaders/ColorGrading.flax
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:e378171320ebc1c7516832a15576254d403508e1ae1e14c9af5cf30c75f231cc
-size 10629
+oid sha256:304d96b72a53d4faa8bb6945b4d3a92199e5493c110e23d60e76a2c926149a47
+size 12322
diff --git a/Source/Engine/Graphics/GPUPipelineStatePermutations.h b/Source/Engine/Graphics/GPUPipelineStatePermutations.h
index e3306fa92..44214056a 100644
--- a/Source/Engine/Graphics/GPUPipelineStatePermutations.h
+++ b/Source/Engine/Graphics/GPUPipelineStatePermutations.h
@@ -39,11 +39,13 @@ public:
FORCE_INLINE GPUPipelineState* Get(int index) const
{
+ ASSERT_LOW_LAYER(index >= 0 && index < Size);
return States[index];
}
FORCE_INLINE GPUPipelineState*& operator[](int32 index)
{
+ ASSERT_LOW_LAYER(index >= 0 && index < Size);
return States[index];
}
@@ -129,6 +131,7 @@ public:
public:
FORCE_INLINE GPUShaderProgramCS* Get(const int index) const
{
+ ASSERT_LOW_LAYER(index >= 0 && index < Size);
return Shaders[index];
}
diff --git a/Source/Engine/Renderer/ColorGradingPass.h b/Source/Engine/Renderer/ColorGradingPass.h
index 39968a4e6..7da9a20df 100644
--- a/Source/Engine/Renderer/ColorGradingPass.h
+++ b/Source/Engine/Renderer/ColorGradingPass.h
@@ -15,7 +15,7 @@ private:
bool _useVolumeTexture;
PixelFormat _lutFormat;
AssetReference _shader;
- GPUPipelineStatePermutationsPs<3> _psLut;
+ GPUPipelineStatePermutationsPs<4> _psLut;
public:
diff --git a/Source/Shaders/ColorGrading.shader b/Source/Shaders/ColorGrading.shader
index cd5d0faf6..59de00aa2 100644
--- a/Source/Shaders/ColorGrading.shader
+++ b/Source/Shaders/ColorGrading.shader
@@ -193,9 +193,10 @@ float3 TonemapACES(float3 linearColor)
#endif
-#ifdef TONE_MAPPING_MODE_NEUTRAL
+#ifdef TONE_MAPPING_MODE_AGX
-float3 agxAscCdl(float3 color, float3 slope, float3 offset, float3 power, float sat) {
+float3 agxAscCdl(float3 color, float3 slope, float3 offset, float3 power, float sat)
+{
const float3 lw = float3(0.2126, 0.7152, 0.0722);
float luma = dot(color, lw);
float3 c = pow(color * slope + offset, power);
@@ -209,27 +210,23 @@ float3 TonemapAGX(float3 linearColor)
0.0951, 0.7612, 0.0768,
0.0483, 0.1014, 0.8113
};
-
static const float3x3 AgXOutsetMatrix = {
1.1271, -0.1413, -0.1413,
-0.1106, 1.1578, -0.1106,
-0.0165, -0.0165, 1.2519
};
-
static const float AgxMinEv = -12.47393;
static const float AgxMaxEv = 4.026069;
- float3 color = linearColor;
+ float3 color = linearColor;
color = mul(color, AgXInsetMatrix);
color = max(color, 1e-10);
color = clamp(log2(color), AgxMinEv, AgxMaxEv);
color = (color - AgxMinEv) / (AgxMaxEv - AgxMinEv);
-
- color = clamp(color, 0.0, 1.0);
+ color = saturate(color);
float3 x2 = color * color;
float3 x4 = x2 * x2;
-
color = + 15.5 * x4 * x2
- 40.14 * x4 * color
+ 31.96 * x4
@@ -239,14 +236,10 @@ float3 TonemapAGX(float3 linearColor)
- 0.00232;
// color = agxAscCdl(color, float3(1.0, 1.0, 1.0), float3(0.0, 0.0, 0.0), float3(1.35, 1.35, 1.35), 1.4);
-
color = mul(color, AgXOutsetMatrix);
-
color = pow(max(float3(0.0, 0.0, 0.0), color), float3(2.2, 2.2, 2.2));
-
- color = clamp(color, 0.0, 1.0);
-
- return color;
+ color = saturate(color);
+ return color;
}
#endif
From e7dc58c596941c56193acc4e4bbe534d773625f7 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 12 Sep 2024 09:11:55 +0200
Subject: [PATCH 108/114] Fix crash when showing shader source that is empty
#2896
---
Source/Editor/Managed/ManagedEditor.Internal.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/Source/Editor/Managed/ManagedEditor.Internal.cpp b/Source/Editor/Managed/ManagedEditor.Internal.cpp
index 31295253f..d8ea556c8 100644
--- a/Source/Editor/Managed/ManagedEditor.Internal.cpp
+++ b/Source/Editor/Managed/ManagedEditor.Internal.cpp
@@ -272,11 +272,13 @@ DEFINE_INTERNAL_CALL(MString*) EditorInternal_GetShaderAssetSourceCode(BinaryAss
obj->GetChunkData(SHADER_FILE_CHUNK_SOURCE, data);
auto source = data.Get();
auto sourceLength = data.Length();
+ if (sourceLength <= 0)
+ return MCore::String::GetEmpty();
Encryption::DecryptBytes(data.Get(), data.Length());
source[sourceLength - 1] = 0;
// Get source and encrypt it back
- const StringAnsiView srcData((const char*)data.Get(), data.Length());
+ const StringAnsiView srcData(source, sourceLength);
const auto str = MUtils::ToString(srcData);
Encryption::EncryptBytes(data.Get(), data.Length());
From 2d61e329cbc95df0406280ebf4f7d074164ad8d7 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 12 Sep 2024 09:12:08 +0200
Subject: [PATCH 109/114] Update asset
---
Content/Shaders/ColorGrading.flax | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Content/Shaders/ColorGrading.flax b/Content/Shaders/ColorGrading.flax
index 269dfa4a2..92f2b2794 100644
--- a/Content/Shaders/ColorGrading.flax
+++ b/Content/Shaders/ColorGrading.flax
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:304d96b72a53d4faa8bb6945b4d3a92199e5493c110e23d60e76a2c926149a47
-size 12322
+oid sha256:2c45e8483ac28e494958d96e5965fc54871e8de88b2e52c79b58e27d4a0636cb
+size 12321
From 31bce25c3701d2e45d4c4f0878aaf7ea0c6123b9 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 12 Sep 2024 12:40:13 +0200
Subject: [PATCH 110/114] Add deprecated property to fix compile in old
projects
42b4443e14030baca6658eb525b1e064041dec4a
---
Source/Engine/Terrain/Terrain.h | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/Source/Engine/Terrain/Terrain.h b/Source/Engine/Terrain/Terrain.h
index d9ef89fb5..4aac9f46a 100644
--- a/Source/Engine/Terrain/Terrain.h
+++ b/Source/Engine/Terrain/Terrain.h
@@ -187,7 +187,7 @@ public:
///
/// Gets the list with physical materials used to define the terrain collider physical properties - each for terrain layer (layer index matches index in this array).
///
- API_PROPERTY(Attributes="EditorOrder(520), EditorDisplay(\"Collision\"), Collection(MinCount = 8, MaxCount = 8)")
+ API_PROPERTY(Attributes="EditorOrder(520), EditorDisplay(\"Collision\"), Collection(MinCount=8, MaxCount=8)")
FORCE_INLINE const Array, FixedAllocation<8>>& GetPhysicalMaterials() const
{
return _physicalMaterials;
@@ -199,6 +199,26 @@ public:
API_PROPERTY()
void SetPhysicalMaterials(const Array, FixedAllocation<8>>& value);
+ ///
+ /// Gets the physical material used to define the terrain collider physical properties.
+ /// [Deprecated on 16.02.2024, expires on 16.02.2026]
+ ///
+ API_PROPERTY(Attributes="HideInEditor, NoSerialize")
+ DEPRECATED FORCE_INLINE JsonAssetReference& GetPhysicalMaterial()
+ {
+ return _physicalMaterials[0];
+ }
+
+ ///
+ /// Sets the physical materials used to define the terrain collider physical properties.
+ ///
+ DEPRECATED API_PROPERTY()
+ void SetPhysicalMaterial(const JsonAssetReference& value)
+ {
+ for (auto& e : _physicalMaterials)
+ e = value;
+ }
+
///
/// Gets the terrain Level Of Detail count.
///
From 4087e9c291f25756a1f2b11f3c93bc9b5f284725 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 12 Sep 2024 12:40:29 +0200
Subject: [PATCH 111/114] Add deprecated property to fix compile in old
projects
42b4443e14030baca6658eb525b1e064041dec4a
---
Source/Engine/Terrain/Terrain.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/Source/Engine/Terrain/Terrain.h b/Source/Engine/Terrain/Terrain.h
index 4aac9f46a..4fff2fe9e 100644
--- a/Source/Engine/Terrain/Terrain.h
+++ b/Source/Engine/Terrain/Terrain.h
@@ -211,6 +211,7 @@ public:
///
/// Sets the physical materials used to define the terrain collider physical properties.
+ /// [Deprecated on 16.02.2024, expires on 16.02.2026]
///
DEPRECATED API_PROPERTY()
void SetPhysicalMaterial(const JsonAssetReference& value)
From e834f2ec945511b229495fe22c0742a3d8f3baa8 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 12 Sep 2024 12:40:50 +0200
Subject: [PATCH 112/114] Hide internal codegen variable from debugger
---
Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
index bd7a58659..db7bac446 100644
--- a/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
+++ b/Source/Tools/Flax.Build/Bindings/BindingsGenerator.CSharp.cs
@@ -1116,6 +1116,8 @@ namespace Flax.Build.Bindings
contents.Append(indent).Append('}').AppendLine();
contents.AppendLine();
+ if (buildData.Configuration != TargetConfiguration.Release)
+ contents.Append(indent).Append("[System.Diagnostics.DebuggerBrowsable(global::System.Diagnostics.DebuggerBrowsableState.Never)]").AppendLine();
contents.Append(indent).Append("private ");
if (eventInfo.IsStatic)
contents.Append("static ");
From 0bc98a5f1818c309812bab1e366ad52ef2aa2a07 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 12 Sep 2024 12:41:03 +0200
Subject: [PATCH 113/114] Improve asset reference debug in C# when it's empty
---
Source/Engine/Content/JsonAssetReference.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Source/Engine/Content/JsonAssetReference.cs b/Source/Engine/Content/JsonAssetReference.cs
index 86ad9a087..f78b23b73 100644
--- a/Source/Engine/Content/JsonAssetReference.cs
+++ b/Source/Engine/Content/JsonAssetReference.cs
@@ -130,7 +130,7 @@ namespace FlaxEngine
///
public override string ToString()
{
- return Asset?.ToString();
+ return Asset?.ToString() ?? "null";
}
///
From e0a488dec14706f1560157d0ecb22f0fd3218bc4 Mon Sep 17 00:00:00 2001
From: Wojtek Figat
Date: Thu, 12 Sep 2024 12:41:22 +0200
Subject: [PATCH 114/114] Fix failed check in `Camera::ConvertMouseToRay` when
result is invalid ray
---
Source/Engine/Level/Actors/Camera.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Source/Engine/Level/Actors/Camera.cpp b/Source/Engine/Level/Actors/Camera.cpp
index e5d770343..2ff9c928e 100644
--- a/Source/Engine/Level/Actors/Camera.cpp
+++ b/Source/Engine/Level/Actors/Camera.cpp
@@ -237,7 +237,10 @@ Ray Camera::ConvertMouseToRay(const Float2& mousePosition, const Viewport& viewp
viewport.Unproject(nearPoint, ivp, nearPoint);
viewport.Unproject(farPoint, ivp, farPoint);
- return Ray(nearPoint, Vector3::Normalize(farPoint - nearPoint));
+ Vector3 dir = Vector3::Normalize(farPoint - nearPoint);
+ if (dir.IsZero())
+ return Ray::Identity;
+ return Ray(nearPoint, dir);
}
Viewport Camera::GetViewport() const