Download

How to configure the Chaos Destruction Demo for the 4.26-Chaos Preview

So you’ve downloaded the Unreal Engine 4.26-Chaos Preview build and the Chaos Destruction Demo, but how do you get started?

Currently, the 4.26 version of the Chaos Destruction Demo is configured to be built alongside a source build of 4.26. Because PhysX is the underlying physics engine in 4.26, you’ll need to enable Chaos and then re-build, so that the project gets a full editor build and doesn’t attempt to share the base editor binary.

To run the Chaos Destruction Demo project, the target scripts will need to be modified to no longer set up those flags, as everything should be set correctly in 4.26-Chaos Preview.

Three easy steps [ol]
[li]Download ChaosDestructionDemoEditor.Target.cs and ChaosDestructionDemo.Target.cs here[/li][li]Find the original files:[LIST=1][/li][li]…/ChaosDestructionDemo/Source/ChaosDestructionDemo.Target.cs[/li][li]…/ChaosDestructionDemo/Source/ChaosDestructionDemoEditor.Target.cs[/li][/ol]
[li]Replace the original files with the new files you downloaded and voila![/li][/LIST] Alternatively…

You can copy the code below over the code in each file:

…*/ChaosDestructionDemo/Source/ChaosDestructionDemo.Target.cs


// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class ChaosDestructionDemoTarget : TargetRules
{ public ChaosDestructionDemoTarget(TargetInfo Target) : base(Target)
{
  [INDENT=2]Type = TargetType.Game;

ExtraModuleNames.AddRange( new string[] { "ChaosDestructionDemo" } );[/INDENT]
  }
 
 }


…*/ChaosDestructionDemo/Source/ChaosDestructionDemoEditor.Target.cs


// Copyright Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;
using System.Collections.Generic;

public class ChaosDestructionDemoEditorTarget : TargetRules
{ public ChaosDestructionDemoEditorTarget(TargetInfo Target) : base(Target)
{
  [INDENT=2]Type = TargetType.Editor;

ExtraModuleNames.AddRange( new string[] { "ChaosDestructionDemo" } );[/INDENT]
  }
 
 }


In //UE4/Release-4.26-Chaos/Engine/Source/Programs/UnrealBuildTool/Configuration/TargetRules.cs, the base target rules already have the correct flags set, so any binary generated there will have the correct code compiled in. Since both the binary and the new project now have matching configurations, we can remove all the flags and the unique build environment.

3 Likes

So does this require building the editor from source or not?

Because after replacing these files the editor still complains that ChaosDestructionDemo module is missing or built for a different version of the engine, and attempting to rebuild them results in an error stating they could not be compiled and suggests rebuilding from source manually.

Unreal Engine 4.26-Chaos Preview now available on the Epic Games launcher - Announcements and Releases - Unreal Engine Forums

This is not an answer to my question.

Were you able to get this to work using the 4.26-Chaos preview available from the launcher? Because that’s what I tried using and got the results I posted.

Figured it out

Really should have known, but it’s a C++ project so you have to build the project files for it (and it means you need to have Visual Studio installed)

After following the steps above, right click on the ChaosDestructionDemo.uproject and select “Switch Unreal Engine version…”, pick 4.26Chaos from the list and wait for it to build the sln. Now you can launch the project and it will correctly build the module.

Perhaps this should have been obvious but I think it should have been included in the original post.

3 Likes

Building ChaosDestructionDemoEditor…
Using Visual Studio 2017 14.13.26131 toolchain (C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.13.26128) and Windows 10.0.18362.0 SDK (D:\windowssdk).
[Upgrade]
[Upgrade] Using backward-compatible build settings. The latest version of UE4 sets the following values by default, which may require code changes:
[Upgrade] bLegacyPublicIncludePaths = false => Omits subfolders from public include paths to reduce compiler command line length. (Previously: true).
[Upgrade] ShadowVariableWarningLevel = WarningLevel.Error => Treats shadowed variable warnings as errors. (Previously: WarningLevel.Warning).
[Upgrade] PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs => Set in build.cs files to enables IWYU-style PCH model. See IWYU | Unreal Engine Documentation. (Previously: PCHUsageMode.UseSharedPCHs).
[Upgrade] Suppress this message by setting ‘DefaultBuildSettings = BuildSettingsVersion.V2;’ in ChaosDestructionDemoEditor.Target.cs, and explicitly overriding settings that differ from the new defaults.
[Upgrade]
Building 9 actions with 16 processes…
@progress ‘Compiling C++ source code…’ 0%
@progress ‘Compiling C++ source code…’ 11%
[1/9] Default.rc2
@progress ‘Compiling C++ source code…’ 22%
[2/9] SharedPCH.Engine.cpp
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C3520: ‘ArgTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Math/IntPoint.h(557): note: see reference to class template instantiation ‘TTuple<>’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): note: ‘T=ArgTypes &&’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(620): error C2672: ‘UE4Tuple_Private::ConstructibleConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C3520: ‘OtherTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): note: ‘T=OtherTypes &&’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(629): error C2672: ‘UE4Tuple_Private::ConstructibleConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C3520: ‘OtherTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): note: ‘T=const OtherTypes &’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(638): error C2672: ‘UE4Tuple_Private::ConstructibleConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C3520: ‘OtherTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): note: ‘T=const OtherTypes &’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(653): error C2672: ‘UE4Tuple_Private::AssignableConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C3520: ‘OtherTypes’: parameter pack must be expanded in this context
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(626): note: see reference to function template instantiation ‘T &&DeclVal(void)’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2672: ‘DeclVal’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2893: Failed to specialize function template ‘T &&DeclVal(void)’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): note: With the following template arguments:
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): note: ‘T=OtherTypes &&’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C3546: ‘…’: there are no parameter packs available to expand
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Templates/Tuple.h(663): error C2672: ‘UE4Tuple_Private::AssignableConceptCheck’: no matching overloaded function found
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Delegates/DelegateInstancesImpl.h(365): error C2338: You cannot use raw method delegates with UObjects.
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Delegates/DelegateInstancesImpl.h(493): note: see reference to class template instantiation ‘TBaseRawMethodDelegateInstance<bConst,UserClass,WrappedRetValType(ParamTypes…),UserPolicy,VarTypes…>’ being compiled
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Misc/StringBuilder.h(354): error C2995: ‘unknown-type operator <<(FWideStringBuilderBase &,T &&)’: function template has already been defined
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\Core\Public\Misc/StringBuilder.h(345): note: see declaration of ‘operator <<’
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\RHI\Public\RHI.h(2018): error C2327: ‘FRHITransition::State’: is not a type name, static, or enumerator
D:\epic\UE_4.26Chaos\Engine\Source\Runtime\RHI\Public\RHI.h(2018): error C2065: ‘State’: undeclared identifier
LogInit: Warning: Still incompatible or missing module: ChaosDestructionDemo
LogCore: Engine exit requested (reason: EngineExit() was called)

