Тёмный

How to make AWESOME Scene Transitions in Unity! 

Brackeys
Подписаться 1,8 млн
Просмотров 944 тыс.
50% 1

Опубликовано:

 

28 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 779   
@MrNerd-ll9my
@MrNerd-ll9my 4 года назад
Just a reminder that you're literally the reason that a huge amount of game designers are able to do what they love.
@paramveersingh8615
@paramveersingh8615 3 года назад
So True !!!
@windwakin
@windwakin 3 года назад
@@paramveersingh8615 I second this statement!
@PepsiFruit
@PepsiFruit 4 года назад
"the first thing we are going to do" 2:11 "now we are ready to animate" 4:36 "let's go ahead and create a level loader script" 9:20 "All of the code we are going to need" 13:48
@UnitCodesChannel
@UnitCodesChannel 4 года назад
PepsiFruit commenting so its more visible
@riqb837
@riqb837 4 года назад
Obrigado!🇧🇷
@josepgc1183
@josepgc1183 4 года назад
I dunno man having a comment like this is a bit insulting when the video isnt even that long and you can skip around on your own
@mannou38
@mannou38 4 года назад
@@josepgc1183 let's say, you tried doing this on your own, but came across an error while coding. do you really think, everyone wants to spend 13 minutes just to get one single error fixed, when you could've fixed it in less than 3 minutes. Timestamps are not "insulting", they are just for people that want to speed up the process. Edit: I could go way in depth, but I just don't want to waste my time on someone that is serious about timestamps insulting the creator, I'll just skip to the end💀
@RetroAnt3
@RetroAnt3 4 года назад
@@mannou38 outplayed
@aaronperron
@aaronperron 4 года назад
this guy is like the nicest drill sergeant. Plowing through the tutorial with no mercy in the most efficient way.
@Dexigon
@Dexigon 4 года назад
I swear, every time I need to add something to my Unity game, you make a video about it on the same exact day.
@RedNeckJewsus
@RedNeckJewsus 4 года назад
same
@GymCritical
@GymCritical 4 года назад
Same, I was just stressing on it.
@_Vesper
@_Vesper 4 года назад
Me too!
@Nox__
@Nox__ 4 года назад
Me too it always happend
@danielwalter5436
@danielwalter5436 4 года назад
Look for a @Brackeys package in your package manager. Now you know why.
@alejolab
@alejolab 4 года назад
I accidentally found a way to make cool transitions (for a cancelled game long ago). Create a bunch of angled boxes with a flat black material covering the whole view of the camera, then animate the near clip plane and that's it. (if you need to have objects near the camera in your game use a second camera to render only the transition) The first transition I created was a bunch of regular boxes 45º to the camera, it looked like a lot of small triangles growing on the screen until filling it completely. Then I moved some rows a bit closer so the some small triangles would appear first creating in a swiping effect. After playing a lot with the concept I ended up creating a custom model in Blender to have a very cool looking transition with shapes swiping and growing from different angles. The possibilities are endless and they are very fast to create.
@KapybaraKSP
@KapybaraKSP 3 года назад
Y'know... When I started I'd have to come to this channel to understand EVERYTHING... Now... I added this feature to my game entirely by my self, making educated guesses from what I previously knew and it worked first time. I have you to thank for this, I actually have learned and made progress on what will be my first fully complete, fleshed out and time consuming project. I'm going all out on this game, but it's not something I plan to release in a month, but probably two years to give me enough time, and that's because of everything I've learnt from you!
@zetsufir
@zetsufir 4 года назад
Ps: using the animator on a UI canvas "dirties" it even if nothing is going on because of the transform of the UI elements are being changed by the animator per frame; causing a recompute of all another elements in the same canvas which gets hairy in complex hierarchies. A good practice to improve performance is to make your scene transition in another canvas rather than the one in your UI and toggle on/off when needed.
@OlivierPons
@OlivierPons 3 года назад
When you disable a canvas, everything instant disappear.... and my solution is the opposite of yours (if your transition is in a second canvas (= you already had one), be careful to put your transition into your first canvas otherwise it wont work (Unity v2021.1.7)) but you are probably right: just showing a basic menu will eat up all the phone's battery... I have no simple solution for this. Maybe insert the "transition canvas" in CSharp when you want to fade out?
@moosesnWoop
@moosesnWoop 3 года назад
This channel still provides value. I think for the next 10 years, it's going to provide a lot of value.
@iangraham6730
@iangraham6730 4 года назад
I just can't get enough of Brackeys!!
@KrazyKain
@KrazyKain 4 года назад
This is brilliant, I love how once it's set up you can create just about any transition as long as you can make it in the animator. Definitely something I'll be making use of.
@ralphcalzada4767
@ralphcalzada4767 3 года назад
i started game dev because of this channel
@TheJacobKing44
@TheJacobKing44 3 года назад
If anyone is having trouble: remember when animating to select the crossfade object to create the animation, right click the animation tab and LOCK IT, then record and change the Image alpha. Been stuck trying to do this for about an hour xD
@midsummer407
@midsummer407 Год назад
thank you
@Rambokala
@Rambokala Год назад
Thanks man
@lordpickaxe788
@lordpickaxe788 3 года назад
Your clip of Bercow shouting Order had me ROFL - it was so unexpected and awesome!
@travelsizedlions
@travelsizedlions 4 года назад
If you don’t want to use a coroutine for some reason, another way you can do this is with keyframe events. From your script, have a method that starts the animation. Then, on the last keyframe of your animation, set up an event that will fire off a method to load the next level.
@muscatalexj
@muscatalexj Год назад
This sounds cool, do you have an example snippet of code for this?
@TurboAlligator
@TurboAlligator 4 года назад
For some reason my animation plays, and then the scene doesn't transition. any help would be nice. thanks! (unity version and code --> ) 2019.2.2f1, using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class LevelLoader : MonoBehaviour { public Animator transition; // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.G)) { LoadNextLevel(); } } void LoadNextLevel() { StartCoroutine(LoadLevel(SceneManager.GetActiveScene().buildIndex + 1)); } IEnumerator LoadLevel(int levelIndex) { //play animation transition.SetTrigger("Start"); //wait for it to stop yield return new WaitForSeconds(1f); //pauses coroutine for 1 second } }
@GBrayJ
@GBrayJ 4 года назад
Try This: using UnityEngine; using UnityEngine.SceneManagement; using System.Collections.Generic; using System.Collections; public class Start : MonoBehaviour { public Animator transition; // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.G)) { LoadNextLevel(); } } void LoadNextLevel() { StartCoroutine(LoadLevel(SceneManager.GetActiveScene().buildIndex + 1)); } IEnumerator LoadLevel(int levelIndex) { //play animation transition.SetTrigger("Start"); //wait for it to stop yield return new WaitForSeconds(1f); //pauses coroutine for 1 second SceneManager.LoadScene(levelIndex); } } You are just missing the SceneManager.LoadScene(levelIndex);
@TurboAlligator
@TurboAlligator 4 года назад
Anonymous Crab it works thanks! I can’t believe I was so dumb
@Crystallizedddd
@Crystallizedddd 2 месяца назад
@@TurboAlligator turbo i goeilla tag to
@MinhocaMortifera
@MinhocaMortifera 4 года назад
11:16 In my case I used a animation event in the last frame of the animation, but is good know other way of time control! 😁
@Brackeys
@Brackeys 4 года назад
That is also a good way to do it! :) Just need to make sure that the script is on the same object as the animator!
@leozhang1340
@leozhang1340 4 года назад
@@Brackeys Hello sir! My team is struggling with making a viewing frustum for the AI in a top down 2d game. Could you please make a tutorial on that? I see a lot of complicated math involved and would love to see it being broken down and made easier. Your other top down tutorials were excellent! Please consider making this one if you can. Thank you!
@andrewm4815
@andrewm4815 4 года назад
Dude you are on a roll with these videos.
@hamzaelshennawy3429
@hamzaelshennawy3429 4 года назад
My words can not describe how much I want to thank you for what you did to me, you really did help me to improve my life. When I start to earn money, first thing I will do is donating 100$ to your website. Really thank you.
@ruler1559
@ruler1559 4 года назад
Can you make a grappling hook tutorial?
@Hotbotch
@Hotbotch 4 года назад
Would be helpful
@steeviee
@steeviee 4 года назад
Check out Dani, he made one
@enpeacemusic192
@enpeacemusic192 4 года назад
Maybe 2d
@BryceStandley
@BryceStandley 4 года назад
Thought i would mention you can also use Invoke("method name", float in seconds) to add a delay to a method being triggered as well
@IndieMarkus
@IndieMarkus 4 года назад
Interesting to see you remake a video about something you already did 2 years ago less elegantly. If you go through the trouble of creating a loading screen, then please do the async method for performance's sake.
@yehya2715
@yehya2715 4 года назад
The best game Developer in youtube.
@renevaldez7481
@renevaldez7481 3 года назад
This was such a great help thank you so much
@mdspits
@mdspits 4 года назад
I liked the vid because of the ORDER!!!
@fozzythealbino
@fozzythealbino 3 года назад
Wow. Just saved me days of guessing and playing around. Especially the animator override.
@tejasbele1456
@tejasbele1456 3 года назад
Thanks Brackeys
@MiddleCross378
@MiddleCross378 4 года назад
Awesome tutorial as always. I ran into a bit of an issue, when I was loading one of my scenes, it just stayed black. I wasn't getting any errors oddly enough. I found out that my scene was named something like "FirstScene" but I was trying to load "FirstScene1" so it was just loading a black screen. So if anyone is having that issue, double check your spelling and references. Hopefully it'll help someone.
@adrianbosborne
@adrianbosborne 4 года назад
Hey Brackeys, can you please do a tutorial on active ragdolls. There are no good videos about it anywhere! Thanks.
@sujayisarani8275
@sujayisarani8275 4 года назад
pls make a video on good colors to use in games
@MatthewTaylor86
@MatthewTaylor86 4 года назад
Was not expecting to see John Bercow in this video!
@moonwatchereclipse5291
@moonwatchereclipse5291 Год назад
Thank you so much Brackeys! I love your channel so much :)
@luislodosm
@luislodosm 4 года назад
Nice solution.
@Oxmond
@Oxmond 4 года назад
Cool! 😎👍
@Oxmond
@Oxmond 4 года назад
Nice and easy! Canvas Group rules! 🤘🤓🤘
@teknolojidelisiasdf9703
@teknolojidelisiasdf9703 4 года назад
I wish unreal engine 4 had c++ tutorials like this.
@hriday684
@hriday684 4 года назад
This is C, not C++
@teknolojidelisiasdf9703
@teknolojidelisiasdf9703 4 года назад
@@hriday684No its c# but i meant I wish ue4 had tutorials (of c++) like this.
@Lukas-vv6um
@Lukas-vv6um 4 года назад
Yay another vid! I needed this
@mokigames1818
@mokigames1818 4 года назад
That Animator Override Controller is pretty interesting....
@bobi-ne5959
@bobi-ne5959 3 года назад
Learned!
@kshitizyash9515
@kshitizyash9515 2 года назад
Thankyou for all your effort your are amazing😍😍
@qulammirzazade8517
@qulammirzazade8517 Год назад
We want Brackeys backk!
@mehmedcavas3069
@mehmedcavas3069 4 года назад
Brackeys you should also make a tutorial for the new DOTS implementation :)
@GameDevHQ
@GameDevHQ 4 года назад
Great way to do it!
@NathanAHH
@NathanAHH Месяц назад
I love you so damn much
@StarGazerTom1991
@StarGazerTom1991 4 года назад
Wow, that's actually alot easier than I thought it would be. I'm going to practice with a few of these over the next few weeks for my game :)
@gameexplorer4963
@gameexplorer4963 4 года назад
Very very useful! Thanks!
@mustafaaljanabi4818
@mustafaaljanabi4818 4 года назад
I had a lot of troubles, problems, and errors in the app, so, *I'm sad*
@rebellevi1935
@rebellevi1935 4 года назад
could you please do a tutorial on wall running, nobody makes videos as good as you do and i really need it for my game.
@NilsMoller
@NilsMoller 4 года назад
Perfect timing for this! Could you make a video on customizable controls using the new input system? Can't figure it out for the life of me
4 года назад
FIRST ONE! YOU DO AWESOME VIDEOS!
@desmondmies3095
@desmondmies3095 4 года назад
That was helpful thank you GOD !
@omarfarhaneh1681
@omarfarhaneh1681 4 года назад
WOOOOOW VERY PERFECT
@SaudBako
@SaudBako 6 месяцев назад
Now you know how to make this exact transition for this exact game. Next: actually learn to use the Animator and SceneManager.
@ralphofficial7794
@ralphofficial7794 4 года назад
Hi @Brackeys ! You know this tutorial is good and all but it doesnt works in a main menu screen. Pls help. SOS
@foreign-livingtheamericand8782
@foreign-livingtheamericand8782 2 года назад
amazing
@clamum
@clamum 4 года назад
I used DoTween to fade to black, and back again, in my game. Super simple to do; like one line of code to fade and one line to fade back. Well I should say my coworker did it. I'm too much of a Unity noob to do much lulz.
@kutayfunk
@kutayfunk 4 года назад
This channel is El Dorado.
@mapachu6959
@mapachu6959 4 года назад
Nice... lo que estaba buscando :3 thank you for your time
@brunopinheirobrazil5352
@brunopinheirobrazil5352 4 года назад
Could you please teach us how to cloth in blender, and import to unity properly?
@Beengus
@Beengus 4 года назад
I NEED THIS!!!!
@oscarbachmann9192
@oscarbachmann9192 3 года назад
EveryTime I shoot I move to the next scene nice
@Claudiopo_1
@Claudiopo_1 4 года назад
really really cool
@SnakeEngine
@SnakeEngine 2 года назад
Ok, this is nice but basic. Any ideas on how to do transitions which combine/operate on both scenes at once?
@ZeroStas
@ZeroStas 4 года назад
My animation that should play when level starts doesn't appear but it sure does fade to black when level ends.
@wepear4512
@wepear4512 2 года назад
sooooooooooooooooooo good
@Broockle
@Broockle Год назад
"Scale with Screensize" First thing that was said already changed my whole setup lol
@raynerhandrian1486
@raynerhandrian1486 4 года назад
Can you make a tutorial video about Volumetric Cloud use Shader Graph?
@palvelusmusic
@palvelusmusic 2 года назад
that's cool, but how do i make it so when i click on like options, then it wont do the transaction?
@Therealldark-1
@Therealldark-1 4 года назад
THAAAAAAAANKKSSSSSSS I am working on a game and this will help me
@JennHernes
@JennHernes 3 года назад
I love how much fun you guys seem to have had editing the intro to this video :D It's so fun
@stephenmiu
@stephenmiu 4 года назад
Awesome! This's amazing!
@theletterc7325
@theletterc7325 4 года назад
Do you think they should host a game jam where contestants can only use assets from Brackeys’ website?
@Squirrel_404
@Squirrel_404 2 года назад
3:56 you can remove the rgb keyframes so that there's only the alpha
@josebarria3233
@josebarria3233 4 года назад
What about a blend transition? I was always curious about that
@aadilgoyal4198
@aadilgoyal4198 4 года назад
If you go to 17:32 and turn on captions you are going to see a new kind of "Dinosaur"
@milosauvage2893
@milosauvage2893 23 дня назад
comment je fais si je ne veux pas que l'animation ce joue au debut mais que quand je change de scene ?
@Taterzz
@Taterzz 3 года назад
oh neat a simple tutorial to make transitions. wait 19 minutes what but more importantly, can i star wipe?
@cme9879
@cme9879 Год назад
This is great! I'm trying to make a game where I want to pass data between scenes, is that possible with this method?
@TheKsbdude
@TheKsbdude 4 года назад
Is there a way to do scene transitions like this for a VR game?
@computerwundsam
@computerwundsam 4 года назад
Hostinger is just the most Austrian name I've ever heard
@robertpietraru1939
@robertpietraru1939 4 года назад
I see comments from 20 hours ago, but I got notification 2 min ago
@hamiebrooklyn
@hamiebrooklyn 4 года назад
Brackeys please make an tutorial on enemy that attacks you and ur character die. In 2D, cuz im making a game and thats what i need ;D
@יהונתןרועילוי
@יהונתןרועילוי 3 года назад
10:27 Karen sees a scene... Call the SCENE MANAGER!!
@matthewsarmiento3704
@matthewsarmiento3704 Год назад
This is a great tutorial and will be very useful in my progress. But can you explain how can I apply this crossfade transition to a button in my main menu?
@ethanhaynes2107
@ethanhaynes2107 Год назад
you figure it out? bc idk how to
@muscatalexj
@muscatalexj Год назад
Did you ever figure this out?@@ethanhaynes2107
@adolfjamesurian6510
@adolfjamesurian6510 3 года назад
Is it neccessary to make a timer out of ienumertor?
@ianhtexas
@ianhtexas 4 года назад
Would it be easier or idk simpler to just play the animation in reverse, like speed -1 or something? Maybe not in some cases, depending on what it’s doing
@Collcroc123
@Collcroc123 4 года назад
How would I want to do a black fade in and out in VR? Would I put the black screen right in front of the VR player's face?
@mygamedevjourney3516
@mygamedevjourney3516 3 года назад
@15:25 it's literally a circle haha
@neer3686
@neer3686 4 года назад
Can you make a video about enemies in the background for 2d platformers
@feline2024
@feline2024 3 года назад
What kind of desktop Computer do you use I’ve kept my laptop top for 4 years and the processing power is almost done for
@rakharuan
@rakharuan 4 года назад
please help : the variable of transition has not been assigned
@Kaikina
@Kaikina 4 года назад
I have a problem.. In my second scene, I reference a TextMeshProGUI that will print some dialogue. When I play this second scene directly, no errors. But if I load the first scene first, I instantly get a NullRefException saying that my object can't be found. I don't know how to fix it. Looks like some objects takes longer to load, or dunno.
@GeorgeWulfers_88
@GeorgeWulfers_88 4 года назад
You are probably not setting the text variable on both scenes and you are probably also not checking for this text mesh pro variable to be empty or null, therefore crashing your application when trying to access this object. Make sure that before you use it you do the following// if(textMeshLabel != null) {textMeshLabel.text = "whatever text you want here"; } This will protect your code from accessing invalid data and crashing. I hope this helped. If this was not the issue then make sure to explain it further.
@ilyf5899
@ilyf5899 4 года назад
Can you do “how to slide in unity” or “how to make an enemy follow you on sight in unity”?
@RegahP
@RegahP 4 года назад
You just gotta make the enemy constantly or every second shoot out a raycast towards your direction and if there isn't any obstacle in the way, then turn on the enemy agent, assuming you already got the navigation mesh setup stuff done, which btw i think brackeys has a video on it too.
@ilyf5899
@ilyf5899 4 года назад
Regah Productions can you link it? (And I started for like 2 days ago with unity so what you just said, I didn’t understand anything 😂)
@QuincyIsCrispy
@QuincyIsCrispy 4 года назад
Are you using 3d? If so: You could try making a cone shaped object and attach it to the enemy. Then, check for collisions with the player tag / layer. If a collision does occur, then set the player's position as a target and get the enemy to follow that position. This would be better than a raycast since it allows for line of sight. As in the enemy can't lock on to you if you're behind him. Alternatively, if you did want 360 degree vision, using an overlapsphere with a player layer bitmask may be better as they are more performant.
@ilyf5899
@ilyf5899 4 года назад
Regah Productions sorry for not responding, but yeah I have a discord and it will be a pleasure if u could help me (I’m 11 years old btw)
@ilyf5899
@ilyf5899 4 года назад
QuincyIsCrispy I didn’t understand anything because I started with unity for 2 days ago but still thx 🙏 never got this much reply’s and help before (my lesson learned: be early to comment otherwise no1 is gonna see it)
@Pathetic_Dart
@Pathetic_Dart 4 года назад
Brackeys, I have a question. Do you also create godot tutorials?
@konradjanuszewski3396
@konradjanuszewski3396 4 года назад
Nice video! I did I think everything the same (just I put the input to change level on my levelCompleteChecking script, but... works only fade in animation at the beginning of new level(scene), so fade out (from scene graphic till black screen) doesn't work.. not sure what Im doing wrong. One thing I noticed that Crossfade animator controller wasn't atumatically created, so I had to create it manually (maybe its because of a bit older unity version?)..
@martin-gaming
@martin-gaming 4 года назад
But every time i reload the Scene the half animation ist playing.
@shlok975
@shlok975 4 года назад
this happened to me too.but i found the solution:we have three canvases namely scene1canvas,loading screen canvas,screen2canvas.in scene1 and scene2 canvases go to render mode and set them to screen space- camera.then in the new slot for camera that appears,drag the main camera.make sure loading screen canvas is in screen overlay render mode,that should do the trick.
@nadeemmeister
@nadeemmeister 4 года назад
Why dont you try making an iphone app?
@holdpresents
@holdpresents 4 года назад
How to make the animation to dosen't play when i start the game
@ElighneArkaine
@ElighneArkaine 4 года назад
Hey @Brackeys!, been watching your videos for a while now (almost a year, i think) so very new here, but i was just re-watching this, but stumbled upon something called 'tweening'. At which levels on performance do you think its worth? could you make a video to share some light on the matter?
@GeorgeWulfers_88
@GeorgeWulfers_88 4 года назад
Can you provide a link to this? I know I have used something similar in a professional capacity for some mobile games and just want to be sure it is the same one before I say that it is good or nor. :)
@GBrayJ
@GBrayJ 4 года назад
UnassignedReferenceException: The variable transition of Start has not been assigned. Why does this happen..?
@ha123461
@ha123461 4 года назад
Woo ho !!
@just.tiramisu
@just.tiramisu 4 года назад
I am so happy your channel exists, i wouldn’t even be able to use unity without your channel
@UnitCodesChannel
@UnitCodesChannel 4 года назад
Phoenix Gude True
@UCWjF-rlGGWBHxEPLGJXZBoA
@UCWjF-rlGGWBHxEPLGJXZBoA 4 года назад
Phoenix Gudhello
@Hotbotch
@Hotbotch 4 года назад
He best channel
@UCWjF-rlGGWBHxEPLGJXZBoA
@UCWjF-rlGGWBHxEPLGJXZBoA 4 года назад
s mornningshana:-)
@ssojyeti2
@ssojyeti2 4 года назад
literally had this exact thought
Далее
100 UNITY TIPS!!! 🔥
11:53
Просмотров 526 тыс.
ПОЮ ВЖИВУЮ🎙
3:19:12
Просмотров 878 тыс.
Почему?
00:22
Просмотров 150 тыс.
11 ming dollarlik uzum
00:43
Просмотров 625 тыс.
The Most Valuable File Format You've Never Heard Of
15:33
PAUSE MENU in Unity
12:13
Просмотров 988 тыс.
SAVE & LOAD SYSTEM in Unity
18:20
Просмотров 1,1 млн
Escaping Unity Animator HELL
18:18
Просмотров 509 тыс.
HOW TO PLAYTEST!
11:15
Просмотров 220 тыс.
The Future of Game Development
8:58
Просмотров 1,2 млн
How to program in Godot - GDScript Tutorial
58:10
Просмотров 676 тыс.
ПОЮ ВЖИВУЮ🎙
3:19:12
Просмотров 878 тыс.