Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

  • 0
Sign in to follow this  
DrComet

How to connect Main and Pause menu?

Question

Hello there!

 

Today my problem is: just read the thread :d

 

Here is my code (it is a bit long):

Please login or register to see this spoiler.

As You can see, Main menu and Game have their own menu windows... So when I change something in Menu, it will not be saved in Pause one. How could I just use one type of menu for every scene?

 

Also, there is one more problem with position of Menu while changing resolution. And well.... Fullscreen doesn't work good too, because I have to check Fullscreen and choose some resolution to make it work. And well, when I want to turn back to windowed mode, I have to do the same thing, but I can't use the same resolution like before, but another one.

 

 

Best regards,

Dr Comet.

Edited by DrComet

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Please login or register to see this quote.

 

 

For the first of your questions, try to use a global script that has static values for options (that script shouldn't be attached to any gamobject) and then call your options from that script just with "ScriptName.Variable".

 

For the second, you don't have to check screen values, main canvases are able to rescale theirselves with width or height while keeping the aspect or not keeping it (it depends on your choice). To do this, go to options of your main canvas and look for "Ui Scale Mode" under "Canvas Scaler (Script)".

 

Best wishes my mate.

Edited by SamedTarik

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...