by the way guys, if you cannot drag in the resolution drop down, you probably have a text mesh pro dropdown one. To solve this you can do 'public TMPro.TMP_Dropdown resolutionDropdown;' instead of the 'public Dropdown resolutionDropdown'. I hope this helps on anyone who is stuck.
Thx man, now that they are not working as a youtuber anymore i dont feel guilty about not watching the whole vid lol
@cptray-steam3 жыл бұрын
Someone get this man a cookie!
@btryx93783 жыл бұрын
@Ninja Boy you're probably doing something wrong then.
@BigWallSolutions6 ай бұрын
С этой связкой все стало проще и эффективнее, спасибо за советы!
@skho9747 жыл бұрын
Dude every time i need to learn something, i go on youtube and every time, you make a video about what i needed at that moment, you kidda scary tho
@richkid65716 жыл бұрын
Lol yall crazy lol
@pitaya41516 жыл бұрын
Elvishious the fbi man tells him
@NicoFye4 жыл бұрын
for everyone who's wondering, there is actually a tool that let's you know what people search the most :)
@ariarichards-4 жыл бұрын
@@NicoFye Yeah it's called Google trends
@patrickh42846 жыл бұрын
At 14:30 there´s a mistake in the script. He compares resolution[i] with Screen.currentResolution but that´s wrong. CurrentResolution gives the Resolution of the monitor but we want to compare it with the Resolution of the window in case we change the scene. That´s why we have to compare resolution[i].width with Screen.width and resolution[i].height with Screen.height.
@yeetusselfdefeetus45666 жыл бұрын
Patrick H YOU HAVE SAVED ME THANK YOU VERY MUCH
@christossotirlis22476 жыл бұрын
i love you. this video assisted me in creating my first project and this was a huge stuck. thank you
@rockbolton81736 жыл бұрын
Thanks a bunch man! i was wondering why my game kept resizing to full screen when I opened my settings lol
@budrys13566 жыл бұрын
Could you copy full script with resolution for me, becouse im having some trouble.
@poteito97216 жыл бұрын
love you my dude, you saved my life :D
@Kai-Shin6 жыл бұрын
Small tip Select the audiosource you want to control volume > Output > None→Master(AudioMixer). :D
@Zinisco6 жыл бұрын
Thank you!
@FabioKun6 жыл бұрын
thx
@d1xt1r6 жыл бұрын
Thank you!
@kevinalbajrami99236 жыл бұрын
make this top comment
@akulmehra75286 жыл бұрын
Hey man, I followed the tutorial step by step and even followed your comment. Still my slider seems to have no effect on the volume. Any suggestions?
@DawnosaurDev5 жыл бұрын
At 5:10 use audioMixer.SetFloat("Volume", Mathf.Log10(volume) * 20); instead since the audiomixer volume is not linear Edit: make sure the varibles match yours ie. same caps and spellings
@SkeeterMakesGames5 жыл бұрын
Thanks dude. Solved a problem I was having.
@kishiosakai26495 жыл бұрын
Thank you!
@fuuuuuuuuuuuuuuuuuuuuuuuuu4 жыл бұрын
Thank you. For this to work the Slider object must have Min and Max values of 0.0001 and 1 respectively.
@facyual90614 жыл бұрын
@Zoom the second time its lower case
@facyual90614 жыл бұрын
this only works if you change the "Volume" to "volume" it took me 10 minutes to figure out that the "Volume" wasn't supposed to be caps.
@wifu-box2663 жыл бұрын
Just wanted to let you know your tutorials are phenomenal! I really appreciate the way you add in Debug.Logs as you go so we can see it working as we go rather than just hoping it all works at the end of the tute. Stay awesome man!
@_hallowed_3 жыл бұрын
For the resolutions option, if anybody is seeing a lot of seemingly duplicate options (I was), it's because of refresh rates - you have 1920x1080@60hz and 1920x1080@144hz for example. What I did was add the refresh rate into the dropdown text options: string option = resolutions[i].width + " x " + resolutions[i].height + " @ " + resolutions[i].refreshRate + "hz";
@stentanner3 жыл бұрын
Thank you!
@_hallowed_2 жыл бұрын
@WasNeverBrandon No idea, but there definitely is a way.
@Ice_ZOMBIES2 жыл бұрын
I literally just switched back from my Unity program to google "why do i have duplicate resolutions?" Just to see your comment conveniently right before I clicked away. Bless your soul, you beautiful bastard! Thank you!
@Nikolai_SE2 жыл бұрын
Thank you bro!
@chiragmidha28782 жыл бұрын
this is exactly what I was looking for
@ben_insomnia7 ай бұрын
My GOAT, 6 years later and all of this is still helpful
@dc37wwe2kmods4 жыл бұрын
For everyone who gets the same resolution on the dropdown even if they already changed it: This happens when on window mode. The Screen.currentResolution will get the 'desktop resolution' instead of the game's current resolution. To fix this, simply change: ` if(_resolutions[i].width == Screen.currentResolution.width && _resolutions[i].height == Screen.currentResolution.height) ` TO ` if(_resolutions[i].width == Screen.width && _resolutions[i].height == Screen.height) ` If you didn't get it, change "Screen.currentResolution.width" to "Screen.width" (and also height) during the if statement on the for loop. This will get the game's current resolution. God Bless and Happy Coding! =)
@tophatsntales2 жыл бұрын
Holy hell this solved all my problems. it would save everything but as soon as a scene loaded it changed the resolution
@dc37wwe2kmods2 жыл бұрын
@@tophatsntales Happy to help!
@lazzzzz_exe8 ай бұрын
what canvas settings did you have? mine doesnt scale properly and the resolution gets considerably lower if you pick anything but default
@StygianStyle2 жыл бұрын
If your slider is affecting the audio mixer values but not changing the sound volume of your audio, you have to drag the mixer into the slot of your audio clip on the inspector to affect the actual sound of each clip.
@conors0262 жыл бұрын
I know this was 3 months ago but thank you so much
@BAGUETTEBOYyt Жыл бұрын
thanks 👍
@polipoli23 Жыл бұрын
thank you so much
@mcsween45934 ай бұрын
I dont get what you mean where do i drag the audio mixer
@StygianStyle4 ай бұрын
@@mcsween4593 It sounds like you have brand-new understanding of the Unity menus. I think you need to do more beginner-friendly tutorials to get better familiarity.
@MrAvatin7 жыл бұрын
Probably one of the few youtubers who care about their subscribers and take their feedback!
@81Mendel5 жыл бұрын
@ 11:45 - 12:13 try this line instead: string option = resolutions[i].width + " x "+ resolutions[i].height +" @ " +resolutions[i].refreshRate + " Hz"; This will populate the list nicely with refreshRate information intact edit: not sure yet how to apply the refresh rate as well.
@likewut0076 жыл бұрын
if brackeys doesn't have a tutorial on it, it can't be done. this guys saved me so many headaches
@Gredran4 жыл бұрын
It's true what they all say, you are THE Unity guy. Sure I know others exist, but the sheer amount of topics you discuss, from 2d to 3d, to settings and multiplayer. Thanks so much! It's been long overdue for me, but FINALLY getting into Unity and C# :D
@jaycesaerius7 жыл бұрын
You are the best, Brackeys !
@Jasperkiller17 жыл бұрын
We asked for it, we got it, we enjoy it. :D
@brianmo26117 жыл бұрын
...... This is hardly a settings menu, what about aspect ratio, AA, Different volume settings for like music/sfx/master volume, what about controler and keyboard binding, or what about SAVING the settings for the next time a player opens the game........
@esbenkran7 жыл бұрын
- Aspect ratio is just a modified resolutions dialog with resolution shown in lower fractions. - The AA can be accessed through the post-processing stack, which I believe he has done a tutorial on already. - The different volume settings would be done by sending AudioSource sounds to specific mixers instead of master (SFX mixer, Music mixer) and then modifying them instead of the master as he did in this video. - The controller and keyboard bindings can be accessed and modified (with much more work) through the Input class etc. - Saving the settings is just using PlayerPrefs, which he has done a tutorial on already.
@brianmo26117 жыл бұрын
Yes because telling someone what they are is totally the same thing as showing someone how to set them up........
@arey857 жыл бұрын
Watch Brackey's high score tutorial and you have your answer for both how to save custom prefs into a prefs and load it back. In his previous tutirials you can also find the answer how to detect inputs, keyress etc and change those settings. Then just combine all of them together and you can get a fully functional options menu :)
If it weren't for Brackeys, not only would I have maybe thought about giving up Game developing, thinking it would be too boring or difficult, or I would have kept doing it but never find so much joy in learning the basics. Thanks man!
@jvcss7 жыл бұрын
YOU ARE BADASS MAN!! I REALLY LOVE YOU DUDE!
@horyzengm4 жыл бұрын
Brackeys: Its an amazing pack thats free on the asset store The asset store: That'll be $25 please
@infleo234 жыл бұрын
True, I dont know which asset to use...
@aminkafnaweez25954 жыл бұрын
@@infleo23 bro u can just draw the them urself its easy :)
@bbugra33 жыл бұрын
@@aminkafnaweez2595 wait.. is it really easy???
@redgeoblaze37523 жыл бұрын
@@aminkafnaweez2595 you underestimate just how bad some of us are at art. Or more importantly, how long it takes us to figure out some digital art programs.
@Hietakissa3 жыл бұрын
@@redgeoblaze3752 that is why all my menus consist of tmp text with a nice gradient and a dark semi-transparent panel underneath it. Good enough looking ui and it's really easy to make.
@Vaerch7 жыл бұрын
This is what i love about Brackeys, The quality of their tutorials.
@skymartin94143 жыл бұрын
If you are using a TextMeshPro DropDown instead of the default Dropdown change: public DropDown resolutionDropdown; to public TMP_Dropdown resolutionDropdown; and make sure that you have using TMPpro; at the top of your script
@janil93573 жыл бұрын
wow.. thx a lot bro.. I was wondering what went wrong for a sec lol
@eltonyeo28113 жыл бұрын
Thx, help me a lot
@noisefond2 жыл бұрын
legend
@savasozdemir33202 жыл бұрын
I came here looking for a brave soul that solved my problem without me asking, internet delivered once again... Thanks man!
@kostiantynvolnov9012 Жыл бұрын
Thx, man, but 1 mistake using TMPro; without "p"
@maxencecrouzy21964 жыл бұрын
I almost never comment on videos but dude you just saved my programming project!
@TNThead5 жыл бұрын
For anyone with troubles in build where the options can get duplicated in the dropdown; this is in fact not a bug, it is due to the varying refresh rates available. Unity editor has a consistent 60Hz, but when an application is built, there can be multiple differing rates between the same resolution. A fix can be just adding the refresh rate to the option: string option = resolutions[i].width + " x " + resolutions[i].height + ", " + resolutions[i].refreshRate + "Hz";
@hepcecob5 жыл бұрын
Is there a way to do it without the refresh rates? I tried comparing the old vs new value, got the drop down list to be only unique refresh rates... but when I select one, I guess it takes it's index form the drop down and applies it to the available resolutions.
@alicanted2 жыл бұрын
If you want to set the default quality to high for instance you can do that within the dropdown component by setting 'value' to 2. I struggled with this a bit at first :P
@swiftcreations2 жыл бұрын
Thanks!
@ЕвгенийКучерявый-л8э5 жыл бұрын
Hi! Thanks for your video! I've got something you might find useful. Instead of this: if(resolutions[i].width == Screen.currentResolution.width && resolutions[i].height == Screen.currentResolution.height) You can use the Equals method: if(resolutions[i].Equals(Screen.currentResolution)) It compares objects and returns true, if their fields are equal. Hope it might help someone to shorten their code!
@zacksima83335 жыл бұрын
Евгений Кучерявый I think == is an implicit .equals call so you can just directly use ==
@mr.fakeman47184 жыл бұрын
== is slower than .Equals, his comment deserves more likes.
@awawa55944 жыл бұрын
Do you still need the last 3 lines: m_ResolutionDropdown.AddOptions(m_Options); m_ResolutionDropdown.value = m_CurrentResolutionIndex; m_ResolutionDropdown.RefreshShownValue();
@AstraGamesStudios Жыл бұрын
@@awawa5594 yes
@EUBEEN1234 жыл бұрын
I'm always so happy when I finish writing the scripts and there are no errors
@wgregoryw212 жыл бұрын
If you see the bar in the MainMixer go up and down but the volume doesn't change you have to add: public AudioMixerGroup mixerGroup; in your AudioManager script and then inside the foreach(Sound s in sounds) after the s.source = gameObject.AddComponent(); you have to put s.source.outputAudioMixerGroup = mixerGroup; after that open the MainMixer icon in your assets and drag the "Master" inside the public mixerGroup in editor!
@owokamii Жыл бұрын
tysm!
@ACBros_06 Жыл бұрын
Still the greatest source of info on internet
@dewybeat24094 жыл бұрын
To people like me who's having trouble with the volume here's something that works: public AudioMixer audioMixer; [SerializeField] AudioSource audioSrc; public float Nvolume = 1f; void Update() { audioSrc.volume = Nvolume; } public void SetVolume(float volume) { Nvolume = volume; audioMixer.SetFloat("volume", Nvolume); }
@xxxx91314 жыл бұрын
TKS
@everton.colombo7 жыл бұрын
Dude, you don't even know how your tutorials have been helping me, thanks.
@anommahartha23576 жыл бұрын
remember to Increase volume on "Audio Mixer", and add Output -> Master to your "Audio source" component... :D
@rinodipaola7614 жыл бұрын
Thank you, you saved my life!! :D
@OBEYOTTERZ3 жыл бұрын
THANK YOU SO MUUUUUUUUCHHHHHHHHHHHHHHHH
@SH-pu6wf5 жыл бұрын
Honestly, without your tutorials i would never finish my game. BIG THANK TO YOU!
@EngiNetion5 жыл бұрын
Can i play your game?
@Stigma536 Жыл бұрын
i also want to play your game :>
@peterchow1724 жыл бұрын
For those whose volume doesn't change after using the slider, add this to your code: AudioMixer audioMixer = Resources.Load("MainMixer"); AudioMixerGroup[] audioMixGroup = audioMixer.FindMatchingGroups("Master"); audioSource.outputAudioMixerGroup = audioMixGroup[0]; Also, you have to go to the audiosource component of the audioclip you want to lower the sound of and change the output section to Master(AudioMixer).
@_VULTAR_2 жыл бұрын
Thanks!
@billylansar13926 жыл бұрын
Spanish: El mejor tutorial de Unity es este. Yo pude programar con exito el menu de mi juego. Muchas gracias, saludos desde Colombia. English: The best Unity tutorial is this one. I could reprogram sucesfully the menu of my game. Thank you very much, greatings for Colombia. ☺😀👏👍
@aidenkimmerling72214 жыл бұрын
So I know this is an old video, but the Graphics dropdown only actually works when my mouse is hovering over the Quality section in the Project Settings tab
@timwit3337 жыл бұрын
DUUUDE, just arrived at the point in my personal project where I have to implement the settings menu! Best timing ever!
@BottledWater7 жыл бұрын
can you make a tutorial on how to save these settings when the game gets closed? would this also apply to other things in the game (lives, unlocked levels, etc.)
@SerhiiZhydel6 жыл бұрын
so unity doesn't load these settings after restart? did you check it?
@Definitely_a_Fox5 жыл бұрын
He did a video on saving and loading values. Maybe you want to check that out.
@vda1_3274 жыл бұрын
yes i need that too
@Croccolucho4 жыл бұрын
@@Definitely_a_Fox can you please give me the link?
@Definitely_a_Fox4 жыл бұрын
@@Croccolucho Okay, a quick look through their video''s was all you needed to do. kzbin.info/www/bejne/joDNlZKnipd8mtE
@bryanflores51953 жыл бұрын
Maybe it's too late but in 13:49 you can use "resolutions[i].Equals(Screen.currentResolution)" instead of" ==". I'm not pretty sure if this is the correct explanation but "==" is used to compare primitive objects like numbers but ''.Equals" is used to compare objects
@creatingwithlove3 жыл бұрын
Love the tutorial. Wish you were still making them.
@WratchetKlank6 жыл бұрын
'Screen.currentResolution.width' and 'Screen.currentResolution.height' return the width and height of your target display ("decktop" according to documentation). So, unless I misunderstood the resolution dropdown section, if you want the width and height of your game screen you should use 'Screen.width' and 'Screen.height' respectively.
@patamaswag2 жыл бұрын
if anyone has errors in their script, try this: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Audio; using UnityEngine.UI; using TMPro; public class SettingsMenu : MonoBehaviour{ public AudioMixer audioMixer; public TMP_Dropdown resolutionDropdown; Resolution[] resolutions; void Start () { resolutions = Screen.resolutions; resolutionDropdown.ClearOptions(); List options = new List(); int currentResolutionIndex = 0; for (int i = 0; i < resolutions.Length; i++) { string option = resolutions[i].width + "x" + resolutions [i].height; options.Add(option); if (resolutions[i].width == Screen.currentResolution.width && resolutions[i].height == Screen.currentResolution.height) { currentResolutionIndex = i; } } resolutionDropdown.AddOptions(options); resolutionDropdown.value = currentResolutionIndex; resolutionDropdown.RefreshShownValue(); } public void SetResolution (int resolutionIndex) { Resolution resolution = resolutions[resolutionIndex]; Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen); } public void SetVolume(float volume) { audioMixer.SetFloat("volume", volume); } public void SetQuality (int qualityIndex) { QualitySettings.SetQualityLevel(qualityIndex); } public void SetFullscreen (bool isFullscreen) { Screen.fullScreen = isFullscreen; } } (the text mesh pro is only if you are using it)
@derangeddoffy2 жыл бұрын
Thank you so much, I wasn't able to do resolution dropdown.
@ichigo765 Жыл бұрын
thanks, your a life saver. i dont know why mine wasnt working
@Frazcaideadlol__ Жыл бұрын
We need more people like you.
@rarisninja4613 ай бұрын
W
@mayaG1836 жыл бұрын
I just found this channel yesterday this is so helpful and amazing. I don't know how else to thank you as soon as I have a stable income I will become a patron supporter!!!
@DayMoniakkEdits7 жыл бұрын
You can also save all theses values in the PlayerProperties for load the settings each time you change or restart scenes
@Parona13376 жыл бұрын
How? It doesnt work for me
@The_Ministry_of_War_Network2 жыл бұрын
he just a big brain master of all unity the god of all dev games
@ie5856 жыл бұрын
To fix the bug with repeat resolution you need to disable the extra support for the aspect ratio in the player settings. After that, the bug with the rotation resolution will be lost. P.S. sorry for the bad english. People need it in the top!
@F3NR1R046 жыл бұрын
thanks a ton!
@moenator5096 жыл бұрын
I cant find the extra support T_T, Help
@sconosciutosconosciuto21966 жыл бұрын
@@moenator509 me too :(
@mikecastilho10105 жыл бұрын
@@zhuohuichen9444 The solution is pretty simple actually the duplicates are different refresh rates for the resolutions, since brackeys only picked the sizes of width and height in the string you can't see then you can keep the duplicates and add the refresh rates using something like string option = resolutions[i].ToString(); or filter all non-60hz results using resolutions = Screen.resolutions.Where(resolution => resolution.refreshRate == 60).ToArray(); istead of resolutions = Screen.resolutions; just make sure you are using System.Linq o/
@g5fighter5 жыл бұрын
@@mikecastilho1010 Also you can do this List options = new List(); int currentResolutionIndex = 0; for (int i = 0; i < resolutions.Length; i++) { string option = resolutions[i].width + "x" + resolutions[i].height + ":" + resolutions[i].refreshRate + "Hz"; options.Add(option); if(resolutions[i].width == Screen.currentResolution.width && resolutions[i].height == Screen.currentResolution.height && resolutions[i].refreshRate == Screen.currentResolution.refreshRate) { currentResolutionIndex = i; } } resolutionDropdown.AddOptions(options); resolutionDropdown.value = currentResolutionIndex; resolutionDropdown.RefreshShownValue(); public void SetResolution(int resolutionIndex) { Resolution resolution = resolutions[resolutionIndex]; Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen, resolution.refreshRate); }
@saniti47764 жыл бұрын
THAAAAANKS TEACHER BRACKEYS
@theunknowndev_7 жыл бұрын
on Low Quality my Images and Fonts are the same quality as in High. How can I change this?
@muhammadalfin26914 жыл бұрын
In dropdown, change the value to 2
@das3tins7684 жыл бұрын
@@muhammadalfin2691 which value tho
@HitsquadYT3 жыл бұрын
Thx bro you always been there helping even tho you gone now you still helping people
@MostafaTElmansoury7 жыл бұрын
Please make a tutorial on how to map controller input.
@netbat4 жыл бұрын
it's in project settings > Input
@IzeIzeBaby7 жыл бұрын
Best tutorial i have ever seen about unity's ui. Nice.
@aalim-kn6lq4 жыл бұрын
if anyone was wondering, this is how i think is an easy way to use the volume slider: using System.Collections; using System.Collections.Generic; using UnityEngine; public class OptionMenu : MonoBehaviour { public void SetVolume(float volume) { AudioListener.volume = volume; } } hope it helped!
@ahsanshah73732 жыл бұрын
Lifesaver
@hyp324011 ай бұрын
Amazing tutorial, helped me get through volume slider and graphics options, thank you
@b1llspc Жыл бұрын
Hey you! Having issues with the Volume Slider not working because you're using DontDestroyOnLoad() to keep music between scenes? I gotchu. In your AudioManager script, add this : public AudioMixerGroup mix; and in your foreach (Sound s in sounds), add this: s.source.outputAudioMixerGroup = mix; You can change the variable names as needed of course - the main idea is that A) Unity needs to be able to grab the proper Audio Mixer item through code, even when switching scenes, and B) you need to use the outputAudioMixerGroup functionality in Sound (s.source in the above) to edit the Mixer controls from the code! Hope this helps you solve this bug faster than I did lol
@grimsladeleviathan39585 жыл бұрын
This video has been really really helpful! I tried to make an option menu, and some stuff didn't work, after watching this video, I found what I did wrong. Thanks, Brackeys! Love the christmas hat btw
@blackjackveteran4 жыл бұрын
when i use the slider the audio mixer changes but the sound does not increase or decrease at all
@kondzio35003 жыл бұрын
I gave same problem. i know u wrote it 8 months ago, but did u find solution?
@blackjackveteran3 жыл бұрын
@@kondzio3500 sure, go to your audio source, there should be a slot for an audio mixer. This is to tell which sound to mute and which to not, you can have 2 audio mixers: music and sfx, and 2 sliders and that is so when you mute music sfx doesnt get affected and this is the solution
@MrBalinSuperTV6 жыл бұрын
Hope this helps others! For Audio to work, Create a "Resources" folder in Assets, and put the new mixer in. In code Awake() throw the following: AudioMixer mixer = Resources.Load("Mixer_Main") as AudioMixer; audioSource.outputAudioMixerGroup = mixer.FindMatchingGroups("Master")[0];
@travisbritton11806 жыл бұрын
Where's Awake in the code i cant find it
@travisbritton11806 жыл бұрын
never mind but there is red line under "outputAudioMixerGroup" idk what to do about it
@sartr5937 жыл бұрын
hmm, I did everything like you showed in this video and my master volume changes with volume slider, but music in my game doesn't change at all (and other sound effects as well)! That is very weird and I am stuck 🤔
@tranquilmagister84817 жыл бұрын
found the solution? cause i think i have the same thing; and nothing seems to work...
@sartr5936 жыл бұрын
Yeah, in Audio Source Component (where you set your audio) add MainMixer->Master in the Output.
@tranquilmagister84816 жыл бұрын
Thank you so much! that was exactly what i did wrong.
@badluckderp6 жыл бұрын
how did you connect the audio in the slider?
@jagpreetsingh49936 жыл бұрын
You just me a lot of headache and time.. Thank you, you goddamn bloody legend
@safalsawantpersonal98393 жыл бұрын
THANKS A LOT MAN I WOULD HAVE STRUGGLED WITH THIS FOR AGES IF YOU WOULD WERE NOT THERE!!
@nxt_tim7 жыл бұрын
dat christmas hat tho :D
@zeenzw66787 жыл бұрын
Lol deutscher iz da
@Shinobi314159267 жыл бұрын
Loving these UI tutorials. Keep 'em coming!!!
@serpnta12677 жыл бұрын
For those of you getting several of the same resolutions in your resolution drop down, you can get rid of them by going into Edit, Project Settings, Player, Resolution and Presentation and find the Support Aspect Ratios, then untick 4:3, 5:4, and other. You will no longer have the smaller number of resolutions but you won't have any duplicates. The lowest resolution you can then choose is 1280 x 720 (or at least it is for me). If you need something smaller, you may have to do some coding or live with the duplicates..
@shadowgodthegamer57382 жыл бұрын
We miss you. I hope that you are doing something fun now since you deserve it
@andreasschmitz90416 жыл бұрын
Thanks for this great tutorial. I just had a problem when using the settings in window mode (not fullscreen). Because Screen.currentResolution is really the resolution of the screen and not the window the wrong currentResolutionIndex is choosen and after resolutionDropdown.value = currentResolutionIndex; the size of the window changed to the size of the screen. if (resolutions[i].width == Screen.width && resolutions[i].height == Screen.height) fixes this and works also in fullscreen mode.
@Diego0wnz5 жыл бұрын
it's so insane. I just made a game in the 2-week holidays because of you? Thanks so much stranger. I mean god brackeys =) haha
@CrunchyPie7 жыл бұрын
Make Tutorial about when you press esc you can resume game,quit,and option
@jorjolandes7 жыл бұрын
He explain this in one of the "Tower Defense" videos. In this one kzbin.info/www/bejne/bWmcmIBvh5ibqsU
@chakibchemso5 жыл бұрын
the best channel i learnt from it for ever
@CraftyMaelyss5 жыл бұрын
5:36 For some reason, when I drag the handle, it either goes to 0 or -80 but never in between P:
@lukemoore73197 жыл бұрын
Dude u are so great, I love these tutorials, gonna pass my uni degree based on half of this stuff 😂😂 keep it up 😍
@SavanaStudios7 жыл бұрын
for some reason i see 4 - 8 of the same resolutions when i use the dropdown, fixes?
@yellowgd39366 жыл бұрын
Same problem. Any fix?
@SavanaStudios6 жыл бұрын
Yellow GD dont worry, when u build the game its good.
@brokenos77106 жыл бұрын
nope still a problem
@SavanaStudios6 жыл бұрын
really?, mine just got Fixed so i dont think i can help you much on this
@Yugenki6 жыл бұрын
Having the same problem, works good at editor, but there is some same resolutions at the build
@DriitzzCabal7 жыл бұрын
i had issue with my text being crisp and clear in the editor but blurried when building the game , this totally fixed it AND it wasn't even related to that LOL! thanks brackeys you the man
@ApexArtistX6 жыл бұрын
the audio slider does not saved when changing scenes, looks like a bug.... can you combine this volume slider with another tutorial AudioManager singleton ?
@Racools5 жыл бұрын
i consider myself new to coding and unity overall and even i know this is just sloppy. like you know what problems will happen before they even happen type of sloppy.
@paranoidpanda76945 жыл бұрын
@@Racools It changes when going to new scenes because the options aren't being saved. You'll need to implement a save and load system for settings
@XiaoZong3225 жыл бұрын
I second this question. Would like a tutorial of the audio mixer (or the slider) working with AudioManager
@alleyesonme14324 жыл бұрын
@@XiaoZong322 Brackeys is good and all, but most of times he doesn't show all nuances of his scripts and how to fix simple problems. You will need to jump around KZbin to find solutions to very simple problems arising from his scripts to fix them. Here what i found and used. First link to slider problem (slider doesn't work properly - like starting to tune down sound only after 50% of slider) and second video about mute button. Hope that helps. gamedevbeginner.com/10-unity-audio-tips-that-you-wont-find-in-the-tutorials/ - 9-th tip, slider problem. kzbin.info/www/bejne/hZa9pqqdfJt7gK8 - mute button video.
@kingdavegamess4 жыл бұрын
try this guys : ibb.co/GFCWS2v
@williamhiciano3942 жыл бұрын
five years later this is the top of the top
@MrAimss4 жыл бұрын
I dont know why, but my graphic dropdown wount work. And i tried everything! Can someone Help me?
@baconslayer4 жыл бұрын
Change the value of the dropdown
@GontyWasHere4 жыл бұрын
@@baconslayer I tried this and it did nothing. I am having the same problem and all it did was change the default of the dropdown.
@baconslayer4 жыл бұрын
@@GontyWasHere is the dropdown Text mesh pro?
@baconslayer4 жыл бұрын
@@GontyWasHere ok so first put at the top of your code put using TMPro now when your referencing the dropdown put public TMP_Dropdown resolutiondropdown
@GontyWasHere4 жыл бұрын
@@baconslayer I already did all that. also, I am talking about the graphics dropdown, not the resolution dropdown.
@ViolinFinal6 жыл бұрын
instead of checking width and height of resolution just call if(resolutions[i].Equals(Screen.currentResolution)). It is a little cleaner
@timeylies2 жыл бұрын
thanks
@_GhostMiner5 ай бұрын
*This is a great tutorial, but you forgot to filter refresh rates, so depending on your monitor, you might have multiple entries for the same resolution.* *BUT this simple code fixes that:* int currentRefreshRate = Screen.currentResolution.refreshRate; if (resolutionArray[i].refreshRate != currentRefreshRate) { continue; } *Put this at the the very beginning of the loop that adds all resolutions to the List used by the dropdown*
@benjoe19937 жыл бұрын
This tutorial is what the beginner gamedev community has been waiting for for ages now :D Thanks for creating this!
@SmirnovOleg4 жыл бұрын
Hello! I've probem - I've done everything as You but quality doesn't changing, why?
@kapilbadokar4 жыл бұрын
Hey i wanna download that file but it isn't free??? Any chance of getting it for free
@SmirnovOleg4 жыл бұрын
@@kapilbadokar Hello! Why You asking me it isn't mine ask developers of that specific thing
@framedkraken74036 жыл бұрын
just saw this tutorial and implemented it! new patreon member incoming !!!
@Chrras2 жыл бұрын
Nice tutorial, but I am a bit surprised that it didn't touch upon the volume slider being logarithmic (due to it being tied with the sound in dB). The way it is showcased here, you get a very sensitive slider, which is not very user friendly at all
@whereistheguru.2 жыл бұрын
You're so very right, do you have a working solution of how to modify it to work perfectly from 0% to 100% of volume?
@CalledCracki2 жыл бұрын
@@whereistheguru. try this audioMixer.SetFloat("volume", Mathf.Log10(volume) * 20); [be aware of variable names]
@mariuszkrawiec32044 жыл бұрын
It actually works now! Thanks to Brakeys.
@galaktoza5 жыл бұрын
That dynamic float argument is missing from my functions list in the editor. How to write it manually in the script?
@defoxik5 жыл бұрын
download new unity 2019.2.9f1
@luccasyamnotho32805 жыл бұрын
@@defoxik Mine is the 2019.3.0a12 version and I still have the same problem! Does any one know what do I have/should/must do, pls?!
@TheWestonini5 жыл бұрын
@@luccasyamnotho3280 forum.unity.com/threads/slider-on-value-changed-broken-in-osx.746090/ You can go into debug mode and select the "Event Defined" option there to get the same result.
@kefflix50874 жыл бұрын
my game has so many bugs and i was so frustating that never things worked but i watched this video, everything worked and now i am motivated to keep going on my game;)
@imvanishr86415 жыл бұрын
I only can choose SetVolume(float) i dont have the dynamic float could someone help me?
@revnation15 жыл бұрын
i am having the same problem . It might be the new Unity Versions that are causing the problem
@hardgames41045 жыл бұрын
I cannot see your code but one possible difference could be, that you are using private variables and [SerializeField] to make them visible in the editor. But you really have to use public variables here. I am using Unity 2019.1 and still have those fields, Brackeys showed in his tutorial.
@imvanishr86415 жыл бұрын
HARDgames i used another tutorial how to do it and it worked without using dynamics
@aironnedizon17185 жыл бұрын
@@imvanishr8641 what tutorial did u use?
@stephanebessette64716 жыл бұрын
The names of the quality levels can be retrieved, in the same way the resolutions were retrieved. The "current" quality level index can also be retrieved however I have only tested the effect with Unity's default application dialog; not certain how it relates to the "default" quality level. GraphicQualityLevels.ClearOptions(); GraphicQualityLevels.AddOptions(new List(QualitySettings.names)); GraphicQualityLevels.value = QualitySettings.GetQualityLevel();
@cindyespindola49465 жыл бұрын
Thank you so much, you saved me ;)
@bahaatamer12457 жыл бұрын
As much as I used to love (and I still do) your videos teaching us about this engine, the only negative thing you have is that you are a little bit way too fast! Sometimes I can't follow up with what is being said, otherwise your videos are brilliant!
@MaidenOfDread6 жыл бұрын
Explore17 You can always change the speed of the video :P
@georgeoutters56577 жыл бұрын
You are THE best programmer I have ever seen!!!!:)
@stephanebessette64716 жыл бұрын
Set the volume slider to go from 0 to 1 and use this code to have a linear sound slider: public void SetVolume(float decimalVolume) { var dbVolume = Mathf.Log10(decimalVolume) * 20; if (decimalVolume == 0.0f) { dbVolume = -80.0f; } audioMixer.SetFloat("volume", dbVolume); }
@genius-b118011 ай бұрын
Thanks dude
@raoi_3 жыл бұрын
Very helpful but I actually need the volume to apply to other scenes in the project- The volume slider also doesn't save so it could be a problem for the players playing my game. I'm using Unity 2020.2.2f1
@mrGee5 жыл бұрын
Thanks for the tutorial I'm getting the following error: NullReferenceException: Object reference not set to an instance of an object SettingsMenu.Start () (at Assets/UI/Scripts/SettingsMenu.cs:20)
@albin60034 жыл бұрын
Same but i dont know how to fix it
@noobsaibot39227 жыл бұрын
I just subscribed to this channel and thinking why didn't i do it before its the best! you teach the best way
@Seshua87 Жыл бұрын
No offense to you Brackeys
@red1swonderworld3 жыл бұрын
miss you big brack
@EmilM-pb2hn5 жыл бұрын
Edit: The code brackey's provided (without) some of the options. Hello! Does anyone know how I would edit my code in order to filter out any refreshrates other than 60Hz? The code brackey's provided is down below: using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class OptionsMenu : MonoBehaviour { public Dropdown resolutionDropdown; Resolution[] resolutions; void Start() { resolutions = Screen.resolutions; resolutionDropdown.ClearOptions(); List options = new List(); int currentResolutionIndex = 0; for (int i = 0; i < resolutions.Length; i++) { string option = resolutions[i].width + " x " + resolutions[i].height; options.Add(option); if (resolutions[i].width == Screen.width && resolutions[i].height == Screen.height) { currentResolutionIndex = i; } } resolutionDropdown.AddOptions(options); resolutionDropdown.value = currentResolutionIndex; resolutionDropdown.RefreshShownValue(); } public void SetResolution(int resolutionIndex) { Resolution resolution = resolutions[resolutionIndex]; Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen); } public void SetFullScreen (bool isFullScreen) { Screen.fullScreen = isFullScreen; } } Note: If you were to build and run this using the tutorial above, you'd get multiple options of the same resolutions, because the refreshrate is recognized by the engine but isn't displayed via the options. My problem is that I'm all too new to programming and unity to figure out what to do in order to filter out the refreshrates from the options list provided to the player. Help? Thanks!
@g5fighter5 жыл бұрын
List options = new List(); int currentResolutionIndex = 0; for (int i = 0; i < resolutions.Length; i++) { string option = resolutions[i].width + "x" + resolutions[i].height + ":" + resolutions[i].refreshRate + "Hz"; options.Add(option); if(resolutions[i].width == Screen.currentResolution.width && resolutions[i].height == Screen.currentResolution.height && resolutions[i].refreshRate == Screen.currentResolution.refreshRate) { currentResolutionIndex = i; } } resolutionDropdown.AddOptions(options); resolutionDropdown.value = currentResolutionIndex; resolutionDropdown.RefreshShownValue(); public void SetResolution(int resolutionIndex) { Resolution resolution = resolutions[resolutionIndex]; Screen.SetResolution(resolution.width, resolution.height, Screen.fullScreen, resolution.refreshRate); }
@jorjolandes7 жыл бұрын
Ideas for your next videos: -Multiplayer -Use some database -Stuff related to smartphones I think most of your followers would like to see some of these topics
@bip9017 жыл бұрын
He has already done a tutorial about multiplayer. kzbin.info/www/bejne/i3yYaKSapsSfl80
@muhamadabutshtil49695 жыл бұрын
In the latest unity editor version the Dynamic int or Dynamic float are not exist. The Dynamic is not exist. It was fine in unity version 2018.4.5f1 personal but it's not exist in 2019.2.5f1 personal . Any ideas how to use now the SetVolume and SetQualit functions in the On Value Changed ?
@konihan5 жыл бұрын
public AudioMixer Audiomixer; public Slider slider; private void Start() { slider.onValueChanged.AddListener(SetVolume); } public void SetVolume(float targetVolume) { Audiomixer.SetFloat("volume", targetVolume); }
@imvanishr86415 жыл бұрын
konihan Could u also explain how to do it?
@MrMinemeet5 жыл бұрын
@@imvanishr8641 He uses a reference to that object to get the volume
@defoxik5 жыл бұрын
download new unity 2019.2.9f1 for dynamic float
@MikeyyMonty7 жыл бұрын
I was just looking for this! Thank you yet again Brackeys!!!!!
@deniversechannel96385 жыл бұрын
Volume settings and other functions will not working without using UnityEngine.UI;
@MVCentral5 жыл бұрын
Where do get the actual audio its supposed to play from?
@cristianinujazznight30442 жыл бұрын
Ultra thank you. I was developing with Godot and what you call "hassle", in godot its the easiest or correct way. Men I love Unity.