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.