What's new

Tutorial Unity C# Tutorial | A More Professional UI With 4.6 Update

  • Thread starter pwfdc
  • Start date
  • Views 2,860
P

pwfdc

Member
Bright Idea Programmer Experienced Veteran
Messages
1,540
Reaction score
677
Points
465
Sin$
0
Donations for both my upcoming game studio and YouTube are both GREATLY appreciated, however...it is not required.
If you donate to ColdfireTube, donations will be used for better quality videos, more games, upgrades, etc.
If you donate to my game studio, all donations will go to licenses, bettering the games, and more.
NO DONATIONS WILL BE CROSSED!
Click here to donate to ColdfireTube.
Click here to donate to game studio.

Also, have you ever tried premium?!
You should! Click here to get it!


With the new update (4.6 beta) comes a new GUI system. I've seen tutorials on how to use the UI system, however...there's not much to those UIs. Just a static panel with an image background. Now, that's not good looking.
I take it a step further.

Keep in mind, there's a few bugs that need tweaking with iTween, but it's something you'll have to do yourself since I never fixed it because when I noticed it, the video was already done!

Enjoy the tutorial!

Watch on the official ColdfireTube website


Assets Used
Camera Path
iTween


Feedback, whether negative or positive, is always accepted and taken under heavy consideration! Please leave it!
If you would like to see a specific tutorial, please suggest it below.
 
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,468
Reaction score
3,429
Points
1,042
Sin$
0
So, I've been working with 4.6 and I'm having an issue, how can I properly move the UI to fit properly with the varying screen resolutions?
 
PCMasterRace

PCMasterRace

Glorious
Legendary Veteran Fabled Veteran
Messages
4,443
Reaction score
1,463
Points
545
Sin$
0
So, I've been working with 4.6 and I'm having an issue, how can I properly move the UI to fit properly with the varying screen resolutions?
Division. There's a scrappy scaling script I done in my flappy bird source that might help you out.
 
Last edited:
Xeren

Xeren

♦♦♦ God Complex ♦♦♦
Legendary Veteran Programmer Modder
Messages
5,668
Reaction score
2,107
Points
795
Sin$
0
So, I've been working with 4.6 and I'm having an issue, how can I properly move the UI to fit properly with the varying screen resolutions?
The GUI? You'd have to make proper math equations, since there is no functions to help do so. For example, this is what I use:
Code:
chatMessage = GUI.TextArea(new Rect(20, Screen.height - 20, Screen.width / 5, 20), chatMessage);
GUI.TextArea(new Rect(20, Screen.height / 2, Screen.width / 2.5f, (Screen.height / 2) - 40), chatBuffer);
84a04bfa51083d6af1fa0c4cbb278747.png

ae9489809eb90492612d0377a28cc193.png
 
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,468
Reaction score
3,429
Points
1,042
Sin$
0
The GUI? You'd have to make proper math equations, since there is no functions to help do so. For example, this is what I use:
Code:
chatMessage = GUI.TextArea(new Rect(20, Screen.height - 20, Screen.width / 5, 20), chatMessage);
GUI.TextArea(new Rect(20, Screen.height / 2, Screen.width / 2.5f, (Screen.height / 2) - 40), chatBuffer);
84a04bfa51083d6af1fa0c4cbb278747.png

ae9489809eb90492612d0377a28cc193.png
I'm using 4.6 and the revamped UI that uses a Canvas, it has a different set of coordinates than the rest of the game and is odd as hell.
 
Xeren

Xeren

♦♦♦ God Complex ♦♦♦
Legendary Veteran Programmer Modder
Messages
5,668
Reaction score
2,107
Points
795
Sin$
0
I'm using 4.6 and the revamped UI that uses a Canvas, it has a different set of coordinates than the rest of the game and is odd as hell.
Ah, well I'm not sure. I haven't updated, so I'll try and install it tonight and see what's different. I've been waiting for Unity 5 to release before doing so.
 
P

pwfdc

Member
Bright Idea Programmer Experienced Veteran
Messages
1,540
Reaction score
677
Points
465
Sin$
0
Z61 Z61 : Is anchoring not working? If you tinker with anchoring then it will fit all screen sizes, although it may not look the best.
Put everything in a panel and click the anchor button in the panel then adjust everything like that and move down the controls and make sure they look right.

The anchor is located in the Rect Transform area.
f8sedd4.png
 
Z61

Z61

Some times our saints are sinners
Retired
Programmer Forum Addict Odysseus' Summit
Messages
5,468
Reaction score
3,429
Points
1,042
Sin$
0
Z61 Z61 : Is anchoring not working? If you tinker with anchoring then it will fit all screen sizes, although it may not look the best.
Put everything in a panel and click the anchor button in the panel then adjust everything like that and move down the controls and make sure they look right.

The anchor is located in the Rect Transform area.
f8sedd4.png
I found a solution that works for this project, I just made the panel stretch and it seems to have fixed the issue.
 
Top Bottom
Login
Register