To customize scenes in the Unreal® Editor and use them in Simulink®, you must install the UAV Toolbox Interface for Unreal Engine® Projects.
Before installing the support package, make sure that your environment meets the minimum software and hardware requirements described in Unreal Engine Simulation Environment Requirements and Limitations. In particular, verify that you have version 15.9 or higher of Visual Studio® 2017 installed. This software is required for using the Unreal Editor to customize scenes.
In addition, verify that your project is compatible with Unreal Engine, Version 4.23. If your project was created with an older version of the Unreal Editor, upgrade your project to version 4.23.
To install the UAV Toolbox Interface for Unreal Engine Projects support package, follow these steps:
On the MATLAB® Home tab, in the Environment section, select Add-Ons > Get Add-Ons.

In the Add-On Explorer window, search for the UAV Toolbox Interface for Unreal Engine Projects support package. Click Install.
Note
You must have write permission for the installation folder.
The UAV Toolbox Interface for Unreal Engine Projects support package includes these components:
An Unreal Engine project file (AutoVrtlEnv.uproject)
and its associated files. This project file includes editable versions of
the prebuilt 3D scenes that you can select from the Scene
source parameter of the Simulation
3D Scene Configuration block.
Two plugin files, MathWorkSimulation.uplugin and
MathworksUAVContent.uplugin. These plugins establish
the connection between Simulink and the Unreal Editor and is required for co-simulation.
To set up scene customization, you must copy this project and plugin onto your local machine.
Copy the AutoVrtlEnv project folder into a folder on your local
machine.
Specify the path to the support package folder that contains the project.
If you previously downloaded the support package, specify only the latest
download path, as shown here. Also specify a local folder destination in
which to copy the project. This code specifies a local folder of
C:\Local.
supportPackageFolder = fullfile( ... matlabshared.supportpkg.getSupportPackageRoot, ... "toolbox","shared","sim3dprojects","spkg"); localFolder = "C:\Local";
Copy the AutoVrtlEnv project from the support
package folder to the local destination folder.
projectFolderName = "AutoVrtlEnv"; projectSupportPackageFolder = fullfile(supportPackageFolder,"project",projectFolderName); projectLocalFolder = fullfile(localFolder,projectFolderName); if ~exist(projectLocalFolder,"dir") copyfile(projectSupportPackageFolder,projectLocalFolder); end
The AutoVrtlEnv.uproject file and all of its supporting
files are now located in a folder named AutoVrtlEnv
within the specified local folder. For example:
C:\Local\AutoVrtlEnv.
Copy the MathWorksSimulation and
MathworksUAVContent plugins into the
Plugins folder of your Unreal Engine installation.
Specify the local folder containing your Unreal Engine installation. This code shows the default installation location for the editor on a Windows® machine.
ueInstallFolder = "C:\Program Files\Epic Games\UE_4.23";Copy the plugins from the support package into the
Plugins folder.
mwSimPluginName = "MathWorksSimulation.uplugin"; mwSimPluginFolder = fullfile(supportPackageFolder,"plugins","mw_simulation","MathWorksSimulation"); mwUAVPluginName = "MathworksUAVContent.uplugin"; mwUAVPluginFolder = fullfile(supportPackageFolder,"plugins","mw_uav","MathworksUAVContent"); uePluginFolder = fullfile(ueInstallFolder,"Engine","Plugins"); uePluginDestination = fullfile(uePluginFolder,"Marketplace","MathWorks"); cd(uePluginFolder) foundPlugins = [dir("**/" + mwSimPluginName) dir("**/" + mwUAVPluginName)]; if ~isempty(foundPlugins) numPlugins = size(foundPlugins,1); msg2 = cell(1,numPlugins); pluginCell = struct2cell(foundPlugins); msg1 = "Plugin(s) already exist here:" + newline + newline; for n = 1:numPlugins msg2{n} = " " + pluginCell{2,n} + newline; end msg3 = newline + "Please remove plugin folder(s) and try again."; msg = msg1 + msg2 + msg3; warning(msg); else copyfile(mwSimPluginFolder, fullfile(uePluginDestination,"MathWorksSimulation")); disp("Successfully copied MathWorksSimulation plugin to UE4 engine plugins!") copyfile(mwUAVPluginFolder, fullfile(uePluginDestination,"MathworksUAVContent")); disp("Successfully copied MathworksUAVContent plugin to UE4 engine plugins!") end
After you install and set up the support package, you can begin customizing scenes. See Customize Unreal Engine Scenes Using Simulink and Unreal Editor.