Compile in Editor Doesn't Run PostInitializeComponents

I’ve got it set up to where when I load my Actor in the Editor it runs PostInitializeComponents and creates a couple components for me in C++. I am also using PostEditChangeProperty which updates the editor when I change certain properties. It might help to know that in C++ I am using a USTRUCT that holds pointers to the components that I construct in PostEdit. When I compile in editor the Array of structs stays the same but the pointers become null. The pointers all have UPROPERTY.

Everything works fine until I hit Compile in the Editor on the Actors window. It reloads everything and I end up having to change a property in the editor so it updates again. Am I missing some sort of function that I should have in C++ so that when I hit compile in the editor it calls me reload function? I’ve tried PostLoad, OnConstruction…

I figured it out…I think…by enabling tick before play. It seems to be working now anyways and I have access to the UPROPERTY variables in the editor. I added the following code. Make sure to add the const in the header and the cpp because I missed that and struggled with it for about half an hour.

In the Actors .h

 virtual bool ShouldTickIfViewportsOnly() const override;

In the Actors CPP

bool YourActorClass::ShouldTickIfViewportsOnly() const { return true; }