Announcement

Collapse
No announcement yet.

UPROPERTY's Reset on Compile

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    UPROPERTY's Reset on Compile

    Hey, I have a subclass of USceneComponent with a few UPROPERTY's whose defaults are meant to be set in the properties panel of a blueprint. Every time I make a change to the code of the component -- including when there are no changes in the header -- the values set in blueprint reset to the default values.

    Here is a minimal example of a component that has the issue for me:
    Code:
        
    UCLASS( ClassGroup=(Test), meta=(BlueprintSpawnableComponent) )    
    class GAME_API UTestComponent : public USceneComponent {            
    
    GENERATED_UCLASS_BODY()          
    
    public:              
    
        UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = Test)              
        TArray<float> TestArray;  
    
    }

    The problem is persisting both when I close the editor and compile, when I use hot reload compiling through my IDE and when using hot load when compiling from the editor. I'm using 4.24.3

    #2
    Hot Reload has been broken since forever, it's not worth trying to use it. Almost everyone will tell you to enable and use Live Coding instead.

    You can't make header or constructor changes without restarting the editor completely.

    Comment


      #3
      Hey I'm new to unreal and all this I would like to know how coding really works?

      Comment


        #4
        Originally posted by TheJamsh View Post
        Hot Reload has been broken since forever, it's not worth trying to use it. Almost everyone will tell you to enable and use Live Coding instead.

        You can't make header or constructor changes without restarting the editor completely.
        Like I said in the OP, the problem is still happening even if I'm not using hot reloading. Also the problem is happening even just editing method implementations, not changing anything in the header or constructor.

        Comment

        Working...
        X