Selection of Canvas or Panel or Scene for UI in Unity - ios

I am making an iOS application using unity.
We have 3 options for UI elements such as button, user's text key in and image, logo display etc.
I have about 8 pages in my iOS app. The first page is user login, second page is selection buttons for different game levels, third page is display of previous results, etc.
I am making UI pages and I am wondering which option to choose in terms of game's response. As this is my first app using Unity, I like to have opinions from expertises.
Which options would be best for game response and unity design among the followings.
(1)All pages are designed on different scenes and I will have 8 scenes. Each scene has its own UI elements.
(2)One scene, but different canvases for different pages. So each canvas has its own UI elements for different pages.
(3)One scene, one canvas, but different panels for different pages. So each panel has its own UI elements for different pages.
What could be the best option for my app?
If somebody discuss advantages and disadvantages for different options, it would be great.

I mostly use combination of 1 and 3 or only 3.
Passing data between different scenes is more difficult than passing data between gameobjects within the same scene (i.e. requires static members/persistent data/gameobjects that won't be destroyed when the scene is being unloaded).
In single scene options, handling the game state becomes more complex (i.e. which gameobjects are active and visible in different phases of game flow).
It's easier to make transition effects with single scene option especially if two views are visible at the same time.

I'd go with number 2 because you can just deactivate irrelevant canvases and draw only those currently active. This will be more performant than option 3 and afford smoother transitions than option 1. If you're running out of memory then split the scene in half, etc. With only 8 pages your state machine doesn't sound like it would be too difficult to manage. You can read about canvas performance here: https://unity3d.com/learn/tutorials/topics/best-practices/fill-rate-canvases-and-input?playlist=30089

Related

How to create editable 3d animations for IOS

Can someone advise what tools should be used to implement such a task ?
We have a virtual avatar in our application, whose settings allow us to change its equipment / inventory. When you change the equipment in the settings, the new avatar skin is displayed in the application on different screens already with new items (it can be weapons, clothes, shoes and other things). At the moment we use Lottie animations for this, in which we edit json nodes from swift code, but this is too heavy from performance and smoothness point of view
Is there any way to do a similar 3d character editor without using tools like Unity ? I'd like to avoid a long transition between the ios app and the Unity scene load
I know of several apps that, for example, let you edit the colors of objects (like seven, in which you can change the color of the character and his clothes) or their configuration. Is it possible to implement this with SceneKit ?

Manage different classes MonoGame XNA,

I'm making a game in MonoGame with several states. It is very complicated to manage all this in the same class. Is there a way to divide these states with different objects and properties between different classes?
I want to manage the same modules: Draw, Update, load content but focused on other states of the game.
If by different states you mean something like different game screens (menus, main game screens, maps) you can create a game screen class which then contains the functionality required for the current state and overrides Draw, Update etc methods. You can create a different game screen for every map or just one map screen which then loads the map externally etc.
Then create a class to manage current game screens which has methods for changing active game screen (creating new instances by activator and setting it as current screen object) and calling the current screens update & draw methods via override. The main game loop will then call the screen manager without having to worry about knowing the current state.
I found this particular tutorial series to be really helpful since it explains on how to create game screens, screen managers etc: https://www.youtube.com/watch?v=agt9-J9RPZ0 (C# Monogame RPG Made Easy Tutorial by CodingMadeEasy).

Best practice: many buttons or less buttons handling many actions

I would like to learn what is the best practice in regards to UI Design for coding-ease but above all, app responsiveness.
As touch screens have grown, the overall area that users can reach with ease (particularly Portrait mode) has shrunk in proportion to screen size.
Area Of Efficiency (AOE) is the portions of the screen which are reachable by users thumbs (w/o straining) when holding device in both hands. Think of the thumbs as windshield wipers originating from bottom corners of the screen.
When trying to keep all of my UI Input Objects (buttons,textfields etc) in the AOE, I have found myself using the same buttons to do many different actions at different stages of “App Usage” in fear that populating view with many buttons(hide/show as needed) would make my App slow or use up memory. In order to achieve this, my 2-3 buttons each have a few conditional checks of current App stage in order to fire the desired actions.
So which is theoretically more efficient at runtime?
Many buttons on top of each other, performing their own single action, & hide/show as needed at App stages.
Fewer buttons, performing many actions conditional through “if else” or “switch”.
Note: although I would prefer to code as efficiently (less lines) as possible, I care 1000x more about App responsiveness and performance. Coder codes once, but User uses repeatedly.

How many uGUI elements is too many on iOS?

According to this page, https://docs.unity3d.com/Manual/iphone-basic.html, too many UnityGUI elements is considered bad, but what is too many if my game runs entirely on the canvas? At the moment, my UI will contain about 100 objects, most are buttons and 80 of the objects, use full or portions of 3 textures to display the objects.
Does this mean that uGUI cannot or should not be used for iOS games?
That post is talking about something totally different and you are confusing yourself with uGUI and UnityGUI/IMGUI.
UnityGUI/IMGUI is an old UI System. That's what the article is talking about. Don't use it. I've been warning new users about that too due and they use it due to old tutorials they are following.
The only time you should use this is when you are writing an Editor script to test your game in the Editor but this should never be deployed to your mobile device or used as a standalone build.
How to know when you are using UnityGUI/IMGUI or which tutorials to avoid? When you see OnGUI() anywhere in the code, then stop.
The latest UI System in Unity is simply called uGUI. I don't know if the name has changed but this was the original name when it came out. It is only available from Unity 4.6 and above. You can find this from the UnityEngine.UI; namespace.
This is the link you should be reading for the new UI and here for UI tutorials.
Does this mean that uGUI cannot or should not be used for iOS games?
uGUI should be used for all your UI work.Again, I am not talking about the UI from the article. I am talking about the UI from the UnityEngine.UI; namespace.
my UI will contain about 100 objects, most are buttons and 80 of the
objects
uGUI uses Canvas to drive the UI and they are parent GameObject of UI components.. You may want to separate them into different Canvas. For example, MainMenu Canvas, PauseMenu Canvas, GamePlay Canvas.... Under each Canvas, you can then have your components such as Buttons and Texts.
When you are on the main menu, you enable the MainMenu Canvas and disable the rest. You can do this for your other Canvas in your scene depending on the mode of your game. I can't think of any scenario where you need 80 UI components at the-same time, on the scene. You must separate them.

Delphi: a new design of User Interface in app

I need your suggestions how to organize and make a nice, graphical user interface.
Now I have something like this:
There is a tree view (it takes a big space...) as a menu with assigned frames to each item. All frames have control buttons (a tool bar) and something from this list: list views, string grids, progress bars, memos, rich edits, web browser, color pickers, list boxes, labels, edits etc.
I don't have enough experience to create a good, easy and graphical UI, and I do not have any ideas what to make.
The most hard thing for me is I need to create a nice SDI, but the present UI is similar to a MDI (frames with lots controls are instead of windows).
So I'm trying to copy an UI from other soft: http://www.addictivetips.com/windows-tips/150-best-windows-applications-of-year-2010-editors-pick/ + SCREEN SHOTS. But I cannot find something appropriate for me :(
Added:
I have an idea to use a glass effect (a "menu" instead of a tree view on the left), but it looks complicatedly: buttons on a glass and buttons below (a tool bar).
Another version:
Please, advice me what to do or give me a direction. Thanks!
Consider that most monitors are now 16/10 or 16/9, i.e. not in 4/3 aspect ratio any more.
Therefore, it's not a loss of space to put a tree on the left, or even the commands toolbar on the left side instead of the top of the window. Your first screenshot was not the worse, in this aspect. I just write a log viewer with this design: the log events has the full application height.
Office 2007/2010 ribbon for instance is nice looking, but takes too much vertical space IMHO on daily use. Some users (among me) are frustrated by this ribbon. For instance, I don't find it very usable in a notebook. Greatest user interfaces gives full space to content, not commands. Chrome is a good example of this. And mobile applications tend to maximize the available space use.
Just my 2 cents.
Personally speaking, about your first screen shot, the toolbar buttons are too big. They are much too strong a presence, even at second glance.
I would reduce their size. Or, when this program targets children or touching devices, the other controls and font sizes should be enlarged.
You are trying to create a tabbed application, So I'd suggest using some sort of tab-control.
Even the Delphi default one allows you to add pictures to the tabs.
Something like this:
A few considerations:
How often is the app used?
If the app will be used very daily by your users, try to maximize usable space, i.e. make the controls as small as need be.
If the app is used rarely by your users, make the controls big and bright, label every button so things are clear, and time figuring out where is what is minimized, this also means using familiar user interface elements.
Are you targeting elephants or mice?
If you audience is computer savvy (mice), you can get away with more experiments and bling; if you are dealing with perpetual beginners you will need to stick to basic stuff.
Remember, the user interface is a contract
Make sure the controls behave as advertised. If something looks like a button make it behave like a button. Don't disguise a menu to look like a listbox/treeview.
A menu does an action (it's a hidden button), a listbox selects one item that can be acted upon.
My opinion
I dislike your initial screenshot because it tries to force a tabsheet/pagecontrol into the format of a treeview, whilst naming the items menus. This makes for a clumsy interface.
I've never seen a menu be used to switch between views, and the treeview makes for a mighty small target to hid. On top of that it allows for multiple nesting.
The tree is a concept that every programmer understands, but very few people outside that group grok, IMHO, don't use a tree in your application! and avoid the treeview.
It's a poor control to work with because:
It allows nesting > 2 a NONO in my book;
It is too small to hit with a mouse, even worse with a touchpad;
What's up with the [>] sign in front, why would I want to collapse a tree with just 1 level of nesting and when I do and the [+] is visible in front of "main menu" where on earth have my submenu items gone?
I love your last version, but
It needs text labels for every button;
Make the vertical pagecontrol, look like some sort of tabbed sheet, this will make your intent instantly clear;
I would love to see a statusbar;
Glass may look cool, but having the junk from screens below shine through your app sure makes everything look busy, not a good thing if you're trying to focus on this particular app;
Make sure to put splitters between all panels, and make sure to visually highlight the splitter by setting beveled:= true and width/height:= 5 so you can actually hit that splitter
The info panel has its own caption, a huge waste of space. It's bad enough that every window has a title bar that does almost nothing, don't multiply non-interactive space.
Finally
Do as David says and buy a copy of about face, it's the best book on UI design I've seen by far. http://www.cooper.com/#about:books
First picture is the best version for standard desktops with mouse.
Third picture will be good for tablets with their touch screens. But it needs some improvements. Currently I can't see on which page I am now, even more: there are no signs that those buttons actually switch pages. I think, you need some sort of tabcontrol here.

Resources