Merge remote-tracking branch 'origin/master' into dotnet7
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#include "Engine/Engine/Globals.h"
|
||||
#include "Engine/Profiler/ProfilerCPU.h"
|
||||
#include "Engine/Streaming/StreamingSettings.h"
|
||||
#if FLAX_TESTS
|
||||
#if FLAX_TESTS || USE_EDITOR
|
||||
#include "Engine/Platform/FileSystem.h"
|
||||
#endif
|
||||
|
||||
@@ -91,6 +91,19 @@ GameSettings* GameSettings::Get()
|
||||
// Silence missing GameSettings during test run before Editor creates it (not important)
|
||||
if (!FileSystem::FileExists(assetPath))
|
||||
return nullptr;
|
||||
#endif
|
||||
#if USE_EDITOR
|
||||
// Log once missing GameSettings in Editor
|
||||
if (!FileSystem::FileExists(assetPath))
|
||||
{
|
||||
static bool LogOnce = true;
|
||||
if (LogOnce)
|
||||
{
|
||||
LogOnce = false;
|
||||
LOG(Error, "Missing file game settings asset ({0})", assetPath);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
#endif
|
||||
GameSettingsAsset = Content::LoadAsync<JsonAsset>(assetPath);
|
||||
if (GameSettingsAsset == nullptr)
|
||||
|
||||
@@ -617,12 +617,11 @@ public:
|
||||
FunctionType* bindings = (FunctionType*)Platform::AtomicRead((intptr volatile*)&_ptr);
|
||||
for (intptr i = 0; i < size; i++)
|
||||
{
|
||||
auto function = (StubSignature)Platform::AtomicRead((intptr volatile*)&bindings[i]._function);
|
||||
if (function != nullptr)
|
||||
{
|
||||
auto callee = (void*)Platform::AtomicRead((intptr volatile*)&bindings[i]._callee);
|
||||
auto function = (StubSignature)Platform::AtomicRead((intptr volatile*)&bindings->_function);
|
||||
auto callee = (void*)Platform::AtomicRead((intptr volatile*)&bindings->_callee);
|
||||
if (function != nullptr && function == (StubSignature)Platform::AtomicRead((intptr volatile*)&bindings->_function))
|
||||
function(callee, Forward<Params>(params)...);
|
||||
}
|
||||
++bindings;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -419,6 +419,31 @@ namespace FlaxEngine
|
||||
return box;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a <see cref="BoundingBox" /> that is as large as the box and point.
|
||||
/// </summary>
|
||||
/// <param name="value1">The box to merge.</param>
|
||||
/// <param name="value2">The point to merge.</param>
|
||||
/// <param name="result">When the method completes, contains the newly constructed bounding box.</param>
|
||||
public static void Merge(ref BoundingBox value1, ref Vector3 value2, out BoundingBox result)
|
||||
{
|
||||
Vector3.Min(ref value1.Minimum, ref value2, out result.Minimum);
|
||||
Vector3.Max(ref value1.Maximum, ref value2, out result.Maximum);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs a <see cref="BoundingBox" /> that is as large as the box and point.
|
||||
/// </summary>
|
||||
/// <param name="value2">The point to merge.</param>
|
||||
/// <returns>The newly constructed bounding box.</returns>
|
||||
public BoundingBox Merge(Vector3 value2)
|
||||
{
|
||||
BoundingBox result;
|
||||
Vector3.Min(ref Minimum, ref value2, out result.Minimum);
|
||||
Vector3.Max(ref Maximum, ref value2, out result.Maximum);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Transforms bounding box using the given transformation matrix.
|
||||
/// </summary>
|
||||
@@ -498,6 +523,19 @@ namespace FlaxEngine
|
||||
result = new BoundingBox(min, max);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the bounding box that is offseted by the given vector. Adds the offset value to minimum and maximum points.
|
||||
/// </summary>
|
||||
/// <param name="offset">The bounds offset.</param>
|
||||
/// <returns>The offsetted bounds.</returns>
|
||||
public BoundingBox MakeOffsetted(Vector3 offset)
|
||||
{
|
||||
BoundingBox result;
|
||||
Vector3.Add(ref Minimum, ref offset, out result.Minimum);
|
||||
Vector3.Add(ref Maximum, ref offset, out result.Maximum);
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the bounding box that is offseted by the given vector. Adds the offset value to minimum and maximum points.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user