Quantcast
Channel: Questions in topic: "twice"
Browsing all 70 articles
Browse latest View live
↧

1st Problem: OnLevelWasLoaded, method is getting called twice. 2nd: Loading...

First Problem: As the title states, the method is getting called twice. I have a scene, which have 2 doors. These doors have a script attached to them which has the OnLevelWasLoaded. When I enter this...

View Article


How to quit game on double pressing back button?

I am trying to quit my game after pressing back button but its not working. Here is my code: public Canvas quitMenu; public Button startText; // Use this for initialization void Start () { quitMenu =...

View Article


Instantiating two prefabs instead one how to fix it?

Well hello Guys back with another problem. Im making some grenade throw thing but instead of one grenade but two grenades.. How to fix that. Here's my script. public class GrenadeThrow1 : MonoBehaviour...

View Article

Adding more points than needed !

Hello I created a point system which is working fine, but I have some issues. ***The main thing here that some times I have twice amount of points (1000 points) instead of normal (500 points) and I...

View Article

Choose from 2 audio Sources

Hello, i have an object with the audio source component twice. How can I choose what of the two to play? I tried using this, but it doesn't work audio.Play("Name");

View Article


Mouse click is detected twice

I'm trying to detect two different mouse click but only a single mouse click is detected twice, I don't know whats wrong with the code but I can't detect two separate mouse clicks bool click = true;...

View Article

Press a key twice

Hi all, Today I've got another problem: I'd like to do a double dash in mid air if (Input.GetKey(KeyCode.RightArrow)) { transform.Translate(Vector3(1, 0, 0) * Time.deltaTime * walkspeed); if...

View Article

Code executed twice

Hey guys, I need some help tracking a bug in my script. What I'm trying to do is to Instantiate an object in the scene after a delay of 3 seconds. The code works as it is, but sometimes the code...

View Article


Why are both seperate scripts being called together?

I have a script named weapon (default weapon of fists) attached to my fists object so that my fists can do a certain amount of damage and execute certain kinds of fist animations/sounds. Then I made a...

View Article


How can i reset unity to default?

Hello, i was messing with unity learning the program and i installed some assets from the store and when i went to install fpscontrol to see what it was all about it messed my unity up big time. i then...

View Article

Mecanim when call setTrigger, plays next clip twice

I am working on a simple 2D matching game. The facedown state is a simple animation that is 1 second long and loops. The idle state is for the card when it is face up. A 2 second animation loop plays...

View Article

Unity Building Game Glitch

Hi i was making my game in the unity editor and when i played it in the editor it was fine it was all working but when i go to build my game for mac i make it to the tittle screen fine but when i click...

View Article

After installing the .APK I see the app icon twice

So, I have this pretty peculiar issue. I create an apk with Unity and then install that APK with ADB and it installs just fine. After installation, I go to check the application list on the...

View Article


check if spacebar was pressed two times

yo guys how to count how many times i pressed the 'space bar' like : check if space bar was pressed two times then DO SOMETHING. thanks.

View Article

Animator Trigger Parameter Play Twice When Changing State(Animated GIF)

Hi Guys, I'm making a weapon stance and it works but there is a problem... ---------- ![alt text][1] [1]: http://oi62.tinypic.com/21l7jo2.jpg ---------- As you can see the animation "idleA" is playing...

View Article


GetComponent Variable Referenced Twice

I'm making a fighting game that uses three main scripts per character. There's the stats, control, and projectile scripts. The stats and control both go within the character while the projectile script...

View Article

Code behaves unexpectedly when not in FixedUpdate

Hi, my problem is that part of my code behaves in a strange way sometimes, not as logically would expect from reading the code. After a bit of messing with the code I tried using a fixed update instead...

View Article


Unity new GUI, how to nicely trigger grouped toggleButton callback

Hi, I have issues when connecting a function into *On Value Changed* callback : I have a **Panel**, with a **"Toggle Group"** component, which contains two **toggleButtons**, that work exclusively. In...

View Article

Int increased twice and not only once

Hi, I have a scoreboard in my simple football game, and i want to increase team's score by 1 when the ball passes the goal line. But when it goes in the cage, the score increases by 2, like 0-0 to...

View Article

Json Deserialize

Hello everyone, I have project which uses Json data, I try deserialize a Json data like this :...

View Article
Browsing all 70 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>