Hey, so we’re trying to have a dynamic details panel that will show different variables based on the outputs of a file being read. The file is read during editor runtime, and on average takes about 4 seconds to return usable data, which we would then use to generate a custom details panel.
The problem we’re having is that the file is read on compile, so the data may not be ready when the details panel is generated. Since this is the case, we need a callback in the details panel customization class so that we know when the data has been loaded. This is proving difficult however, as delegates in the file reader don’t seem to call the functions bound to them from within the DPC, and there’s no way to call a DPC function from the struct that it’s displaying.
Is there any way to do this that we’re not thinking of, or is this something that needs to be done in a different way entirely? There’s another idea we had earlier on in the process where the files would only be re read on compile if the file path had changed, but since we want multiple versions of that file to be able to be read and have different parameters, that couldn’t be done as there was no way we could come up with to both keep an object through recompile and to have them able to have separate objects if you, say, had two containers using the same file path.
Any help would be appreciated on this, thank you very much!
Hi! Can you describe classes that you are using for Details Panel Customization? I am not sure, but that may help you:
Create subclass from IPropertyTypeCustomization. With this you can create visual details for USTRUCTS and UCLASSES. This thing is executed when you open the property, that this customization is registered for. So, you can read file somewhere here
Register customization when loading module (for UCLASS use RegisterCustomClassLayout). For example, like that
Hey, so I do have the details panel customization set up correctly. I have a custom details panel rendering for a struct in the engine, so that’s not an issue.
I have an “IPropertyTypeCustomization” subclass, with a UStruct that it customizes, registered / unregistered in an editor module.
It’s specifically getting a callback from loading a file that I’m having a problem with. I’m not sure how I can get a message that something is done loading from the struct (or member variable of the struct) back to the customization class so that I can regenerate the layout.