Prefab Source Component
About
Use this component in any actor class if you want it to act like a prefab.
You can place multiple PSC on one actor but for simplicity i wouldn't recommend this route (unless you are working on composition with various PSCs).
The main role of the PSC is to hold the runtime data the PRC will pass: Prefab Properties Object.
Classes
> Base Prefab Source Component (UPSBasePrefabSourceComponent
)
This class shouldn't be directly used by you, if you want to extend the PSC you should subclass the singleplayer or multiplayer class instead.
Delegates
While the available delegates are listed here, it is always recommended to read about them in the source code instead.
OnPrefabSourceComponentInitialized
Called when this component is initialized, properties are sure to be set at this point (if any).
There is a race condition where this delegate gets fired BEFORE you bound to it. It is recommended to check for IsInitialized before binding ot it.
You can also check for the various Async Actions such as GetOrWaitForPrefabPropertiesObject
.
This is called on server and clients.
OnPropertiesSet
Called after initialization and when the properties are set.
There is a race condition where this delegate gets fired BEFORE you bound to it. It is recommended to check for IsPrefabPropertiesSet before binding ot it.
You can also check for the various Async Actions such as GetOrWaitForPrefabPropertiesObject
.
This is called on server and clients.
OnPrefabPropertiesObjectAdded
Called when this component received a Prefab Properties Object.
If in Blueprint see the GetOrWaitForPrefabPropertiesObjectOfClass
Async Action for a easier use.
This is called on server and clients.
Customize behavior
Handling Prefab PropertiesBlueprint Async ActionsLast updated