Children of a BP only contains parent variables in Packaged build or Standalone

I have a parent blueprint “Item” and the children of that BP work correctly in editor. but for whatever reason they no longer work in packaged. all their variables are not overriden anymore, they all have the same variables as a parent.

ex. Item has variable A = 123, Rock(child of Item) has variable A = 000
in editor Rock - variable A has 000
in packaged build Rock - variable A = 123

i tried stuff like “full rebuild” “dont use pak, iostore”

I do not think its a package problem exactly. it might be a dependecy/reference/linking issue whenever the game packages or even on startup of the game

Instead of using default values (set in editor), can you try set those 000 and 123 in Construction scripts and test?

There is also that call to parent construction in child actor.

I was kinda trying to avoid that (200 child blueprints for that parent) but i will try soon, it should work. its mostly a problem with object initialization. instead of using its own default values its initializing with the parents values.

on the side note. i tried upgrading right now from 5.3 to 5.5 and the default values for all child blueprints were reset to parents default …so the issue kinda gets worse upgrading maybe?

Maybe upgrading process messes it up.

Here is idea for different initialization of those actors:

  • make data asset (they can be done in C++ or blueprints only)
  • create separate data assets one per type of child object
  • create gameplay tags, that describe each type of starting variables/values (gameplay tags are just better enums) and they have tree like structure.
  • create single blueprint function (or json file or data table) that translates gameplay tag to proper path and filename of data assets (you can keep them sorted in subdirectories etc)
  • in parent blueprint class make event/function that reads data asset and fills variables, when its giver gameplay tag. Then call that event from child class giving gameplay tag as argument

I think its a bit of coding but setting up all variables should be easier. And bonus: you can globally change values for all child sharing same gameplay tag.

ps.
some warning: friend told me that there is rare error when in packaged and cooked game sometimes data asset is not loaded, however they could not replicate it and trace what causes that, it is just rare and in packaged game.