My underwater script how do I check if a gameobject is active?
So I'm creating a underwater script for my survival game and for the torch when I go underwater I want the torch to despawn.... this part of the script works but my only issue is, is checking if the...
View Article[fixed] My physics.raycast vision doesn't work as I expect it to, and I don't...
(Leaving this up for the sake of anyone else making the same mistake as me.) I've spent several hours trying to get this to work; looking at forums and other people's issues, and I still can't figure...
View ArticleHelp with bullet going in the dirrection fired from view of camera??
so here is my shooting script i have it set to shoot forward but im having a hard time getting it to move the direction the camera is facing/ even have it fire from the camera direction view. var...
View ArticleGetComponents array in C# error ?
Hello I was wondering if in C #, you can change the variables of each script from an array and not by GameObject.Find ("myobject"). GetComponent ()? In Javascript I do it and it worked! var...
View ArticleIndexOutOfRangeException: Array index is out of range.
Okay guys, so I am testing some multiplayer stuff and one of them is placing a house in a terrain. I am new to Unity and coding, so please if you could explain to me why is this error happening and...
View Articletransform.eulerAngles.z runs once
So i have a script that a player can rotates its vechile, Using acceleration. I wanted for player to rotate max at 130 dgrees Z and min 45 dgrees, the default rotation is 90 dgrees,I use...
View ArticleCan not get my raycast to detect an object
So I have a raycast script attached to an empty game object I can see the Debug.DrawRay but when my player walks into it the debug.log does nothing here is my code: function Update () { Debug.DrawRay...
View Articlecamera movement in javascript
i am creating a basic roguelike top down game, and i am very new to unity, and game development in general, i have a basic understanding of javascript, and i would like to know how to get smooth camera...
View ArticleScene Change
Hi there. I want to change the scene by hitting a trigger. That works good, but my Player only appears where i set the Player-Prefab in the new scene. I need to take over some scriptvalues like lists...
View ArticleAdding Object reference to a list
Hi, I'm stuck on a seemingly simple problem. I'm trying to implement an Action-System for Game Characters. Every Action is a GameObject, theat gets dynamically instantiated. The Action is then added to...
View ArticleHow to disable LockTexture in case of LEVEL UNLOCK SYSTEM IN UNITY?
am building a game consist of 8 level. I use the following script to switch next level. But when i unlock a level the Lock Texture still remain in the window. I want to remove the lock texture when i...
View Articlechange Toggle/isOn
I cant seem to figure out how to call the Toggle.isOn. Character walks on object and icon changes from grey to color. I figured this was the isOn command but keep getting. >...
View ArticleOnTriggerEnter NullReferenceException
I'm trying to make a random dungeon generator by having pieces of the dungeon instantiate trigger colliders that, if there is no occupied space, will instantiate another dungeon piece, and then it goes...
View ArticleTrying to create a freaking math clone. new learner and very low coding...
I am trying to create a clone of the game "freaking math" using unity 3d for experimental purposes to learn game design. It involves simple math problems which must be solved within 2 seconds. I have...
View Articlebutton click area to the left of button
If I use hard numbers everything works fine but if I use variables my clickable area is to the left. Has anyone seen this issue? This is only in the .exe (so far as I know) works fine in the editor....
View Articlechanging maxSidewaysSpeed in a script
so, i have been looking for about one hour now trting to find the solution to this, but i have failed. what i want to do, is when the player is holding down LMB and has an attack score of 1, to change...
View ArticleHow can I fix this?
I need help, I was watching a video on how to make a game similar to crossy road with java script, but there is one error that says (10,15): error CS1519: Unexpected symbol `Vector3' in class, struct,...
View Articlenullrefrenceexception: how can i solve this?
so, ive been looking for 3 hours now, and i cant find why this is giving me an error, what im trying to do, is to lock the player (maxsidewaysspeed = 0.0f, jumping = false) and set the gravity, to get...
View ArticleJavascript error
I write a javascript whit simple variables but when i compile it send error mesage : x is not a member of object. #pragma strict var Alap : Texture2D; var GUIMenu : GUISkin; var MainOn = false; var...
View ArticleUi button doesn"t disappear [JS]
hey everibody i have a problem with unity i use Unityscript . so my problem is i can make disappear a text with the new ui but when i try to do the same for a button it doesn't work so the only think i...
View Article