The DS Data Request behaviour allows exposure of data fields from Datasculpt-exposed data sources within a blueprint. This allows you to quickly create custom blueprints powered by real external data. These can be reused in other blueprints. The Demo map in the Datasculpt Content > Examples folder contains an example of this: The UsingDataRequest Example – a staticmesh blueprint – is using the BP_DS_MoveYWithData blueprint component. The data source and value are set in the details panel of the UsingDatarequest Example BP, but the way that data is used is laid out inside the BP_DS_MoveYWithData blueprint component, and can be reused in other blueprints independent of any specific data source/value.
Step-By-Step: Setting up a Custom Blueprint Behaviour Component
- Open the BP_DS_MoveYWithData blueprint this is an example of a Custom BC Blueprint Component. You may wish to duplicate this BP and modify the duplicate, or use it as a guide to build your own.
- Use the Event Graph and Affected Component Graph as a template for your own blueprints components.
- You can use the output value in whatever way you would normally use variables in blueprints. The actual data source and value used will be dictated in the details panel of the blueprint that inherits it.
- Compile and Save.
Step-by-Step: Using the Data Request BP
- Add an actor such as a cube or sphere, into the scene.
- Click the Blueprint/Add Script button in the detail panel.
- In the dialogue box which appears, select the desired class e.g. Static Mesh Actor and click Select.
- This will open the new blueprint in the Blueprint editor, click the Add component button and add the Data Request blueprint you previously created.
- In the event graph, drag a pin off the Event BeginPlay node and add a Set Affected Component node.
- Drag your Data request blueprint from the Variables window on the left, and drop it on the Target pin of the Set Affected Component node.
- Drag off the Affected Component node and select e.g. the Static Mesh Component
- Compile and Save.
- Back in the main editor view, make sure the Actor BP is selected and in the details panel Data Sculpt section > Data Request settings, click the + to add a data source.
- Select the data source from the Data Source Name dropdown.
- Click the + next to the Data Names section to add a data value.
- The blueprint should now work using the Custom BP component as its behaviour and the Data Request Settings as the data source.