DataAsset classes overridden in blueprint can't use exposed variables to the dataasset objects. They will always be default value

DataAsset classes overridden in blueprint can’t use exposed variables to the dataasset objects. They will always be default value.

  1. Basically create a UDataAsset custom
    child class in C++ with a
    BlueprintNativeEvent function,

  2. create a BP class from that custom
    C++ class and expose some variables
    in it (hit the eye so it opens) and
    override that BP class to use those
    variables (print them to the screen
    or something).

  3. create a data
    asset from the BP class and modify
    those exposed variables and add that
    dataasset to an actor that calls
    that native event.

You will notice that the native event will use the defaults not the values set in the data asset as it should.

Solution was simply not to use data assets and instead just make my own uobject and do my own serialization. With blackjack and json!

1 Like