This worked. Thank you

Having problems getting **Chaos Destruction Demo to **work. Added the correct changes to the build cs files. Project compiles and runs, no errors. Chaos plugins enabled. But nothing fractures or breaks?

Anybody have luck getting it to work?

Thanks for any feedback

[UPDATE] User error - mistakenly generated with stock 4.26. Had to switch to 4.26Chaos. Its working now.

Crashed on trying to run ChaosDestructionDemo, after moving and overwriting the 2 revised .cs files and rebuilding the project with VS2019. Can’t get this running at all using 4.26Chaos.
No clue what the “D:/” is looking for, my system doesn’t have a D: drive and never has.


Fatal error: [File:D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11Util.cpp] [Line: 258] Direct3DDeviceIMContext->Map(VertexBuffer->Resource,0,D3D11_MAP_WRITE_NO_OVERWRITE,0,&MappedSubresource) failed at D:/Build/++UE4/Sync/Engine/Source/Runtime/Windows/D3D11RHI/Private/D3D11VertexBuffer.cpp:162 with error E_INVALIDARG

UE4Editor_D3D11RHI
UE4Editor_D3D11RHI
UE4Editor_RHI
UE4Editor_GeometryCollectionEngine
UE4Editor_GeometryCollectionEngine
UE4Editor_GeometryCollectionEngine
UE4Editor_Core
UE4Editor_Core
UE4Editor_RenderCore
UE4Editor_RenderCore
UE4Editor_Core
UE4Editor_Core
kernel32
ntdll

I was actually trying to get EOS working but the build for the 4.27 branch failed. So to prove that my steps worked, I cloned the UnrealEngine repository, switched to 4.26-chaos, ran Setup.bat and GenerateProjectFiles.bat, and had to make one change to successfully load the Chaos Demo.

PS E:\Epic> git clone https://github.com/EpicGames/UnrealEngine UE_4.26Chaos
Cloning into 'UE_4.26Chaos'...
remote: Enumerating objects: 3219666, done.
remote: Counting objects: 100% (1365/1365), done.
remote: Compressing objects: 100% (739/739), done.
remote: Total 3219666 (delta 621), reused 1323 (delta 604), pack-reused 3218301 eceiving objects: 100% (3219666/3219666),
Receiving objects: 100% (3219666/3219666), 7.32 GiB | 16.43 MiB/s, done.
Resolving deltas: 100% (2031615/2031615), done.
Updating files: 100% (137999/137999), done.

PS E:\Epic> cd UE_4.26Chaos

PS E:\Epic\UE_4.26Chaos> git status
On branch release
Your branch is up to date with 'origin/release'.

nothing to commit, working tree clean

PS E:\Epic\UE_4.26Chaos> git checkout 4.26-chaos
Switched to a new branch '4.26-chaos'
Branch '4.26-chaos' set up to track remote branch '4.26-chaos' from 'origin'.

PS E:\Epic\UE_4.26Chaos> git status
On branch 4.26-chaos
Your branch is up to date with 'origin/4.26-chaos'.

nothing to commit, working tree clean

PS E:\Epic\UE_4.26Chaos> .\Setup.bat
Checking dependencies...
Updating dependencies: 100% (63490/63490), 11781.8/11781.8 MiB | 0.02 MiB/s, done.
Registering git hooks...
Installing prerequisites...

PS E:\Epic\UE_4.26Chaos> .\GenerateProjectFiles.bat
Setting up Unreal Engine 4 project files...
Binding IntelliSense data... 100%
Writing project files... 100%

After the Visual Studio solution loaded I had to modify DesktopPlatformBase.cpp based on this thread: [solved] upgrade c++ project from ue 4.24 to 4.25 under Linux

bool FDesktopPlatformBase::CompileGameProject(. . .)
{
    // Append any other options
    //Arguments += " -Progress -NoEngineChanges -NoHotReloadFromIDE";
    Arguments += " -Progress";
}

A few pics:

I replaced the files, but it still reported an error. Does anyone know what this is about?