I do not know whether you have a detailed tutorial on input actions and Unity's new input system. I strongly suggest you do that, as your workflow might helps 1000s of developers. The others that I have watched are require confusing.
I really love your tutorials. They always seem to have a rather elegant solution with great explanations. I always try to watch these even if they aren't immediately relevant to me just to get exposure.
Notifications actually worked instantly for once, haha. Usually it takes RUclips a good 30-60 minutes before sending me notifications. Anyways, Time to watch!
Nice work. I came to similar conclusions in my work with inputs, player and menu. The use of the asset of the InputSystem in both player and menu circumvents a problem i had that occurs when using the auto-generated C# code for the InputSystem. When using a serialized reference to the assets, all scripts are working on the same instance. When using the generated C# version for the playerinput and the asset reference in the "Actions Asset" field of the "Input System UI Input Module" Script, the two will use separate instances of the asset, which makes sense, because one is deserialized while the c# version is created by new InputStuff etc. However, the C# class has a field "asset" which can be assigned to the "Input System UI Input Module" Script, which assigns the same instance of the asset to both uses. That is pretty simple, if you use an InputManager as shown in this video. Weirdest bug i had with time and pause was that i heard a "landing sound" every time i ended pause. Turns out, the Unity CharacterController "isGrounded" always returned false when time was 0.0, so every time i pause the game the movementScript was like "okay, now he's jumping ,....and now he landed!". No idea if that bug is fixed, but follow this videos advice and disable and enable movement when the game is paused ;-)
How would you recommend managing multiple menus and pause/unpause. For example if a quest screen pops, game pauses then the player opens the main in game menu which calls pause twice. If one of the two menus are closed then the game will unpause with one menu open still.
Hi, when the timescale is set to 0, the coroutine will be stopped, too. How can you deal with it? Sometimes, you need the coroutine to do something on the UI, like control an audio effect (fade in/fade out) or control UI animation. Thanks!
Do you use a PC or Mac, and do you ever run into glitches or bugs within Unity itself? How do you deal with and are you concerned with potential reference cycles and/or memory leaks in your game?
as a godot dev, is there really no built in pause functionality in Unity? In godot you can just set a global "paused" variable to true and the games paused (except of course objects tags as not pauseable, like the pause menu) and it just pauses like you'd expect, scripts, player input, physics, even shader effects if you have that checked. You can even pause individual objects like that in the newest version
I think that's because what "pausing" means can vary from one project to another. Things that should stop working or work differently are subject to design decisions. Not necessarily I want a default "deactivate everything under that tag".
@@OIndieGabo for design flexibility i think godot's system is still ahead of needing to do it manually in unity, since you can flag individual objects to never pause, be always paused, only process when the game is paused, and only pause with the game, and do whatever the parent object does. With unity's way of doing things, i'd either have to rebuild what godot already does, or just keep adding parameter after parameter for everything i want to be paused and un-paused. At any rate, tho, godot can also set engine speed to 0 and run scripts to reject input and physics manually, so it's not like it's a locked in sort of thing anyways
@@X-3K don't get me wrong. I love some handy ready to use stuff... I just think that the whole "pausing" problem is pretty easy to handle in all majority of scenarios... you broadcast the information and whoever is subject to pausing will perform what must be done. And for these tasks Unity has pretty handy stuff out of book also. Time, Inputs disabling and more are very easy to handle and you just need to tell the engine when to do stuff based on your definition of pausing.
@@OIndieGabo yeah, pausing is a problem that's pretty easy to handle, which is why i'm surprised it's not built in, like 98% of all pausing i've seen and made in games is pretty much just "freeze everything except this one menu", so for a game engine, being able to cover a 98% scenario that's pretty much present in almost all games from all genres seems like a no-brainer, *especially* for one of the largest game engines in the industry and it's not like built-in pausing is mutually exclusive to manual pausing, i can still manually script godot for that final 2% of more niche pause mechanics and implementations, but it just puzzles me that such a standard feature isn't present such a standard game engine, especially since the competing engines (unreal and godot) both have it built in
I do not know whether you have a detailed tutorial on input actions and Unity's new input system. I strongly suggest you do that, as your workflow might helps 1000s of developers. The others that I have watched are require confusing.
Aaah so THATS how you swap the player's controls to UI controls lmao. Wasn't looking for that, but nonetheless very helpful.
I really love your tutorials. They always seem to have a rather elegant solution with great explanations. I always try to watch these even if they aren't immediately relevant to me just to get exposure.
Dude, you have been such a tremendous help. I hope your channel continues growing. :)
Notifications actually worked instantly for once, haha. Usually it takes RUclips a good 30-60 minutes before sending me notifications.
Anyways, Time to watch!
Nice work. I came to similar conclusions in my work with inputs, player and menu.
The use of the asset of the InputSystem in both player and menu circumvents a problem i had that occurs when using the auto-generated C# code for the InputSystem.
When using a serialized reference to the assets, all scripts are working on the same instance. When using the generated C# version for the playerinput and the asset reference in the "Actions Asset" field of the "Input System UI Input Module" Script, the two will use separate instances of the asset, which makes sense, because one is deserialized while the c# version is created by new InputStuff etc.
However, the C# class has a field "asset" which can be assigned to the "Input System UI Input Module" Script, which assigns the same instance of the asset to both uses. That is pretty simple, if you use an InputManager as shown in this video.
Weirdest bug i had with time and pause was that i heard a "landing sound" every time i ended pause. Turns out, the Unity CharacterController "isGrounded" always returned false when time was 0.0, so every time i pause the game the movementScript was like "okay, now he's jumping ,....and now he landed!". No idea if that bug is fixed, but follow this videos advice and disable and enable movement when the game is paused ;-)
I love this tutorial!
glad you liked it!
Would be nice to talk about moving enemies, physics objects, fx etc...
you're the goat
I thought this video would have a lot more of likes and views lol, really useful, it will get them.
How would you recommend managing multiple menus and pause/unpause. For example if a quest screen pops, game pauses then the player opens the main in game menu which calls pause twice. If one of the two menus are closed then the game will unpause with one menu open still.
Hi, when the timescale is set to 0, the coroutine will be stopped, too. How can you deal with it? Sometimes, you need the coroutine to do something on the UI, like control an audio effect (fade in/fade out) or control UI animation. Thanks!
Say you are working on a simple game and you want to pause the game because a cutscene is playing. How would you pause it then?
Probably a bit late but why would you pause the game when a cutscene is playing? just disable the input action for the duration of the cutscene.
I don't have any event system in my project since I use UI Toolkit, do I still need to setup whole UI input map like in a video?
Do you use a PC or Mac, and do you ever run into glitches or bugs within Unity itself?
How do you deal with and are you concerned with potential reference cycles and/or memory leaks in your game?
what if i use third person and camera stil moving how can i fix it?
as a godot dev, is there really no built in pause functionality in Unity? In godot you can just set a global "paused" variable to true and the games paused (except of course objects tags as not pauseable, like the pause menu) and it just pauses like you'd expect, scripts, player input, physics, even shader effects if you have that checked. You can even pause individual objects like that in the newest version
I think that's because what "pausing" means can vary from one project to another.
Things that should stop working or work differently are subject to design decisions. Not necessarily I want a default "deactivate everything under that tag".
@@OIndieGabo for design flexibility i think godot's system is still ahead of needing to do it manually in unity, since you can flag individual objects to never pause, be always paused, only process when the game is paused, and only pause with the game, and do whatever the parent object does.
With unity's way of doing things, i'd either have to rebuild what godot already does, or just keep adding parameter after parameter for everything i want to be paused and un-paused.
At any rate, tho, godot can also set engine speed to 0 and run scripts to reject input and physics manually, so it's not like it's a locked in sort of thing anyways
@@X-3K don't get me wrong. I love some handy ready to use stuff... I just think that the whole "pausing" problem is pretty easy to handle in all majority of scenarios... you broadcast the information and whoever is subject to pausing will perform what must be done.
And for these tasks Unity has pretty handy stuff out of book also. Time, Inputs disabling and more are very easy to handle and you just need to tell the engine when to do stuff based on your definition of pausing.
@@OIndieGabo yeah, pausing is a problem that's pretty easy to handle, which is why i'm surprised it's not built in, like 98% of all pausing i've seen and made in games is pretty much just "freeze everything except this one menu", so for a game engine, being able to cover a 98% scenario that's pretty much present in almost all games from all genres seems like a no-brainer, *especially* for one of the largest game engines in the industry
and it's not like built-in pausing is mutually exclusive to manual pausing, i can still manually script godot for that final 2% of more niche pause mechanics and implementations, but it just puzzles me that such a standard feature isn't present such a standard game engine, especially since the competing engines (unreal and godot) both have it built in
Good! Wish you luck!
First
First
First