RealDocs

UActorComponent::RemoveUserDataOfClass

function Engine Since 4.14
#include "Components/ActorComponent.h"
Access: public Specifiers: virtualoverride

Description

Removes the `UAssetUserData` entry of the specified class from this component. Does nothing if no entry of that class exists.

Caveats & Gotchas

  • Removal is by exact class, not by inheritance — passing a base class will not remove subclass instances. Use the exact subclass type you originally added.
  • The removed object is not explicitly destroyed; it will be garbage collected once all other references to it are dropped.

Signature

ENGINE_API virtual void RemoveUserDataOfClass(TSubclassOf<UAssetUserData> InUserDataClass) override;

Parameters

Name Type Description Default
InUserDataClass TSubclassOf<UAssetUserData> The class of user data to remove.

Return Type

void

Example

Remove plugin metadata from a component C++
// Remove previously added plugin data
MyComponent->RemoveUserDataOfClass(UMyPluginData::StaticClass());

Version History

Introduced in: 4.14

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.