Environments
Since version 1.15, Skyreal VR uses a level-layering-based environment system that allows you to easily integrate custom environments with configurable parameters.
Creating a New Environment
-
Create a new extension plugin with a
RegistrableAssetsdirectory. -
Create a data asset in
RegistrableAssetsthat inherits from Skr3DEnvironmentPreset.
[IMAGE: Environment extension data asset — original at /pictures/v1.16/Env_ExtensionDA.png]
-
Fill in the Preset Name and Thumbnail fields. Make sure Auto Register Preset is checked.
[IMAGE: Fill environment data asset — original at /pictures/v1.16/Env_ExtensionDAFillProperties.png]
-
Create a data asset (NOT in
RegistrableAssets) that inherits from Skr3DEnvironmentLayer. Reference it in the Layers array of your preset data asset. -
Fill the Name and Description fields of the layer data asset.
-
Create a Level in your plugin and add it to the Level field of the layer data asset.
-
Build your custom environment level.
Note: Skyreal VR default maps already include lights and skybox. If you need specific lighting, use blueprint code in the level blueprint to override them.
[IFRAME: Environment level blueprint sample — original at https://blueprintue.com/render/x9z9-p-d/]
Adding Behavior Parameters
Environments support a parameter system that lets users configure the environment through an automatically-generated UI in the right panel.
-
Create a data asset (NOT in
RegistrableAssets) that inherits from Skr3DEnvironmentParamDesc... (followed by your parameter type). -
Fill in all information.
-
Create a data asset inheriting from Skr3DEnvironmentParamValue... (matching the parameter type).
-
Set the Associated Param to the description you created.
-
Set the default value.
-
In the Layer data asset, reference the Value data asset in the Override Params array.
The parameter is automatically displayed in the UI. To override the parameter at the preset level, create another value data asset referencing the same description.
To receive an event when a parameter value changes:
[IFRAME: Environment parameter change event — original at https://blueprintue.com/render/njihwv07/]