Search Unity

Question Interaction Layer 31 is not set to 'Teleport'

Discussion in 'Getting Started' started by tleylan, Nov 2, 2022.

  1. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    I have been getting this as a warning lately. I'm sure I updated the XR Interaction Toolkit has 31 been suggested as the layer to use for Teleport?

    There are doc pages that show it used to be set to User Layer 8.
     
  2. PoKy007

    PoKy007

    Joined:
    Jan 8, 2014
    Posts:
    13
  3. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    Now we're just waiting to find out if this is a recommendation :)
     
  4. badcowboy888

    badcowboy888

    Joined:
    Jul 7, 2021
    Posts:
    3
    I have the same error too, any updates?
     
  5. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    It is only a warning but that means that something is issuing it. I haven't changed mine yet but I would if I could find out what's up.
     
  6. War_Tourist

    War_Tourist

    Joined:
    Dec 3, 2014
    Posts:
    9
    Just started getting this as well!
     
  7. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    It would be really nice if someone from Unity could answer. I'm holding out just in case it is a bogus message of some sort. Obviously not a requirement to be 31.
     
  8. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    If the requirement was to be 31, I'd have given up nearly 16 years ago :D
     
  9. dunderline

    dunderline

    Joined:
    Jan 29, 2023
    Posts:
    1
    I'm new to unity, though this is what I did to fix it. No clue if it is right:

    Edit -> Project Settings -> XR Interactive Toolkit
    Click Interactive Layers
    in Layer 31, enter "Teleport"

    The error goes away for me.
     
  10. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    Yep, you had it to a T! (A capital T! That's all it needed! :D )
     
    Oblivioner likes this.
  11. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    Thanks but we new how to add layers. The question is rather 'why 31"? When did the check for that layer begin and why?
     
  12. RichAllen2023

    RichAllen2023

    Joined:
    Jul 19, 2016
    Posts:
    1,026
    Because line 31 was where the typo was :D
     
  13. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,443
    Layer 31 is an undocumented layer that Unity uses itself to support clicking and selecting items in the Editor view, even if the object has no colliders, etc. (Undocumented, but pretty obvious it exists, since it's just a 32bit integer bit flag field.) It's not listed on the Layers list for that reason. Of course, you can try using it in your game during runtime, but you will have to deal with the fact that there are limitations and conflicts with the Editor view if you try to do so.

    Edit: my memory of the purpose was slightly off, it's to support the Editor's "Preview" features like animations. Items you have in Layer 31 will show up in Previews. There may be other uses. I don't know why/whether there are any specific warnings about that layer. It has nothing to do with "teleport" as much as your tutorial/asset decided to use that layer.
     
    Last edited: Feb 4, 2023
  14. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    Can you share with us where you got some of this information? Clearly one can assign layers and many of us have assigned a Teleport layer. I don't use 31 and I doubt I'm alone. Unity never used to issue a warning and now several people are seeing.it. Your last sentence makes it sound like we shouldn't assign that layer is that what you are suggesting?
     
  15. halley

    halley

    Joined:
    Aug 26, 2013
    Posts:
    2,443
    tleylan likes this.
  16. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
  17. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    184
    Came here to confirm this as well. I am seeing the exact same warning. Should we ignore this or try to change the typo mentioned by @dunderline ?
     
  18. tleylan

    tleylan

    Joined:
    Jun 17, 2020
    Posts:
    618
    Well I would sit tight. I assume it will eventually be resolved. As for naming the layer I wouldn't for now unless naming it something like _Teleport would work. Many people have a Teleport layer they use and having two with the same name is a recipe for trouble.
     
  19. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    184
    Totally agree, thank you @tleylan .