Skip to content

Utility functions for easier access to properties accessible from Blueprints but not accessible from C++.

License

Notifications You must be signed in to change notification settings

sfider/UE4PropertyAccessHelpers

Repository files navigation

UE4PropertyAccessHelpers

Utility functions for easier access to properties accessible from Blueprints but not accessible from C++.

Usage

  • Place this repository inside your's project sources.
  • Add names of properties you want to use in PropertyNames.inc, like this:
PNAME_ENTRY(LightFalloffExponent);
PNAME_ENTRY(bUseInverseSquaredFalloff);
  • Include PropertyNames.h in source files of your choice.
  • (Optional) Add usage clause on top of your source file, like this:
using namespace PropertyAccessHelpers;
  • Access properties, like this:
USpotLightComponent* SpotLightComponent = FindComponentByClass<USpotLightComponent>();
const float AttenuationRadius = GetPropertyValue<float, PNAME(AttenuationRadius)>(SpotLightComponent);
SetPropertyValue<bool, PNAME(CastShadows)>(SpotLightComponent, false);

About

Utility functions for easier access to properties accessible from Blueprints but not accessible from C++.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published