Hello Fellow Devs
I want to show rotating objects in a ui list, to preview said objects.
The first difficulty is, that those objects can be created/changed at runtime. So I need to dynamically import them and cannot use AssetDatabase in editortime.
I found a solution for the import already in writing my own object (.obj) parser/importer.
To the question(s)
I load the objects into a separate layer and create an extra camera for each object. Then I want to dynamically create a RenderTexture from the cameras and add this render texture to RawImage elements in my ui list.
The problem is, how can I create a RenderTexture at runtime, that is connectable to the extra layer camera and the ui list elements?
(I want to avoid placing the objects directly into the ui and work with a scale fitter. It would be my last fallback option)
(I also want to avoid precreating a pool of rendertextures in editor time)
Question1:
Is this RenderTexture workflow good here or did I miss a better solution?
Question2:
How can I create the RenderTexture at runtime and connect it to the camera/ui element? (A bonus would be, how to create any AssetType at runtime, if they would share script parts)
Thx in advance