createAsset
Description
creates an asset of the specified asset type at the specified path relative to the
asset
= createAsset(project
,assetPath
,assetType
)Asset
folder of the specified project. For example, customCar
= createAsset(prj,"Vehicles/CustomCar.rrvehicle","VehicleAsset")
creates the
object customCar
for the asset CustomCar.rrvehicle
in
the project prj
and assigns it the asset type
"VehicleAsset"
. You can use asset objects to modify asset attributes,
represent actors in the scenario, and modify actor behavior during simulation.
When you create a VehicleAsset
or CharacterAsset
with
createAsset
, RoadRunner creates a placeholder 3D model that you can use in your scenario. To learn
more about placeholder models for vehicles and characters, see Vehicle
Assets (RoadRunner Scenario) and Character Assets (RoadRunner Scenario), respectively.
Examples
Input Arguments
Output Arguments
Limitations
The
createAssets
function does not support creating assets that use an externally referenced file, such as an.fbx
file for a 3D model. If you have a custom file you want to use in your RoadRunner scenario, such as 3D model for a vehicle, add it to a folder in your RoadRunner project. For more information on creating custom assets for RoadRunner, see Create, Import, and Modify Assets (RoadRunner), Import Custom Vehicle Meshes (RoadRunner Scenario), and Import Custom Character Meshes (RoadRunner Scenario).
Version History
Introduced in R2025a
See Also
Scenario
| Project
| getAsset
| addActor
| Vehicle
Topics
- Get Started with MATLAB Functions for Scenario Authoring
- Create, Import, and Modify Assets (RoadRunner)
- Import Custom Vehicle Meshes (RoadRunner Scenario)
- Import Custom Character Meshes (RoadRunner Scenario)