Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Blueprints derived from c++ classes not updating properly

Branch: Binary

Build Version: 4.10.0-2758231

Description: It seems that in some cases blueprints are not getting updated after hot-reloads (or their variables are not initialized to accommodate new variables or changes in existing ones) This is mostly noticeable when adding methods to OnComponentBeginOverlap via AddDynamic(...) (and I believe this is true for other events too), and I've got some weird behavior with default subobjects a few times too. I haven't been able to come up with any reliable way of reproduce described behavior, even though I've come across this issue multiple times during past few days.

In the case with subobjects becoming null, output log had something about serialized properties being NULLed during hot-reload. However, even while log stated that object was re-instantiated successfully, ubobject was null without any way of recovering. Bug seems to be similar to this bug report: link

As a workaround, issue can be fixed/avoided by simply renaming the variable each time the class is changed, but it gets annoying quite quickly.

Bug with the AddDynamic(...) is described here: link. However, the strange part is how this seems to happen seemingly at random, thus making debugging these issues a horrifying mess, especially if large quantities of newly written code is involved.


Further trying to investigate this issue, I still haven't been able to find a reliable way of reproducing the behavior, at least not in a fresh project. In existing project however, every time a new UPROPERTY is added (or removed) to certain classes, existing references to those classes are getting NULLed during hot-reload, and new instances are not getting instantiated. The only way to generate a new instance is either re-create the blueprint or to rename the property containing the reference to the NULLed component.

According to logs, it seems that serialization is treating the class as a new class after adding/removing the UPROPERTY.

 LogClass: Could not find existing class ProjectileSpawnerComponent in package /Script/coOP for HotReload, assuming new class

After which hot-reload proceeds as expected, until:

 LogHotReload: Re-instancing coOPCharacter after hot-reload.
 LogProperty:Warning: Serialized Class /Script/coOP.ProjectileSpawnerComponent for a property of Class /Engine/Transient.HOTRELOADED_ProjectileSpawnerComponent_2. Reference will be NULLed.
     Property = ObjectProperty /Script/coOP.coOPCharacter:ProjectileSpawnerComponent
     Item = ProjectileSpawnerComponent /Game/coOP/Blueprints/Characters/BP_coOPCharacter.Default__SKEL_BP_coOPCharacter_C:ProjectileSpawner
 LogProperty:Warning: Serialized Class /Script/coOP.ProjectileSpawnerComponent for a property of Class /Engine/Transient.HOTRELOADED_ProjectileSpawnerComponent_2. Reference will be NULLed.
     Property = ObjectProperty /Script/coOP.coOPCharacter:ProjectileSpawnerComponent
     Item = ProjectileSpawnerComponent /Game/coOP/Blueprints/Characters/BP_coOPCharacter.Default__BP_coOPCharacter_C:ProjectileSpawner
 LogHotReload: Re-instancing ProjectileSpawnerComponent after hot-reload.

As additional notes, UProjectileSpawnerComponent is a UActorComponent and is added via CreateDefaultSubobject<>(...) to the AcoOPCharacter. Nothing special, that is.

What comes to the other part of the issue (Events and AddDynamic(...)), it seems to have vanished, as I haven't been been able to reproduce it anymore.

Product Version: UE 4.10
more ▼

asked Nov 26 '15 at 05:25 PM in Bug Reports

avatar image

59 3 3 8

avatar image Doug E ♦♦ STAFF Nov 27 '15 at 06:47 PM

Hey ASDSausage-

The posts that you linked are from past engine versions and have been resolved or require additional information to investigate. If you have specific instances of these issues occurring please provide any information that would allow us to test/reproduce on our end.


Doug Wilson

avatar image FurrieBunnie Oct 16 '18 at 05:06 AM

This issue persists in 4.18.3.

Steps to reproduce:

Create a UGameInstance c++ subclass


Create a BP based upon the c++ class

Assign a value to the property

Modify the UPROPERTY (change the name or type, etc)

BP will not reflect changes, including new BP created from this c++ class

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I was having this issue in 4.13 after adding OnComponentBeginOverlap.AddDynamic(...) to a component. I was able to solve it by

  1. OnComponentBeginOverlap.AddDynamic(...)

  2. Saving and closing UE4 editor

  3. Navigating to my project root in windows explorer

  4. Deleting both the Binaries and Intermediates folders

  5. Right clicking on the project file and regenerating Visual Studio project files like so

alt text

Then opening the project file, which will force a rebuild. After that it all works, I just can't touch the AddDynamic function or it will break again.

more ▼

answered Oct 13 '16 at 10:52 AM

avatar image

327 10 20 37

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question