Unityscript is one of the scripting languages available for the Unity engine (other languages are C# and Boo).

learn more… | top users | synonyms

3
votes
4answers
258 views

Character controller going down slopes

When I go down slopes with character controller, if the speed is too high, the character just flies off the slope and lands at the bottom. I want my character to "stick" to the slope rather then just ...
-3
votes
2answers
130 views

what is perfect manner to load scene and than player position.? unity 5.3

Here i have problem with scene and object position. My problem is position of object/player changed after load scene. I don`t know why this happens?. I have saved my object position with "playerprefs"....
1
vote
1answer
41 views

How to stack sprites?

I am currently working on a 2D game in Unity, I am using Animation Controllers / Animators for the different slots of armor on the character. The scripts set the Animation to the player object and ...
1
vote
1answer
79 views

Unable to move mouse cursor while pressing keyboard button

I've a player to which I've attached character controller and two scripts - Controller and MouseLooker to control the player movements but when I try to move my mouse cursor while pressing keyboard ...
1
vote
1answer
285 views

Trying to get reference to Button in Javascript Unity3d

I've this simple script in Unity3d: #pragma strict public var topLeft : UnityEngine.UI.Button; public var topCenter : UnityEngine.UI.Button; public var topRight : UnityEngine.UI.Button; public var ...
1
vote
1answer
485 views

NGUI Texture Background Font of Sprite

I am new to Game Development and using NGUI plugin free version. There are few sprite images in my game. I made them prefab and instantiated at runtime. then I created NGUI Texture and Made it ...
0
votes
1answer
41 views

UNITY3D How can my capsule rotate with my camera?

I'm new to 3D game development in Unity. I'm using Unity5. I've created a first person character controller that can move using WASD and I've created a crosshair along with a mouselook script. Here's ...
0
votes
1answer
80 views

Keep a rigidbody velocity constant

I have a "board" with a ball (rigidbody) moving over it and colliding with obstacles. I want its velocity magnitude to remain constant throughout time. How do I achieve this? What I've tried/...
0
votes
1answer
74 views

Script for non-stop enabling/disabling “Is trigger” on collliders2d in Unity3D?

I had asked before that I have a problem with too many colliders in one spot and that some upgrades of towers I have are buggy due to that. It has come to my notice, that whenever I enable the "Is ...
0
votes
1answer
48 views

Access to varibles in other attached gameobject script is ambiguous

I'm trying to create reusable scripts that I can drop on my GameObjects. I am currently trying to figure out how to build a projectile script. Ideally, I want to be able drop this scrip on an enemy, ...
0
votes
1answer
508 views

Make GuiText responsive

I'm using C# code to make a responsive GuiText. I was abel to make a responsive GuiTexture, but I'm struggling with doing the same for a GuiText. Code for the responsive GuiTexture using ...
-1
votes
1answer
151 views

Quaternion.Lerp not working properly in Unity3d

I'm using Quaternion.Lerp to rotate a joint with a certain angle, but when I use the below code I find the joint rotating very far although I specified it to rotate with only 5. Any thoughts please? ...
-1
votes
1answer
2k views

Unity Ui slider volume control

I have the ui slider to control my volume, I have my slider to control all the volume of the game. I have make it so when the main slider change value all the other slider change with it but when I ...
-1
votes
1answer
264 views

Unity3d : Animator canceling script

I create a sway script for my flashlight and attached it to the gameobject(flashlight). Now the problem is that when I enable the animator in the gameobject(flashlight) the sway doesnt work,but when ...
-1
votes
1answer
66 views

How do I check in which region of a map an object is located?

For example I have a character and two areas A and B, I want to test which area, A or B, my character is on.
-2
votes
1answer
260 views

how to change trail renderer start width dynamically by script in unity?

I created a prefab that contain a trail renderer to make a drawing sprite in GUI, then i put it into a gameobject in a script. I want to change the start width or end width of the trail renderer ...
-2
votes
1answer
666 views

Animation not playing correctly(or at all)

Im created this script which plays animation/s when the player goes close to it and presses e while aiming at it.For some reasons only the first animation is playing,not the second one.Is there any ...
-2
votes
1answer
1k views

Unity3D - Clones won't get destroyed by script

I need some help making this script work. #pragma strict function OnMouseDown () { Destroy (gameObject); } Basicly what the script does is that it destroys the objects that the player clicks on.I ...
2
votes
0answers
79 views

Record voice and Comparison prefab audio in unity

I am android programmer that i Comparison Entrance voice with ready voice(prefab voice) for example when you say hello >>>>>to analyze>>>>>if your voice == prefab voice >>>>>you listen hello(play ...
2
votes
0answers
206 views

In Unity, how do I make a 3D flight arc preview?

I'm stuck on how to make a preview trajectory for a projectile appear when holding a button. The trajectory should start at a certain position on the scene and end wherever the player points their ...
1
vote
0answers
86 views

Need to save UI.Image to png

I have ui.Image1 with Mask component and ui.Image2 that is placed inside ui.Image1, then I want to save the result to Texture2d to save the resulting image to png. Sprite sprite = sourceImage.sprite; ...
1
vote
0answers
418 views

Using unity app how to read the asset in android SDCard?

I am trying to read one file from my android sd card from my unity application, but its not reading. using the asset bundle i have exported my file and kept in my android device sd card and i am ...
1
vote
0answers
638 views

Assigning valid moves on board game

I am making a board game in unity 4.3 2d similar to checkers. I have added an empty object to all the points where player can move and added a box collider to each empty object.I attached a click to ...
0
votes
0answers
91 views

Player character not moving

i am trying to make an fps game but my character won't move. i have tried different scripts for more than a week. Any help will be appreciated. Thanks! using UnityEngine; using System.Collections; ...
0
votes
0answers
32 views

plane bend problem

I thought to make the objects to view in the direction where the camera faces. But i have encountered a problem, When the camera goes near to the object, It bends. I don't know how to solve it. Here ...
0
votes
0answers
53 views

how to simulate tank tracks(something that is around all wheels, dont know what is called)

im trying to simulate the part of tank that rotates around all wheels and i dont know what is a good way to do that. can you give me some hints to do that?
0
votes
0answers
75 views

Object spawn only on Server in multiplayer unity3d game

In my game I have an object let say food, whoever eat that food that player will spawn one more element. I am sharing code here :- I am checking collision in Update. Following code is working fine on ...
0
votes
0answers
15 views

Displaying a timer ontop of a duplicated gameobject? (Unity2D)

So I have a timer which has for example 30 seconds and when it's over it destroys my gameobject. I can make I wonder how can I take this timer and display it ontop of every one of these gameobjects? ...
0
votes
0answers
20 views

JavaScript — Unity Movement Bug

Hello fellow programmers ! I have been working on a game lately and It's going pretty good. Today I decided to make a new car for it since it's a racing game. When I was modelling the car I ...
0
votes
0answers
34 views

Unity – Recording data for a behavioral experiment?

I am conducting a study using Unity and Oculus Rift and I need to collect the data from my subject. My participant is moving in a 3D maze created in Unity and using the Oculus. At any given time, I ...
0
votes
0answers
24 views

Add script to created gameobject via script

GameObject.AddComponent Hi, I have this c# code. It is creating random cubes and spheres. I have a script named "destroy". I want to add this "destroy" script to below code. I gave new material but ...
0
votes
0answers
60 views

Conversion from .dae to XML for 3D Models in Unity BuildR

My partner and I are trying to import .dae files from Sketchup as well as 3DS Max into Unity's BuildR extension. Collada a.k.a. .dae files have an XML-based schema so we incorrectly assumed they would ...
0
votes
0answers
42 views

Unity Parallax Strange Effect

I follow this Parallaxing Tutorial: https://www.youtube.com/watch?v=5E5_Fquw7BM for create a Parallax in Unity. I created a custom Script for my GameObjects like this (EDIT: this is in the Update ...
0
votes
0answers
65 views

{Unity3D} Script To Import Assets

I'm making a fps in Unity3D. I would like to know how to import a folder of assets with JS or maybe, but not preferably, with C#. The desired script will reference a directory and tell the code to ...
0
votes
0answers
54 views

Unity 2D - GUI box not moving with game object on X axis

I am trying to create a health bar above a spaceship in a 2d spaceshooter. Right now I just need to create a box and move it with the player. I found WorldToScreenPoint() which should work althought ...
0
votes
0answers
118 views

Google Cardboard Application is not Running on moto G 2nd generation mobile

I am working on the Google cardboard application, here i am using the unity to develop the cardboard app. I have tested the application in moto g 2nd generation here application is not running smooth, ...
0
votes
0answers
470 views

Unity3D - Unable to attach script to GameObject prefab at runtime

I've got a script that manages a scene browser within my application where I'm hoping to generate a new button instance for each scene found. I've put together a button that I've made into a prefab ...
0
votes
0answers
40 views

Character can't jump in other angle with fixed angle off

I turn off fixed angle so my character can rotate, but it can only jump in 1 angle but I want it to jump in every angle. How do I do that? Code: using UnityEngine; using System.Collections; public ...
0
votes
0answers
516 views

Adding Player Movement and Firing on Touch Input (Unity)

I am having many problems with this. I am a new game developer and I am using a Unity tutorial. But I want to add touch input for movement and a touch button for firing the weapon. How can I do this? ...
0
votes
0answers
133 views

How to embed UnityScript for scripting in Unity3D?

It is useful to have parts of your game being scriptable. Many people (especially outside of Unity) are using LUA for that job. As UnityScript (as with Boo or C#) is a first class citizen why not use ...