Search Unity

Question Camera view in UI Canvas

Discussion in 'UGUI & TextMesh Pro' started by Dried09, Jun 5, 2023.

  1. Dried09


    Jan 2, 2017
    Hi All,

    I have stuck with an idea to have kind a viewport inside ui canvas, that renders a piece of world.
    What I need to have a screen in canvas that appears if user open it, and do some stuff with gameobjects in usual way, i.e. selecting them and so on.
    First thing that came to my mind was render texture, but it is not an option since I need to interact with game objects while I have only image.
    The next thing that I thought about is to draw simplified representation of needed piece of world in UI. But for this I need to do a lot of work like recalculating positions of objects in a world and connect all clicks between them etc. which is looks like overkill.

    So, the question: is it possible to embed actual camera view in UI canvas to make it possible to interact with world via canvas with reasonable effort?

    I use Unity 2022.2.20, 3d project template with URP

    Thanks in advance