Outside of Camera View Destroy
So very quickly, I know many will say to use "OnBecomeInvisible()" but that doesn't work in this case. I'm making pong, and as a fail safe for the ball potentially escaping the play area, I want to...
View ArticleI have this problem : this is the error : Assets/ShotEject.js(7,24): BCE0043:...
#pragma strict var bulletCasing : Rigidbody; var ejectSpeed : int = 100; var fireRate : float = 0.5; private var nextFire : float = 0.0; private var fullAuto : false; function Update () {...
View ArticleTrying WaitForSeconds before Instantiating
So I'm making pong, and I'm trying to get it so that if the ball get's destroyed, there's like a half second before a new one gets instantiated so that the player can go from the bottom of the field to...
View Article2 Rigidbodies at rest collision detection issue
So here's my issue I need to detect when 2 or possibly more rigidbodies are touching so when I click on them they destroy based on their IDs My code works just fine if I click on them during the time...
View ArticleHow do I show ranking images at winning post in unity3d?
I am working on a racing game in unity in which I have to show ranking images as the winners reach or touch the winning post. How can I do this can anyone please sort it out then the help would be more...
View ArticleI want to change the transparency or visibility (alpha) with a UI button
Hi, I am trying to enable an UI Button, but I cant....I want to enable my script with the function (On Click) adding the Update function. But it doesn't work. Basically I want to change the...
View ArticleUnity 5 Shader : Pulsing Emission range via scripting
Im trying to get a pulsing emission shader with a randomiser to mimic the effect of a candle inside an object. I created the shader already and it works but when I applying the following code to the...
View ArticleGameObject deactivate but don't activate again
Hi, the GameObjects deactivate correctly, but after I deactivate them, they don't activate again. Anyone? function OnGUI () { GUI.Box (Rect (10,10,100,90), "LOD Menu"); if (GUI.Button (Rect...
View ArticleHow to make a player move up then forward using ontrigger enter collider?
I want my player to move up then forward when they jump inside a cube collider. There is a cube in front of the character.(He can see it) There is another cube at the top of that cube which has the...
View ArticleHow to hide/unhide a GUI image when character enters trigger.
Hey! Im pretty new to Unity and currently making a 2D platformer game. I want a GUI image to appear when my character enters a trigger box, i have placed the image in the scene and hidden it and...
View ArticleError : Unknown identifier : FlashLight
Hello, I recently created a life script of the battery of my lamp. Here it is : #pragma strict var flashLight : Light; function Start () { flashLight.GetComponent.().enabled = false;...
View ArticleHow to detect if iphone is being shaken by user (js)
Hi, Im trying to make a game like cookie clicker but i want the user to gain point when the phone is shaken. I cant seem to find anyway to do this and would like some help/example of how this can be...
View ArticlefireRate javascript?
I'm making a miniagme, were, you can shoot. I use this Firerate stript, and I don't know why it doesn't work: the scene start, I shot one time, and the x become equal to 0.511. I don't know why it...
View ArticleHow to change camera on trigger enter unity 5
Hi I am still learning unity javascript and i am trying to make it so when you walk into one collider the other cameras turn off. There are 4 in total and one collider for each. Can anyone help and...
View ArticleKeytool not found,,,i am new to unity, please help
Hello to all friends here. I am new here and this is my first post here. I hope you will help me. I am working on game and using unity for the first time. I just got a single problem; Keytool not found...
View ArticleHow to save and load lists and properties of Unity UI on Andorid?
Hello guys! In my project I was trying to save lists and Unity UI using UnitySerializer @whydoidoit. Well... on PC and MAC it works very well but on android it doesn't load at all and when it try to...
View ArticleGetting error on lap counter script JS
I am getting the following error Assets/LapCounter.js(4,13): BCE0034: Expressions in statements must only be executed for their side-effects. and i dont know why here is my script (i am a newbie)...
View ArticlePause Menu Issue (Black Screen)
Hi guys, I've been having an ongoing issue with trying to get any pause screen/menu to work in my game. I have tried out various tutorials with different UI methods and scripts but to no avail. The...
View ArticleTrigger not detecting tag
When a car passes though the trigger only my one should debug but the other cars with different tags debug and i do not know why? here is my script #pragma strict var Lap: int; function Start () { Lap...
View ArticlePlayer collects X amount of coins - Object is destroyed
Hi, I need a little help with coin collecting. I have that down so far with this piece of Javascript.... var coins : float; function OnTriggerEnter( other : Collider ) { if (other.tag == "coin") {...
View Article