Forum rules - please read before posting.

Interface graphics resize problems

Hello! I’m having a problem related to the menu elements like the subtitles graphic or the inventory. I’m developing a pixel art adventure, importing every sprite with the adequate pixel properties (pixel per unit 20, compression: none) and adding Unity’s pixel perfect asset to the camera, so everything works within a pixel perfect space (to avoid half pixels).
Everything runs smoothly in every resolution tested, with the character performing its animations and moving on the scenery perfectly aligned. No square is out of bounds. The problem comes when I try to import the menu elements (the graphic attached to the dialogue box and the inventory items). I can’t manage to put this sprites like the rest of in-game arts, since I need them to adapt themselves to the different resolutions without deformation. Besides this I don’t know how to properly use the graphic options of the AC Game editor.
For example, If I import a head for the dialogue portrait of 14x14 pixels, and want it to maintain the same pixels per unit as the rest of in-game elements, how can I do so? The current size options seem relative to the dialogue box, so I don’t know how to calculate the proper width and height of said portrait. Something similar goes to the inventory: if I understand correctly it works with percentages and not pixel units, so I have to introduce the width/height parameters by eye (and also scaling the screen does not’ re-scale the inventory elements... it simply deforms them, no matter the options I check).
Sorry beforehand, I’m not a native english speaker and writing down this issues is a little bit difficult for me.

Thanks!

Comments

  • Welcome to the community, @Andrés_Artline.

    Menus have two rendering modes - internally, or with Unity UI. Which one your menu uses is set via its Source option in its properties in the Menu Manager.

    Which are you currently using? If this option is set to Adventure Creator, then you can set the Size field to Absolute Pixels, which should remain at a fixed size regardless of resolution.

    However, if you set this to Unity Ui Prefab - so that your Menu is rendered using Unity UI - then it'll be down to how your Canvas scaling is set up in the root Canvas Inspector.

    Using Unity UI for menu display gives you much more options in the way customisation, so it's likely you'll want to use this mode anyway. For details on how to convert an "AC" menu to one that uses Unity UI, see this tutorial.

  • edited May 2020

    Thanks chris, I have been able to convert the deforming elements to Unity UI Prefabs. But I have a little problem in the main menu. When I export a web GL build the main menu appears too small and out of the correct position. All the other menus are ok. I don´t understand whats happening...

    The wrong menu only happens in the web GL builds

    Menu wrong: https://imgur.com/sQcYuqc

    Menu in Unity and other builds: https://imgur.com/a/SdxkQas

    Thanks again!

    Edit with new info: When I start play the game and come back to the main menu, then it´s all ok. The menu size and position is correct. Weird thing...

  • What's your AC version? An issue with AC menus in WebGL was fixed in the recent v1.71.0 update.

  • 1.70.4 I will make a backup and try to update. Do you think something can break when updating?

  • See the "Upgrade notes" section of the changelog - this one overhauls the player-switching system and changes some of the API, so you will need to go through them carefully when upgrading.

  • edited May 2020

    By updating it replaces the menus and also the main character with the demo robot. At the time I started a new project because I read that reusing things from the demo could cause problems when updating. I understand that in this case the project has no fix. If I modify the character manager and reconfigure it it seems that it is corrected. But the menus are much more work for me. And I don't know if something else has broken along the way :(

    I think I can fix the problem by putting a previous scene on the black screen. When the player intuitively cicks, it will launch the main menu, and since it is a different scene the menu should look the right size. It is not the best solution, but I hope it works.

    Anyway thanks for everything, the tool is still fantastic.

  • @Andrés_Artline Did you use the New Game Wizard to create your game's Managers when you began, or were you modifying the Demo game's Managers for use of your own project?

    The Demo managers are reverted back to their original states if you fully import the AC package. But you can prevent this simply by unchecking the "Demo" folder in the package importer window.

    As you've made a backup, you can also get by with copy/pasting the Demo Managers from your backup into the updated project. They can be found in /Assets/AdventureCreator/Demo/Managers.

    If, however, you were using your own set of Managers, then AC simply reverted back to having the Demo Managers assigned. In which case, you just need to re-assign your own Managers by double-clicking the "Manager package" asset file that the New Game Wizard placed in your game's subfolder.

    See the Manual's "Upgrading Adventure Creator" chapter for details on this.

  • hi Chris I have same issue when building my game in WebGl (and not in windows for example) i.e. my menu is on the top left of the screen and very small. I'm using version 1.72.4.

    Thank you for your help.
    Lionel

  • edited January 2021

    @Lio I'll need to know a few more details. See my first reply to this thread - can you answer the same questions?

    Share screenshots of the menu in-game as well as its properties, and let me know your Unity version - I'll attempt a recreation.

  • Hi Chris,
    I'm using AC internal menu. See enclosed an example menu. It looks like the center of the menu is considered to be the top left corner. My unity version is 2019.4.17f1

    See example : https://imgur.com/a/vcAkXx0

    Thank you,
    Lionel

  • Sorry, I need to see the properties of the Menu itself - as they appear in the Menu Manager.

    Better yet, create a .unitypackage of your Manager asset files and PM it to me - that way I can take a look properly.

  • Sure, can you explain what you need I'm not sure to understand ?

  • Your game's Manager asset files are in a subfolder named Managers inside the Assets folder created when you used the New Game Wizard. You can find them by clicking the "Asset file" field at the top of any Manager tab.

    Select them all and create an Asset Package from them, and that'll create the file.

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.