Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What is the Point of Canvas - World Space?

Discussion in 'UGUI & TextMesh Pro' started by Kadjai, Jan 17, 2021.

  1. Kadjai

    Kadjai

    Joined:
    Aug 15, 2017
    Posts:
    2
    Why not just put the a GameObject in the scene that does the same thing? TMPro text boxes seem good as gameobjects, buttons can be replaced by adding IPointerClickHandler to a script for clicking on anything.

    So I'm left wondering if I should ever use Canvas - World space? Does it matter? Is either way faster?

    I understand the usefulness of keeping something in the same location on the screen with Canvas - Screen Space, but I can't figure out if I should use canvases for anything else.
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    The point of using "Canvas - Worldspace" is that objects placed onto canvas support 2d layout and automatic resizing of UI controls.

    GameObjects in the scene do not have this functionality.

    So, if you're making an interactive terminal in the game (those were around Since Doom 3) with bunch of text labels and menu in it, it would be easier to do that using Canvas instead of coding it all yourself.

    Basically, Canvas pretty much allows you to implement Excel or Word within your game. Canvas within world space allows to place it into the world and keep it interactive.

    While you CAN implement it all yourself from scratch, that would be more work.