Skip to main content

Dynamic References

NexusDynamicRefs
Module Name:
NexusDynamicRefs / NDynamicRef
Initial Release:
0.1.0
Description:
Method for referring to UObjects prior to runtime, and by developer readable names.
BP Category:
NEXUS > DynamicRef
Area Owner:
@reapazor

This plugin functions in a service locator pattern for AActors with some benefits:

  • Decoupling: Removes hard dependencies between AActors.
  • Flexibility: Easy to add/remove AActors from reference groups at runtime.
  • Scalability: Can handle many AActors of the same type without performance issues.
  • Blueprint Integration: Fully accessible from Blueprint for designers.

Utilzing this pattern allows for developers to reference collections of typed objects safely without any direct knowledge of them at author-time.

Add Component​

Add a UNDynamicRefComponnet to an AActor (most likely your doing this on a Blueprint), and assign it's References from the details inspector.

NDynamicRefComponent

Getting Actor References​

Accessing the UNDynamicRefSubsystem, referenced AActors can be queried.

Samples​

NDynamicRef

The DEMO_NDynamicRefs sample map is available once you have enabled the NEXUS Samples: Dynamic References plugin. This is found in the NEXUS Samples category in the Edit > Plugins window.

The map has a singular example showcasing the UNDynamicRefComponent and its various uses. The level blueprint demonstrates how to access an AActor by it's ENDynamicRef.