@@ -89,15 +89,6 @@ namespace AZ
|
||||
result.Combine(componentLoadResult);
|
||||
}
|
||||
|
||||
{
|
||||
JSR::ResultCode dependencyReadyLoadResult =
|
||||
ContinueLoadingFromJsonObjectField(&entityInstance->m_isDependencyReady,
|
||||
azrtti_typeid<decltype(entityInstance->m_isDependencyReady)>(),
|
||||
inputValue, "IsDependencyReady", context);
|
||||
|
||||
result.Combine(dependencyReadyLoadResult);
|
||||
}
|
||||
|
||||
{
|
||||
JSR::ResultCode runtimeActiveLoadResult =
|
||||
ContinueLoadingFromJsonObjectField(&entityInstance->m_isRuntimeActiveByDefault,
|
||||
@@ -184,20 +175,6 @@ namespace AZ
|
||||
result.Combine(resultComponents);
|
||||
}
|
||||
|
||||
{
|
||||
AZ::ScopedContextPath subPathDependencyReady(context, "m_isDependencyReady");
|
||||
const bool* dependencyReady = &entityInstance->m_isDependencyReady;
|
||||
const bool* dependencyReadyDefault =
|
||||
defaultEntityInstance ? &defaultEntityInstance->m_isDependencyReady : nullptr;
|
||||
|
||||
JSR::ResultCode resultDependencyReady =
|
||||
ContinueStoringToJsonObjectField(outputValue, "IsDependencyReady",
|
||||
dependencyReady, dependencyReadyDefault,
|
||||
azrtti_typeid<decltype(entityInstance->m_isDependencyReady)>(), context);
|
||||
|
||||
result.Combine(resultDependencyReady);
|
||||
}
|
||||
|
||||
{
|
||||
AZ::ScopedContextPath subPathRuntimeActive(context, "m_isRuntimeActiveByDefault");
|
||||
const bool* runtimeActive = &entityInstance->m_isRuntimeActiveByDefault;
|
||||
|
||||
@@ -9,11 +9,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/base.h>
|
||||
#include <AzCore/RTTI/TypeInfo.h>
|
||||
#include <AzCore/Casting/numeric_cast.h>
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
#include <AzCore/std/containers/vector.h>
|
||||
#include <AzCore/std/containers/stack.h>
|
||||
#include <AzCore/std/function/function_fwd.h>
|
||||
#include <AzCore/std/function/function_template.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <AzCore/Math/Transform.h>
|
||||
#include <AzCore/Math/Plane.h>
|
||||
#include <AzCore/Math/SimdMath.h>
|
||||
#include <AzCore/std/containers/array.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -13,9 +13,32 @@
|
||||
#include <AzCore/Math/Obb.h>
|
||||
#include <AzCore/Math/Vector2.h>
|
||||
#include <AzCore/Math/MathScriptHelpers.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
namespace
|
||||
{
|
||||
class TransformSerializer
|
||||
: public SerializeContext::IDataSerializer
|
||||
{
|
||||
public:
|
||||
// number of floats in the serialized representation, 4 for rotation, 1 for scale and 3 for translation
|
||||
static constexpr int NumFloats = 8;
|
||||
|
||||
// number of floats in version 1, which used 4 for rotation, 3 for scale and 3 for translation
|
||||
static constexpr int NumFloatsVersion1 = 10;
|
||||
|
||||
// number of floats in version 0, which stored a 3x4 matrix
|
||||
static constexpr int NumFloatsVersion0 = 12;
|
||||
|
||||
size_t Save(const void* classPtr, IO::GenericStream& stream, bool isDataBigEndian) override;
|
||||
size_t DataToText(IO::GenericStream& in, IO::GenericStream& out, bool isDataBigEndian) override;
|
||||
size_t TextToData(const char* text, unsigned int textVersion, IO::GenericStream& stream, bool isDataBigEndian) override;
|
||||
bool Load(void* classPtr, IO::GenericStream& stream, unsigned int version, bool isDataBigEndian) override;
|
||||
bool CompareValueData(const void* lhs, const void* rhs) override;
|
||||
};
|
||||
}
|
||||
namespace Internal
|
||||
{
|
||||
void TransformDefaultConstructor(Transform* thisPtr)
|
||||
|
||||
@@ -13,30 +13,9 @@
|
||||
#include <AzCore/Math/Vector4.h>
|
||||
#include <AzCore/Math/Quaternion.h>
|
||||
#include <AzCore/Math/MathUtils.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
class TransformSerializer
|
||||
: public SerializeContext::IDataSerializer
|
||||
{
|
||||
public:
|
||||
// number of floats in the serialized representation, 4 for rotation, 1 for scale and 3 for translation
|
||||
static constexpr int NumFloats = 8;
|
||||
|
||||
// number of floats in version 1, which used 4 for rotation, 3 for scale and 3 for translation
|
||||
static constexpr int NumFloatsVersion1 = 10;
|
||||
|
||||
// number of floats in version 0, which stored a 3x4 matrix
|
||||
static constexpr int NumFloatsVersion0 = 12;
|
||||
|
||||
size_t Save(const void* classPtr, IO::GenericStream& stream, bool isDataBigEndian) override;
|
||||
size_t DataToText(IO::GenericStream& in, IO::GenericStream& out, bool isDataBigEndian) override;
|
||||
size_t TextToData(const char* text, unsigned int textVersion, IO::GenericStream& stream, bool isDataBigEndian) override;
|
||||
bool Load(void* classPtr, IO::GenericStream& stream, unsigned int version, bool isDataBigEndian) override;
|
||||
bool CompareValueData(const void* lhs, const void* rhs) override;
|
||||
};
|
||||
|
||||
//! Limits for transform scale values.
|
||||
//! The scale should not be zero to avoid problems with inverting.
|
||||
//! @{
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
|
||||
#include <AzCore/Math/Internal/MathTypes.h>
|
||||
#include <AzCore/RTTI/TypeInfo.h>
|
||||
#include <AzCore/std/algorithm.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/Component/EntityId.h>
|
||||
#include <AzCore/Math/Transform.h>
|
||||
#include <AzCore/Math/Vector3.h>
|
||||
#include <AzCore/Memory/Memory.h>
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/std/containers/stack.h>
|
||||
#include <AzFramework/Entity/EntityDebugDisplayBus.h>
|
||||
|
||||
namespace UnitTest
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <AzFramework/Visibility/OctreeSystemComponent.h>
|
||||
#include <AzCore/Math/ShapeIntersection.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
|
||||
+6
-1
@@ -9,7 +9,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/base.h>
|
||||
#include <AzCore/RTTI/BehaviorContext.h>
|
||||
#include <AzCore/std/string/string.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
class ReflectContext;
|
||||
} // namespace Az
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
namespace AzFramework
|
||||
|
||||
+28
-1
@@ -6,6 +6,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <AzCore/Console/IConsole.h>
|
||||
#include <AzCore/PlatformIncl.h>
|
||||
#include <AzCore/IO/Path/Path.h>
|
||||
#include <AzCore/IO/SystemFile.h>
|
||||
@@ -13,6 +14,9 @@
|
||||
|
||||
#include <Psapi.h>
|
||||
|
||||
AZ_CVAR(bool, ap_tether_lifetime, false, nullptr, AZ::ConsoleFunctorFlags::Null,
|
||||
"If enabled, a parent process that launches the AP will terminate the AP on exit");
|
||||
|
||||
namespace AzFramework::AssetSystem::Platform
|
||||
{
|
||||
void AllowAssetProcessorToForeground()
|
||||
@@ -100,6 +104,21 @@ namespace AzFramework::AssetSystem::Platform
|
||||
fullLaunchCommand += '"';
|
||||
}
|
||||
|
||||
// Create or retrieve the job handle associated with the asset processor
|
||||
HANDLE apJob = nullptr;
|
||||
|
||||
if (ap_tether_lifetime)
|
||||
{
|
||||
apJob = ::CreateJobObjectA(nullptr, "AssetProcessorJob");
|
||||
if (apJob && GetLastError() != ERROR_ALREADY_EXISTS)
|
||||
{
|
||||
// We're creating the job for the first time. Configure it to close child processes when this process exits.
|
||||
JOBOBJECT_EXTENDED_LIMIT_INFORMATION info = {};
|
||||
info.BasicLimitInformation.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
|
||||
::SetInformationJobObject(apJob, JobObjectExtendedLimitInformation, &info, sizeof(info));
|
||||
}
|
||||
}
|
||||
|
||||
STARTUPINFO si;
|
||||
ZeroMemory(&si, sizeof(si));
|
||||
si.cb = sizeof(si);
|
||||
@@ -107,6 +126,14 @@ namespace AzFramework::AssetSystem::Platform
|
||||
si.wShowWindow = SW_MINIMIZE;
|
||||
PROCESS_INFORMATION pi;
|
||||
|
||||
return ::CreateProcessA(nullptr, fullLaunchCommand.data(), nullptr, nullptr, FALSE, 0, nullptr, AZ::IO::FixedMaxPathString{ executableDirectory }.c_str(), &si, &pi) != 0;
|
||||
bool createResult = ::CreateProcessA(nullptr, fullLaunchCommand.data(), nullptr, nullptr, FALSE, 0, nullptr, AZ::IO::FixedMaxPathString{ executableDirectory }.c_str(), &si, &pi) != 0;
|
||||
|
||||
if (ap_tether_lifetime && apJob && createResult)
|
||||
{
|
||||
// Save process and thread handle to terminate AP when the parent process exits
|
||||
::AssignProcessToJobObject(apJob, pi.hProcess);
|
||||
}
|
||||
|
||||
return createResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ class QString;
|
||||
|
||||
namespace AzToolsFramework::AssetUtils
|
||||
{
|
||||
static constexpr const char* AssetImporterSettingsKey{ "/O3DE/SceneAPI/AssetImporter" };
|
||||
static constexpr const char* AssetImporterSupportedFileTypeKey{ "SupportedFileTypeExtensions" };
|
||||
|
||||
//! Reads the "/Amazon/AssetProcessor/Settings/Platforms" entry from the settings registry
|
||||
//! to retrieve all enabled platforms
|
||||
void ReadEnabledPlatformsFromSettingsRegistry(AZ::SettingsRegistryInterface& settingsRegistry,
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
#include <AzCore/Math/Transform.h>
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
|
||||
namespace AZ
|
||||
{
|
||||
|
||||
-20
@@ -67,14 +67,6 @@ namespace AzToolsFramework
|
||||
result.Combine(isStaticLoadResult);
|
||||
}
|
||||
|
||||
{
|
||||
JSR::ResultCode netSyncEnabledLoadResult = ContinueLoadingFromJsonObjectField(
|
||||
&transformComponentInstance->m_netSyncEnabled, azrtti_typeid<decltype(transformComponentInstance->m_netSyncEnabled)>(),
|
||||
inputValue, "Sync Enabled", context);
|
||||
|
||||
result.Combine(netSyncEnabledLoadResult);
|
||||
}
|
||||
|
||||
{
|
||||
JSR::ResultCode interpolatePositionLoadResult = ContinueLoadingFromJsonObjectField(
|
||||
&transformComponentInstance->m_interpolatePosition, azrtti_typeid<decltype(transformComponentInstance->m_interpolatePosition)>(),
|
||||
@@ -172,18 +164,6 @@ namespace AzToolsFramework
|
||||
result.Combine(resultIsStatic);
|
||||
}
|
||||
|
||||
{
|
||||
AZ::ScopedContextPath subPathName(context, "m_netSyncEnabled");
|
||||
const bool* netSyncEnabled = &transformComponentInstance->m_netSyncEnabled;
|
||||
const bool* defaultNetSyncEnabled = defaultTransformComponentInstance ? &defaultTransformComponentInstance->m_netSyncEnabled : nullptr;
|
||||
|
||||
JSR::ResultCode resultNetSyncEnabled = ContinueStoringToJsonObjectField(
|
||||
outputValue, "Sync Enabled", netSyncEnabled, defaultNetSyncEnabled, azrtti_typeid<decltype(transformComponentInstance->m_netSyncEnabled)>(),
|
||||
context);
|
||||
|
||||
result.Combine(resultNetSyncEnabled);
|
||||
}
|
||||
|
||||
{
|
||||
AZ::ScopedContextPath subPathName(context, "m_interpolatePosition");
|
||||
const AZ::InterpolationMode* interpolatePosition = &transformComponentInstance->m_interpolatePosition;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
#include <Prefab/PrefabTestComponent.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
|
||||
namespace UnitTest
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user