Documentation Home
Breadcrumbs

Auto registerable data asset

Auto Registerable Data Asset

The auto-registering system in Skyreal VR allows you to create your own custom extension points that are automatically discovered and loaded.

How to Create a New Extension Point

  1. Create a new extension plugin (e.g., SkrBaseExtensionPlugin).

  2. Create a new blueprint that inherits from PrimaryDataAsset (e.g., BP_ExtensionBaseAsset).

[IMAGE: Create blueprint — original at /pictures/v1.16/Extensions_CreateBP.png]

[IMAGE: Inherit from PrimaryDataAsset — original at /pictures/v1.16/Extensions_CreatePrimaryDataAsset.png]

  1. Implement the interface SkrAutoRegisteringAsset.

[IMAGE: Implement interface — original at /pictures/v1.16/Extensions_ImplementInterface0.png]

  1. Fill the method GetShouldAutoRegisterAsset with a custom boolean variable.

[IMAGE: Implement GetShouldAutoRegisterAsset — original at /pictures/v1.16/Extensions_ImplementInterface1.png]

  1. Add any variables to the blueprint that should be accessible in the extensions you want to create.

[IMAGE: Variable definition examples — original at /pictures/v1.16/Extensions_VariableSamples.png]

How to Retrieve All Extension Data Assets

To retrieve all assets that extend your PrimaryDataAsset:

  1. Get the SkrRegistrySubSystem.

  2. (Optional) Bind to FSkrRegisteredDataAssetsAddedEvent and FSkrRegisteredDataAssetsRemovedEvent for dynamic reloading.

  3. Call GetRegisteredDataAsset and specify the base class type.

[IMAGE: Retrieve registered data assets in blueprints — original at /pictures/v1.16/Extensions_GetAssets.png]

How to Create an Extension

  1. Create a new extension plugin (e.g., SkrExtensionExtensionPlugin) with a RegistrableAssets directory.

  2. Create a new DataAsset that inherits from your PrimaryDataAsset blueprint.

[IMAGE: Create extension data asset — original at /pictures/v1.16/Extensions_CreateDataAssetExtension.png]

  1. Fill the data asset with your properties.

[IMAGE: Fill data asset properties — original at /pictures/v1.16/Extensions_CompleteDataAssetExtension.png]

Important: During a Skyreal VR session, import the base extension plugin before other extension plugins that depend on it.