Unity allows us to see the 3D elements of a prefab in its inspector window. But this doesn’t seem possible to do for UI/Canvas related elements?
We are trying to create a UI prefab picker for our project, and not being able to preview the UI prefab is a major drawback and time-sync.
The two solutions I can think of seem pretty flawed. One involves adding a reference to a screenshot of the UI prefab and displaying that, but this isn’t optimal as the image would need to be updated for each change.
The other would be to make something similar to the inbuilt 3D preview, by dynamically adding the prefab to a scene with a canvas and camera and rendering the result to a render texture, but I’m not even sure that’s possible in Unity’s editor API.