Create a floating window over the scene

Hi,
I would like to create a floating window that they player can move around with object that the player can move. The move in the floating window should be replicated on the scene.

Is this possible?

I have been googling but not found anything. Maybe i do a bad search.

My best guess is to use a separate canvas, which i am researching.

I don’t quite understand what you’re trying to do, but I’m confident that it’s possible.

If you want the window to appear in world space, then yes, just attach a separate canvas to the GameObject.

If you want it to appear in screen space, you can make it an element in your main UI canvas. You can still make it follow an object on screen through appropriate ray-casting.

If you want the user to be able to drag this object around, then just attach an EventTrigger to the window frame or title or whatever, and catch the Drag events.

As JoeStrout said it’s tough to tell exactly what you’re asking for. My interpretation is that you want a floating menu kind of like the part menu in Kerbal Space Program. Does that look about right?

Raycasting? Seems like in this case you’d want Camera.WorldToScreenSpace, no?

Oops, you’re quite right, that’s most likely all you’d need. I was thinking of it backwards!

Thanks for your comments.

Here is a picture of what i want to accomplish.

The objects on the scene is replicated into the “Floating Window” (FW) panel.

What is moved on the scene is replicated on the FW and what is moved on the FW is replicated on the Scene. The FW should be movable and sizable.

I did found a tutorial as starter: Recorded Video Sessions on UI - Unity Learn

I haven’t figured out how to move the objects in the FW or if i should have separate Canvases or panels in one Canvas.

I would just do all that in the main UI canvas. Have a script on the canvas Image objects that catch the drag events, and move both itself (the Image) and the corresponding scene object. And similarly, have a script on each scene object that moves itself and the corresponding Image item.

Tx @JoeStrout that is what i was thinking as well.