Main Content

copyExampleSim3dProject

Copy support package files and plugins to specified folders

Since R2022b

Syntax

sim3d.utils.copyExampleSim3dProject(DestFldr)
sim3d.utils.copyExampleSim3dProject(DestFldr,Name=Value)

Description

sim3d.utils.copyExampleSim3dProject(DestFldr) copies the Aerospace Blockset™ Interface for Unreal Engine® Projects support package project files to the destination folder, DestFldr. By default, copyExampleSim3dProject copies the plugins to your Epic Games® installation folder.

sim3d.utils.copyExampleSim3dProject(DestFldr,Name=Value) copies support package files to the destination with additional options specified by name-value arguments. If your Epic Games installation is not saved to the default location C:\Program Files\Epic Games, specify the PluginDestination argument.

Running the sim3d.utils.copyExampleSim3dProject function configures your environment so that you can customize scenes. The support package contains these Aerospace Blockset Interface for Unreal Engine Projects components.

  • An Unreal® project, AutoVrtlEnv.uproject, and its associated files. The project includes editable versions of the prebuilt 3D scenes that you can select from the Scene description parameter of the Simulation 3D Scene Configuration block. To use this project, you must copy the file to a folder on your local machine.

  • A plugin, MathWorkInterface (with a folder name of MathWorkSimulation). This plugin establishes the connection between MATLAB® and the Unreal Editor and is required for co-simulation. It also includes some shared automotive-oriented assets. You must copy this plugin to your local installation of the editor.

  • A second plugin, MathWorksAerospaceContent. This plugin contains the aerospace components and connects them to MATLAB using the MathWorksSimulation plugin. You must also copy this plugin to your local installation of the editor.

  • A third plugin, RoadRunnerMaterials. This plugin is required for scenes created by the RoadRunner scene editing software, and for packaging the project into an executable.

Input Arguments

expand all

Destination folder name, specified as a character vector.

Running copyExampleSim3dProject copies the Unreal project, defined in AutoVrtlEnv.uproject, and its associated project files to the destination folder.

If the DestFldr argument is specified as "", the copyExampleSim3dProject function does not copy the project files.

Note

You must have write permission for the destination folder.

Example: C:\project

Data Types: char | string

Name-Value Arguments

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Support package source folder, specified as a character vector. The folder contains the downloaded support packages files.

By default, if you do not specify the source folder, copyExampleSim3dProject copies the file from the support package installation folder, matlabshared.supportpkg.getSupportPackageRoot().

Example: Source="shared\sim3dprojects\spkg\"

Data Types: char | string

Option to change the plugin destination folder, specified as a character vector.

By default, if you do not change the plugin installation folder location, copyExampleSim3dProject tries to copy the plugins to C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace\MathWorks.

Example: PluginDestination="C:\Program Files\Epic Games\UE_5.3\Engine\Plugins\Marketplace\MathWorks"

Data Types: char | string

Option to enable verbose logging, specified as a logical 0 (false) or 1 (true). Verbose logging displays intermediate iteration information on the MATLAB command line.

Example: VerboseOutput=true

Data Types: logical

Option to skip copying plugins to the Unreal Engine directory, specified as a logical false or true.

Note

Use this option if you previously copied plugins to the Unreal Engine directory.

Example: SkipPluginCopy=true

Data Types: logical

Examples

expand all

Copy the support package files to C:\project.

sim3d.utils.copyExampleSim3dProject("C:\project");

Copy the support package files to C:\project with VerboseOutput set to true.

sim3d.utils.copyExampleSim3dProject("C:\project", VerboseOutput=true)
Copying ...\spkg\project\AutoVrtlEnv to C:\project\AutoVrtlEnv
Creating C:\project\AutoVrtlEnv\Plugins
Copying ...\spkg\plugins\mw_aerospace\MathWorksAerospace to C:\project\AutoVrtlEnv\Plugins\MathWorksAerospace
Copying ...\spkg\plugins\mw_automotive\MathWorksAutomotiveContent to C:\project\AutoVrtlEnv\Plugins\MathWorksAutomotiveContent
Copying ...\spkg\plugins\mw_simulation\MathWorksSimulation to C:\project\AutoVrtlEnv\Plugins\MathWorksSimulation
Copying ...\spkg\plugins\mw_uav\MathWorksUAVContent to C:\project\AutoVrtlEnv\Plugins\MathWorksUAVContent
Copying ...\spkg\plugins\rr_materials\RoadRunnerMaterials to C:\project\AutoVrtlEnv\Plugins\RoadRunnerMaterials
Ensuring C:\project\AutoVrtlEnv\AutoVrtlEnv.uproject is writable
Enabling plugin MathWorksSimulation in C:\project\AutoVrtlEnv\AutoVrtlEnv.uproject
Enabling plugin MathWorksUAVContent in C:\project\AutoVrtlEnv\AutoVrtlEnv.uproject
Enabling plugin MathWorksAutomotiveContent in C:\project\AutoVrtlEnv\AutoVrtlEnv.uproject
Enabling plugin RoadRunnerMaterials in C:\project\AutoVrtlEnv\AutoVrtlEnv.uproject

Version History

Introduced in R2022b