Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

[SOLVED] UI appear visually, but is physically somewhere else

Discussion in 'Getting Started' started by egartnuc, Jun 10, 2018.

  1. egartnuc


    Jun 2, 2018

    To begin with, apologees if this is in the wrong section. I'm kind of new around here.

    So I'm working on an FPS game and I built a UI for it, specifically an Inventory which I toggle on/off (you know how it works).

    The problem is: I hit play button (all is good), I open inventory and I see it (all is good), but when I try to interract with it I can't. However, I noticed in my inventory script (which shows what slot my mouse is hovering over) that sometimes slots would pop in them. So I started looking around more, and I found that the entire Inventory is actually in another location, up in the air.

    So the UI is visually before my eyes. But "physically" it's somewhere else.

    My experience with Unity is limited, which I'm sure you understand already. But any help or suggestions are appreciated.


    - I'm using the Standard Asset FPSController.
    - I built the Inventory in a separate project and then imported it.
    - All scripts in the background seem to be running (as evidence by the popping slots etc), I just think there is something wrong with camera or character controller settings.

    Last edited: Jun 10, 2018
  2. methos5k


    Aug 3, 2015
    Just to confirm, do you mean "up in the air" in the scene view? That is normal for a canvas that isn't in world view. It looks "odd" in the scene view, but works as expected, if that makes sense.

    Let us know if it's that or something else. If you see the inventory properly that sounds good, but having trouble interacting could be some other issue maybe.
  3. egartnuc


    Jun 2, 2018
    Hi, @methos5k - thank you for your reply.

    I just figured it out (it's always a good idea to attack a problem while newly awake and have a fresh mind). There was another camera in the scene which somehow messed it up. It's settings, I suppose, with what depth and what not made it so that I could touch some things through it. Very weird, but I deleted it and the problem went away. Along with that I alos made sure that the inventory cam had depth only clear flag and culling mask UI (although I did scroll through those settings before as well).

    I spent 4 hours on this problem yesterday without success, this shows the power of sleep and a little inspiration from fellow likeminded. :)

    TheBooBear likes this.