Edit Material Parameter Collection in editor through AActor

Hello all, I have an Actor class that manages various material parameters. It works fine in play mode however I can’t have any of my edits show up in the editor since in the constructor I can’t call GetWorld() to get my UMarterialParameterCollectionInstance. In BeginPlay I call Inst = GetWorld()->GetParameterCollectionInstance(collection) but doing this procedure in the constructor yields a null pointer exception. Does anyone have any suggestions for either getting the world in editor or another way to edit the material parameter collection?

Thank you!

Found the solution. For anyone who is interested you need to update the instance value in the OnConstruction method and also in BeginPlay. This allows for the correct world to be used.