My situation is the following. I have a c++ Actor in which I have a material instance variable TObjectPtr. I want it to be visible in the actor’s details panel when it’s selected in the scene.
Everything’s fine up to now, but my variable is empty by default and I’d like to be able to set a default material when I place my actor in the scene (material that I’ve also been able to retrieve with the ConstructorHelpers).
How can I set my Material Instance in the variable? I’m available if it’s not very clear
Ah, so the issue was actually with using the value after grabbing it using the constructor helper. For others in the future, note that .object should be actually be capitalized.
Ie. MyEditableVariable = MyDefaultAsset.Object;
As for TObjectPtr, I didn’t know until now, but they are recommending using them in place of raw pointers from here on in. I had no idea, and I use raw pointers everywhere, so I guess I have quite a bit of migrating to do.