Search Unity

UWP Xbox One Issue(s)

Discussion in 'Windows' started by gavinb80, Aug 21, 2016.

  1. gavinb80

    gavinb80

    Joined:
    Nov 4, 2012
    Posts:
    98
    Hi all,

    Sorry if these have been covered, but I had no luck searching.

    I've managed to build a sample project and deploy it to the Xbox one (just a simple scene with a few textured cubes) and wondered if anyone could help with the following.

    1. The app doesn't seem to run full screen on the xbox, there is a large white border all the way around. Is there a setting or two I need to change to fix this. (changing to D3D mode seems to remedy this, not sure if that will impact performance at all)
    2. It seems to automatically bring up a debug console in the bottom left corner, is it possible to get rid of this? (edit* I've checked the Development Build option is unchecked in the settings)
    3. It seems to always show a mouse cursor on screen on the xbox, is it possible to get rid of this as I don't want that moving around as I move the joysticks of the controller. (changing to D3D mode seems to fix this)

    thanks in advance,

    Gavin
     
    Last edited: Aug 21, 2016
    MrDude likes this.
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,918
    • The app doesn't seem to run full screen on the xbox, there is a large white border all the way around. Is there a setting or two I need to change to fix this. (changing to D3D mode seems to remedy this, not sure if that will impact performance at all)
    Not sure if it will help by try setting https://msdn.microsoft.com/en-us/li....applicationview.preferredlaunchwindowingmode with
    ApplicationViewWindowingMode.Fullscreen in App.xaml.cs
    • It seems to automatically bring up a debug console in the bottom left corner, is it possible to get rid of this? (edit* I've checked the Development Build option is unchecked in the settings)
    You have to select Master configuration in Visual Studio solution, it seems you have Debug or Release selected.Development build option doesn't do anything in this case.

    • It seems to always show a mouse cursor on screen on the xbox, is it possible to get rid of this as I don't want that moving around as I move the joysticks of the controller. (changing to D3D mode seems to fix this)
    This sounds pretty weird, I would imagine Xbox OS should take care of this. Maybe you can workaround this by https://docs.unity3d.com/ScriptReference/Cursor-visible.html


    Cheers
     
  3. elettrozero

    elettrozero

    Joined:
    Jun 19, 2016
    Posts:
    216
    Yes, use D3D mode. Running in XAML mode activates mouse by default as pointed out by Tomas.
     
  4. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Im making a Universal App for Windows 10, Mobile 10 and Xbox One.
    How does setting to D3D mode impact mobile and Desktop?
     
  5. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    MrEsquire likes this.
  6. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    All switching from XAML to D3D did for me was make the mouse cursor unresponsive for a while... apart from that, nothing. Still no on screen keyboard when I click on a text input field, still the ugly cursor on the screen whether I want it there or not, still the massive empty border around my scene.

    Is there no "How to use Unity for XBO" guide anywhere? I think being able to show and hide the cursor that I didn't place in the game the first place is rather important and so is being able to use the input fields, no? Isn't clicking on them supposed to automatically pop up the keyboard?

    I have seen tutorials from MS about the safe area around your visuals, how to deal with it and , basically, all this stuff I am asking about now.... They have tutorials for how to fix these "issues" when coding in VS directly. Doesn't Unity have something similar?
     
  7. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Which Unity version are you on? Is your Xbox One console have the latest updates? They've been fixing many of these issues on the OS side.

    I am not aware of the cursor issue you mentioned. Can you post some screenshots of what's going wrong? Cursor is usually drawn by the OS, but it shouldn't be there on D3D.
     
  8. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I am on Unity 5.5. Updated XBO 2 days ago. Cursor looks like the "Male" sign, just pointing to the left instead of the right.

    The pointer I can try to fix using the pointer visibility you mentioned earlier. I was just a bit surprised to see it, is all. For now it serves my purposes because I need to select the input fields. As such, I'll worry about the cursor later. For now I have 2 far more pressing concerns:

    1. How do I go full screen instead of having this huge safe area or whatever that is meant to be drawing around my scene
    2. How do I get the keyboard to pop up so I can actually enter text into the text fields?

    Thanks.

    p.s. Will get you some screenshots once the sun rises again. My camera sucks at night time photos under florescent lights...but like I said, the cursor I will worry about later. One of my potential customers asked me if my kit is compatible with consoles and without the ability to enter text into the fields I have no way of testing that and giving him an answer... So keyboard is my number 1 priority.
     
  9. stownend

    stownend

    Joined:
    Jan 18, 2017
    Posts:
    2
    Hi,

    I fixed the cursor issue by adding 2 lines of code to the Start method of my main game object:-

    Cursor.lockState = CursorLockMode.Locked;
    Cursor.visible = false;​

    I also have issue with the white border that I haven't solved yet.

    I also need a keyboard and haven't solved that yet either.

    Good luck!
     
  10. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    Oh wow, I forgot to reply here... Please forgive...

    I don't know what I did differently but I started a new project and set everything as it's supposed to be set and this time round the game worked as expected. Full screen and as stated earlier, no mouse. Awesome.... Except then I needed a mouse cursor and setting Curcosr.visible to true did not do the trick...

    So I tried to bypass the need for the mouse by having a button pop up the keyboard only to realise I have no idea how to see the on screen keyboard. I know I keep asking about the keyboard and all answers keep dancing around answering that question so I just HAVE to ask:

    Does Unity even support showing the native keyboard or not? Is it possible to make an XBO game and actually type in text at some point? This careful sidestepping of any mention of it has me worried...

    Any feedback on how to use TextFields in Win10 builds... specifically XBO.... please?

    Thanks
     
  11. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Does TouchScreenKeyboard class not work? It calls the same system API to display the system screen keyboard on all UWP platforms (except HoloLens, which has a special path). That generally requires no keyboard to be connected to the device though, as then the system just makes those APIs do nothing otherwise.
     
  12. MrDude

    MrDude

    Joined:
    Sep 21, 2006
    Posts:
    2,569
    I will give that a try and see what happens. Thanks for pointing me in the right direction. Appreciated.
     
    JamesArndt likes this.
  13. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Can confirm that using below does work to hide the cursor. Unfortunately it still appears on the Unity splash screen, but disappears immediately once scene is started. Makes sense since my code snippet only runs at scene start. Anyone know how to kill cursor over the splash screen? Side info : This is info from a build I just did today, latest SDK, lastest OS stuff from Microsoft, etc.

    Code (CSharp):
    1. public class HideCursor : MonoBehaviour
    2. {
    3.     void Start()
    4.     {
    5.         Cursor.lockState = CursorLockMode.Locked;
    6.         Cursor.visible = false;
    7.     }
    8. }
     
  14. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    @JamesArndt is there any reason you want to use Xaml build type? Using D3D would solve both the mouse issue, make your game startup faster and make it use less memory.
     
    v01pe_ and JamesArndt like this.
  15. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    Ignorance. I really didn't know the differences. I was just following an online guide and the person giving the tutorial had mentioned using Xaml as the build type. I was just testing, so I can delete the built folder and rebuild the project as D3D. I had no idea it had advantages like that. Thank you for the information!
     
  16. nyarsulik

    nyarsulik

    Joined:
    May 7, 2014
    Posts:
    54
    @Tautvydas-Zilys I'm having a similar issue and switching to D3D did remove the cursor and made the game display at full screen without the white border. However, now I don't get any joystick interactivity in the menu once its on the Xbox One. It will work perfectly in Visual Studio and in the Editor, but not on Xbox One. It does show that my first button is active, it just won't change to any of the other buttons, and won't allow me to actually select the first button.

    Update: My second issue must have been separate, forcing the eventsystem active fixed my problem.
     
    Last edited: Aug 18, 2017
  17. GIRsMySpritAnimal

    GIRsMySpritAnimal

    Joined:
    Jan 13, 2017
    Posts:
    45
    My issue is controller not responding for UI interactions like buttons and dropdowns but it works fine on my PC in VS and in standalone
     
  18. mdavies-opaque

    mdavies-opaque

    Joined:
    Mar 5, 2018
    Posts:
    1
    A bit late to the party, but the fix for Unity's event system not responding to controller input on Xbox One by default using UWP is solved by checking "Force Module Active" on your EventSystem instance in the scene. Also verify there's only one EventSystem instance.
     
    Stephen1701 and albertjames like this.
  19. GIRsMySpritAnimal

    GIRsMySpritAnimal

    Joined:
    Jan 13, 2017
    Posts:
    45
    I tried that thank you though. I did some other stuff to get it working but IDR what. I messed with tons of settings
     
  20. albertjames

    albertjames

    Joined:
    Aug 11, 2018
    Posts:
    16
    OMG ... so much time trying to debug this... But two event system works too, with some fiddling...
     
  21. DerrickLau

    DerrickLau

    Joined:
    Sep 29, 2013
    Posts:
    70
    Anyone here run into problems getting UWP Unity games on XBox One to communicate with web sockets? My web sockets work fine when I run the UWP app on my PC but when I deploy to my XBox One I cannot connect to my web socket server...

    Also, were your Unity plugins written in .NET standard 2.0 only? And then you used Unity3D to build your game as an UWP app, selecting XBox as one of your compatible devices in the player settings from Build settings?
     
    Last edited: Aug 16, 2019
  22. NILC

    NILC

    Joined:
    Aug 17, 2013
    Posts:
    9
    Did you try checking all of the internet base permission capabilities under project settings->Player->Publishing Settings->Capabilities?
    upload_2020-8-14_14-19-25.png
    Depending upon where your websockets are connecting to the later of the two from the above 3 might be the most pertinent, but you didn't mention if you were establishing a connection to a server or acting as a server and whether you were testing on your local network or establishing an internet address.
    It also depends upon what kind of build, and if you have already registered your application in the partner center...as there are similar settings that you have to set for your application there too.
    Either case, this might point you in the right direction...

    Cheers!
     
  23. Stephen1701

    Stephen1701

    Joined:
    Mar 29, 2016
    Posts:
    132
    I'm very late to the party, however your solution helped me out. Thanks very much.