Forum rules - please read before posting.

UI displaying small and off centre

edited March 2018 in Technical Q&A
I just upgraded to latest, for some reason now any UI stuff is very small and off to the left. This includes hotspots and text presented to the user, has something changed here I should know about? Another strange thing is AC seems to want to turn off my UFPS player when I start, so I have had to resort to turning on AC *after* he appears, could they be related?

https://www.dropbox.com/s/nrhyzmvd1he7dl7/acweirdUI.jpg?dl=0

The mouse pointer is also no longer locking to the window, this could be related to removing "simpleCrosshair.Hide = !state;" from the ufps integration script, but I had to in order to get a compile.

Comments

  • From which version?  AC only supports Unity 2017.2 in recent releases - were you using that version before upgrading AC, or did you upgrade Unity at the same time?

    What are the Position type fields of the two Menus?  Would be best to see their full Inspectors.  AC won't resize your Unity UI-based Menus - how do they appear if you drag the Canvas prefabs into the scene when editing?

    If you couldn't compile, what was the compilation error?

    Please also give more details about the way you're using AC with UFPS.  What player prefab are you using?  Is he present in the scene file or spawned in at runtime?
  • edited March 2018
    Unity 2017.2, I was on that when I upgraded, I think from 1.54c. Position on menus is manual, looks fine in editor before game starts.

    I cannot for the life of me find anything relating to ufps in the AC settings anymore, or work out how to know if player is supplied by AC or not (its been a while since I touched unity been working). I have always used my own ufps prefab (initially based on yours I think). Things were fine but now he is always turned off when I start (how do I stop that?), as I say I have scoured the menus and see no mention of this, sure there was a fps option once. I dont mind turning AC on after so long as I can get the UI stuff (all AC menus) to appear properly. It has never been a "proper" AC set up because that never really worked for me, but my old set up did work, I had a script to turn off the AC camera after a few ms because there was ufps and ac cams and they'd jitter+ slow down, but somehow this still worked. I wonder if some of my hackyness is now affecting it, or maybe the ufps support has improved? 

    I havent had enough time to play around but my main question I guess is how do I stop it turning off my player on game start, and is there any reason why all my ui is tiny?

    PS- I forgot to say because I used your original settings and simply renamed them, updates always try wipe them out so I always untick the settings stuff, so maybe theyre out of date?
    • I forgot to say because I used your original settings and simply renamed them, updates always try wipe them out so I always untick the settings stuff, so maybe theyre out of date?

    As in, the Settings Manager?  You must use the New Game Wizard to create your own set of Managers.  If you do, these will be separate to anything imported and won't be overwritten when you update.

    • Is there any reason why all my ui is tiny?

    Try testing a fresh scene with no AC GameEngine.  Drop the UI into the scene, remove any AC Constant ID components (with the save icons beside them in the Hierarchy) - do they then shrink when the scene runs?  If so, it'll be down to some setting in the UI.  If not, it'll be more likely AC is doing something to them that's causing it - in which case please post images of your Canvas before/after running the scene, as well as the related Menu properties in the Menu Manager.

    • I wonder if some of my hackyness is now affecting it, or maybe the ufps support has improved?

    AC's implementation of UFPS changed a while back, so that's it's now solely located in a single script - UltimateFPSIntegration.cs, which you can attach to your UFPS Player to have AC compatible with it.  The benefit with the single-script method is that you can now duplicate and modify it to suit your specific needs.

    I don't know how far back you started this project, but if it was very long ago you would need to switch to the new system - which is a lot easier to set up.  A tutorial on using UFPS with AC can be found here.  The updated Manual also covers the steps in Section 2.2.6.

    I would recommend trying out a fresh project to test with, and just confirm the basic setup of AC/UFPS together works for you before looking at the proper project.
  • edited March 2018
    Thanks Chris, Im not sure why but it worked when I wrote a script to simply turn AC on slightly after UFPS, even the menus look right this way, despite them being small when I did the same thing manually. So far so good will report if I work out why (only annoying thing is i keep forgetting to turn off AC before I hit play when ive been working with it). Thanks!...  
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.