In my plugin I try to add the SplineMeshCompoment and for some reason that is related to the Chaos system, some how the build system compile the function bellow.
/**
* @brief Remove the Instanced or Scaled wrapper from an ImplicitObject of a known inner type and extract the instance properties
* @return the inner implicit object or null if the wrong type
*/
template<typename T>
const T* UnwrapImplicit(const FImplicitObject& Implicit, FVec3& OutScale, FReal &OutMargin)
{
OutScale = FVec3(1);
OutMargin = FReal(0);
if (const TImplicitObjectScaled<T>* ScaledImplicit = Implicit.template GetObject<TImplicitObjectScaled<T>>())
{
OutScale = ScaledImplicit->GetScale();
OutMargin = ScaledImplicit->GetMargin();
return ScaledImplicit->GetUnscaledObject();
}
else if (const TImplicitObjectInstanced<T>* InstancedImplicit = Implicit.template GetObject<TImplicitObjectInstanced<T>>())
{
OutMargin = InstancedImplicit->GetMargin();
return InstancedImplicit->GetInstancedObject();
}
else if (const T* RawImplicit = Implicit.template GetObject<T>())
{
OutMargin = RawImplicit->GetMargin();
return RawImplicit;
}
....
and It spew these errors.
28>[10/19] Link [x64] UnrealEditor-NewtonSandbox.lib
28>[11/19] Compile [x64] Module.NewtonRuntimeModule.1.cpp
28>[12/19] Compile [x64] Module.NewtonRuntimeModule.2.cpp
28>C:\Program Files\Epic Games\UE_5.5\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C2760: syntax error: ‘const’ was unexpected here; expected ‘expression’
28>C:\Program Files\Epic Games\UE_5.5\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): note: error recovery skipped: ‘const’
28>C:\Program Files\Epic Games\UE_5.5\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C2065: ‘ScaledImplicit’: undeclared identifier
28>C:\Program Files\Epic Games\UE_5.5\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C2903: ‘GetObjectW’: symbol is neither a class template nor a function template
28>C:\Program Files\Epic Games\UE_5.5\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C3878: syntax error: unexpected token ‘(’ following ‘expression’
28>C:\Program Files\Epic Games\UE_5.5\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): note: error recovery skipped: ‘(’
28>C:\Program Files\Epic Games\UE_5.5\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C2760: syntax error: ‘)’ was unexpected here; expected ‘statement’
28>C:\Program Files\Epic Games\UE_5.5\Engine\Source\Runtime\Experimental\Chaos\Public\Chaos\ImplicitObjectScaled.h(1129): error C3878: syntax error: unexpected token ‘)’ following ‘selection_statement’
in my local build I can hack that by commenting ou the function body and return null,
but I can not do that in the production code, since it is support to link with publish version.
the function is not used and seem to be experimental in unreal.
So I am no sure how that managed to pass QA quality.
but in any case, how do I fix that?
I have not found any solution for it, but I have found people with the same problem.
I can’t add to the question in the forum, because the post was closed, wit the assumption that it was fixed, but it is no fix.
this problem happen in all versions of unreal.
so unless I am missing some big step, I am no sure how an why that post was closed.
People not using any code that will include Chaos experimental will not experience this problem.
but is you include include “Components/SplineMeshComponent.h”
and try to get the source for build the collision mesh, your code will crash compiling in UnrealBuildSystem
Julio