Skip to main content

Questions tagged [boolean]

A type of data with only two possible values, usually "true" or "false".

Filter by
Sorted by
Tagged with
0 votes
0 answers
691 views

In my game there is a game manager that interacts with all players and is able to change whether a player is actionable by accessing their script. However, the Game manager script simply refused to ...
kayra yorulmaz's user avatar
0 votes
2 answers
2k views

I'm making a player settings thing where the user can turn off or turn on the game music by clicking buttons. I had this script below and everything was working fine. ...
Matheson's user avatar
0 votes
1 answer
1k views

I noticed on a tutorial for unity someone used the code: private Animator animator; private bool isRunning = false; While further on, did: ...
Ronnie Lightweightbaby Coleman's user avatar
0 votes
1 answer
171 views

I am working on a gun script and it worked fine until earlier today when I made a change to the script and it stopped working. I put it back, but for some reason now the animator object attached to ...
Ethan K-B's user avatar
0 votes
1 answer
485 views

I have other scripts in the same project using boolean if statements that work fine, but I've tried multiple methods of testing if the if statements below are working and none of them worked! I don't ...
loverman's user avatar
0 votes
1 answer
36 views

hope you're all good.. I'm struggling with a simple toggle for inverting Y axis.. What i have works for my first scene but i'm trying to keep this setting through all scenes, hence why the script ...
hardwiredstudios's user avatar
0 votes
1 answer
242 views

I have an if statement inside of the Update function that is only called if three other conditions are met. The problem is that right now the function sets a boolean to true which causes the animation ...
alexo1001's user avatar
  • 145
14 votes
2 answers
32k views

Can you randomly choose a Boolean's value in Unity C#. I tried random.range, but it only works with floats. Here is an example of what I'm trying to do: ...
DubGamer87's user avatar
3 votes
1 answer
772 views

I read a few thing about, that in GLSL both sides of the if-clause is executed, so do you have any idea for a workaround for this one: ...
l'arbre's user avatar
  • 245