Package Custom Scenes Into Executable - MATLAB & Simulink
Package Custom Scenes Into Executable - MATLAB & Simulink
Located in the Unreal Engine® installation area, for example, C:\Program Files\Epic
Games\UE_4.26\Engine\Plugins\Marketplace\Mathworks.
1. Open the project containing the scene in the Unreal Editor. You must open
the project from a Simulink® model
that is configured to co-simulate with the Unreal® Editor. For more details on this configuration, see Customize
Unreal Engine Scenes Using Simulink and Unreal Editor.
3. In the Unreal Editor toolbar, select Settings > Project Settings to open the Project Settings window.
b. Specify the path to the scene that you want to include in the
executable. By default, the Unreal Editor saves
maps to the
/Game/Maps folder. For example, if the
/Game/Maps folder has a scene named
myScene that you
want to include in the
executable, enter /Game/Maps/myScene.
/MathWorksSimulation/Characters
/MathWorksSimulation/VehiclesCommon
/MathWorksSimulation/Vehicles
/MathWorksSimulation/Weather
/MathWorksUAVContent
8. Rebuild the lighting in your scenes. If you do not rebuild the lighting,
the shadows from the light source in your
executable file are incorrect and
a warning about rebuilding the lighting displays during simulation. In the
Unreal
Editor toolbar, select Build >
Build Lighting Only.
11. In the top-left menu of the editor, select File > Package Project >
Windows > Windows
(64-bit). Select a local
folder in which to save the
executable, such as to the root of the project file (for example,
C:/Local/myProject).
Note
Packaging a project into an executable can take several minutes. The
more scenes that you include in
the executable, the longer the packaging
takes.
Once packaging is complete, the folder where you saved the package
contains a WindowsNoEditor folder that
includes the
executable file. This file has the same name as the project file.
Note
If you repackage a project into the same folder, the new executable
folder overwrites the old one.
C:\Local\myProject\WindowsNoEditor\myProject.exe
/Game/Maps/myScene
4. Run the simulation. The model simulates in the custom scene that you
created.
If you are simulating a scene from a project that is not based on the
AutoVrtlEnv project, then the scene simulates
in full screen
mode. To use the same window size as the default scenes, copy the
DefaultGameUserSettings.ini
file from the support package
installation folder to your custom project folder. For example, copy
DefaultGameUserSettings.ini from:
C:\ProgramData\MATLAB\SupportPackages\<MATLABrelease>\toolbox\shared\sim3dprojects\spkg\Aut
to:
C:\<yourproject>.project\Config
Then, package scenes from the project into an executable again and retry the
simulation.