Hi,
this is a general (beginners) question, which I ilustrate with my current example: I created a game object which is mainly a camera and it makes use of a render texture and a material. The render texture and the material are both stored in the Assets folder of my project and they are referenced by the camera game object in the Unity editor.
Now I want to duplicate my camera game object several times and I want to use a separate (new) render texture and material for each of the cameras. However, when I just duplicate the game object, the same render texture and material is always referenced, so I need to create new ones in the Asset folder and change the references in the editor.
What is the best way to avoid this?
My idea was to create components in my game object: material and render texture (like e.g. a rigid body) but this is not possible. What else can I do? Is creating the render texture and material in code of each game object the best solution? Only downside is that I find it easier to change properties in the editor instead of the code…
Some best practises would be highly appreciated
Best regards
Marko