cant pause/unpause audio on scene load.
I'm making a game with background music that I put and it works fine, but when the character in the game dies, the scene resets, and so does the background music. I used the following code on the parent that holds the music:
private static audioScript instance;
void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(gameObject);
}
else
{
Destroy(gameObject);
return;
}
}
this works by not resetting the music on scene load, but I also want the player to be able to pause or unpause it at any given time. but as soon as the first scene reload since game start, its like you cant change it what so ever. this made my so confused and frustrated for while and I need help to fix it.
if the fix is really easy and I have made yall disappointed, i'm sorry, I just started unity, give me a break, lol.
https://redd.it/1hw3f36
@r_Unity3D
I'm making a game with background music that I put and it works fine, but when the character in the game dies, the scene resets, and so does the background music. I used the following code on the parent that holds the music:
private static audioScript instance;
void Awake()
{
if (instance == null)
{
instance = this;
DontDestroyOnLoad(gameObject);
}
else
{
Destroy(gameObject);
return;
}
}
this works by not resetting the music on scene load, but I also want the player to be able to pause or unpause it at any given time. but as soon as the first scene reload since game start, its like you cant change it what so ever. this made my so confused and frustrated for while and I need help to fix it.
if the fix is really easy and I have made yall disappointed, i'm sorry, I just started unity, give me a break, lol.
https://redd.it/1hw3f36
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
Need help with game Ideas (AP CSP)
So my intro... I am a high school senior with almost no coding background. I am taking AP CSP class rn and learning C#. I only know little much rn. I have to make a 2D game for Create Task and submit by April. I have a idea to make a Pokemon card battle game. (maybe multiplayer if I am able to) I am mostly working alone so its gonna take too much time. so my question is Will I be able to make this game? or its too much for me. Also I would love the Advices and game ideas. Thank you so much y'all.
https://redd.it/1hw8hg6
@r_Unity3D
So my intro... I am a high school senior with almost no coding background. I am taking AP CSP class rn and learning C#. I only know little much rn. I have to make a 2D game for Create Task and submit by April. I have a idea to make a Pokemon card battle game. (maybe multiplayer if I am able to) I am mostly working alone so its gonna take too much time. so my question is Will I be able to make this game? or its too much for me. Also I would love the Advices and game ideas. Thank you so much y'all.
https://redd.it/1hw8hg6
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community
FREE - Easily animate TextMeshPro text with stunning, customizable effects! Available on Github as a Unity package.
https://redd.it/1hw8vrh
@r_Unity3D
https://redd.it/1hw8vrh
@r_Unity3D
Reddit
From the Unity3D community on Reddit: FREE - Easily animate TextMeshPro text with stunning, customizable effects! Available on…
Explore this post and more from the Unity3D community
This media is not supported in your browser
VIEW IN TELEGRAM
I made this stylized fire/smoke/waves Shader Graph (full graph + nodes/code) ✨
https://redd.it/1hvqn2n
@r_Unity3D
https://redd.it/1hvqn2n
@r_Unity3D
This media is not supported in your browser
VIEW IN TELEGRAM
What's the best way to create a wake or bubbles behind this little boat?
https://redd.it/1hwa3hy
@r_Unity3D
https://redd.it/1hwa3hy
@r_Unity3D
Making split screen platformer/metroidvania where you play as a trader helping nameless Hero to reach his goal and selling him items after every level!
https://redd.it/1hwc9v9
@r_Unity3D
https://redd.it/1hwc9v9
@r_Unity3D
Reddit
From the Unity2D community on Reddit: Making split screen platformer/metroidvania where you play as a trader helping nameless Hero…
Explore this post and more from the Unity2D community
Unity Version Control Not Working
my friend and i are trying to make an idle game and i setup a UI and a little code and then checked in the changes in "Pending changes". my friend received the incoming changes but when he tries to change to another changeset his scene is still empty with nothing in the hierarchy. plz help us
https://redd.it/1hwh249
@r_Unity3D
my friend and i are trying to make an idle game and i setup a UI and a little code and then checked in the changes in "Pending changes". my friend received the incoming changes but when he tries to change to another changeset his scene is still empty with nothing in the hierarchy. plz help us
https://redd.it/1hwh249
@r_Unity3D
Reddit
From the Unity2D community on Reddit
Explore this post and more from the Unity2D community