Skip to main content

Questions tagged [unityscript]

STOP: this is probably not the tag you want. UnityScript is a deprecated language. For new questions about scripting in Unity, you probably want the tags "Unity" and "C#". Only use this tag for questions about legacy code written in UnityScript, the old JavaScript-like scripting language available until Unity version 2017.2.

Filter by
Sorted by
Tagged with
2 votes
1 answer
2k views

What is the difference between Unity's Camera.ScreenPointToRay and Camera.ScreenToWorldPoint. And where we can use these. I've ...
Abhinay Singh Negi's user avatar
0 votes
1 answer
2k views

I'm trying to make an agent patrol around a maze. The maze is proceduraly generated and consists of many rooms connected with doors. The problem occurs when the agent reaches a door. I wrote a script ...
Saad Moutalib's user avatar
0 votes
2 answers
937 views

I've created a script which helps me auto-generate a GameObject prefab. It uses some UnityEditor, so it can't be used at runtime ...
samanime's user avatar
  • 113
1 vote
0 answers
1k views

I've written a script which will automatically generate a Mesh, assign a MeshFilter, MeshRenderer, BoxCollider, and RigidBody. This script is meant as a tool to rapidly create a certain class of ...
samanime's user avatar
  • 113
2 votes
2 answers
4k views

as I searched GameObject.Find and GameObject.FindwithTag are heavy to work with and for reall projects its better to find ...
virtouso's user avatar
  • 2,680
1 vote
1 answer
932 views

I am trying to create doodle jump like game with object pool for platforms. I have created an empty object with box 2D collider attached to it. This object moves with player and should be gathering ...
Random generalist's user avatar
2 votes
1 answer
6k views

What does the unity's RectTransformUtility.ScreenPointToLocalPointInRectangle do I've read unity documentation but I didn't get the clear meaning.
Abhinay Singh Negi's user avatar
0 votes
1 answer
189 views

In Doodle jump, if a player jumps over one side of the screen he appears on another side with preserved velocity and other physical parameters. I made two trigger colliders on the sides of the screen ...
Random generalist's user avatar
0 votes
0 answers
225 views

How to get distance between two player in a photon multiplayer game. Condition is both the player is moving. I have tried something like this, in my player control script: ...
Arijit's user avatar
  • 101
0 votes
0 answers
113 views

I am trying to capture the game play and store it on local memory without using any third party sdk's. I tried This Video Capture Script but i didn't get the recorded file even i don't know whether it'...
Manoj Balaji M's user avatar
1 vote
0 answers
175 views

How can I properly save rotation of the camera while swipe and pass it to transform.rotation = Quaternion.Slerp() start start Quaternion?Right now after I swiped Gyro get his transform.position and I ...
GuardFromUA's user avatar
0 votes
1 answer
90 views

i want my Player to be affected by gravity, while being able to be moved in horizontal direction(the Player jumps up and down), but my script: ...
ill277's user avatar
  • 29
1 vote
1 answer
156 views

I want to make a little game in Unity, where the player (a ball) jumps up and down and you have to maneuver it through (flappy bird like) obstacles. My problem is, after I added a simple movement ...
ill277's user avatar
  • 29
0 votes
1 answer
141 views

Here's my code ...
NoobProgrammer's user avatar
0 votes
1 answer
124 views

I'm using Unity 2017 and am writing a game wherein you shoot a ball, and when said ball hit something (a cube for example), I want it to remain in that position that it hit. I tried this but it didn'...
Ero's user avatar
  • 29
0 votes
1 answer
119 views

...
Daniel Lip's user avatar
  • 1,785
0 votes
0 answers
173 views

Since I'm drawing a box it should have 12 lines but when running the game there are 24 objects. 12 are the lines but the other 12 seems to be doing nothing. ...
Daniel Lip's user avatar
  • 1,785
0 votes
2 answers
182 views

...
Daniel Lip's user avatar
  • 1,785
0 votes
1 answer
170 views

I'm making a game where in needs to randomly generate objects on a plane, so I setup a code to spawn Food, but whenever I run the code Unity uses up all my computers memory and 40% cpu. I have a ...
Sean Chambers's user avatar
0 votes
2 answers
59 views

I have an game object with multiples BoxCollider attached to it, is there a way to get all the BoxCollider to an array so that I could modify their value individually ?
user1998844's user avatar
1 vote
0 answers
553 views

i followed the official Unity tutorial to make an inverted sphere and play a 360 video inside it and i managed to do it but the problem is i can't build the project to my phone because it says i have ...
Mohit Saxena's user avatar
-2 votes
1 answer
140 views

I have a board of tiles in my game in Unity and I have to select a sequence of tiles by moving the pressed mouse over the tiles like if I would select letters in a such game like on the screenshot. ...
Alexander's user avatar
  • 147
0 votes
1 answer
585 views

I want to perform some specific functionalities if my character is in Idle state and IdleUnarmed animation is playing and !anyKeyDown. I do not know how to access that "IdleUnarmed" animation from ...
Ali Zaki's user avatar
2 votes
2 answers
427 views

I'm using Unity's standard assets scripts to move my car, but the camera just follows the road. At certain moments when the car misses or overturns the player can press 'R' to reposition the car in ...
NorbyAriel's user avatar
0 votes
1 answer
45 views

How can i Always Land a box in 90 degree Here What i want Here what i don't want ...
Kartik's user avatar
  • 139
-1 votes
1 answer
171 views

I have 2 Questions; 1.How do i throw square in different directions on every click while maintaining cyan border restriction 2.How to keep rotating square after i click in z-axis Check This Video ...
Kartik's user avatar
  • 139
1 vote
1 answer
2k views

I've integrated Vector3.SmoothDamp method to have a more fluid and native movement between the character and his camera in Unity. The camera movement is perfectly ...
vitto's user avatar
  • 109
2 votes
1 answer
726 views

I am fairly new to Unity 5, as I was browsing through some prefabs, I found one for the Main menu in which UnityEvent was used in scripts to list down the menu options. This UnityEvent was an array ...
ViNk's user avatar
  • 140
1 vote
1 answer
201 views

I'm trying to convert this code from UnityScript (Unity's version of JavaScript) to C#: ...
Dragon Flea's user avatar
0 votes
2 answers
61 views

I am trying to make an animtion for my Sword so that when I click with my left mouse button, the sword gets swung. I watched a tutorial video and tried to follow all the steps but whats happening is ...
DOGE's user avatar
  • 101
0 votes
0 answers
116 views

I am creating an iOS game. It's my first experience in iOS. I am facing an issue in player movement. If the player moves in the real world this means the game object (character in the game) also wants ...
Manoj Balaji M's user avatar
0 votes
1 answer
2k views

I have a scene set up where the player moves and rotates with Virtual Joystick Input. I have button which rotates the camera to the back of my player at that point I want to change the joystick input ...
coder_86's user avatar
  • 175
0 votes
1 answer
602 views

It's working fine right now, showing the text and then press the key and it takes the item but, i want something like resident evil, the text is not showing until you press acction button. How can i ...
Jose's user avatar
  • 49
3 votes
1 answer
4k views

Everytime i do import custom unity package file, I alwasy get Messy Folder and files in root of Asset Folder. Any Idea how to solve this ? Many Thanks in advance.....
questionasker's user avatar
2 votes
1 answer
128 views

I am working on a 2D platformer and I decided to update unity to the lastest version. Everything went well but once I got the project updated I got 2 error that I am not sure how to fix. Some help ...
Cole.C's user avatar
  • 29
5 votes
2 answers
14k views

I want my NavMeshAgent to jump when Space key is hit. The Script (in Unityscript) I tried is : ...
coder_86's user avatar
  • 175
1 vote
0 answers
90 views

I've been making a tree in with the Tree Editor in Unity, and for a realistic effect, I need to make all the leaves face a general direction, the problem is that most of them don't face that direction ...
user18723's user avatar
0 votes
1 answer
55 views

When I try something like File.Delete("Assets/a.txt"); it gives me a error saying Unknown identifier: 'File'. In Unity Documentation https://docs.unity3d.com/...
coder_86's user avatar
  • 175
0 votes
1 answer
3k views

Code: ...
coder_86's user avatar
  • 175
1 vote
0 answers
85 views

I've finished a model in SpeedTree Cinema v7.1.1 and the model exports correctly, but I can't figure out how to export the wind animation to Unity 5. The only problem is that the wind animation itself ...
user18723's user avatar
5 votes
1 answer
838 views

In my text adventure I'm making, I store the story data in a hashtable (I'm using unity's javascript/unity script since I'm more comfortable with the syntax than C#). The problem is, the way I ...
Garflington's user avatar
1 vote
2 answers
3k views

Something weird is happening when I change a variable value in script and hit play the var value doesn't update I have to reset the script in inspector. Is this normal? Aren't the values suppose to ...
coder_86's user avatar
  • 175
20 votes
2 answers
7k views

I just got an issue related to a 64k method in Unity so that's why I'm unable to build my project. It shows method limitation exceed the limit of 64k method count. So can anyone here help me out to ...
Rakesh's user avatar
  • 539
0 votes
1 answer
226 views

Code: ...
coder_86's user avatar
  • 175
0 votes
1 answer
131 views

code: var score:GameObject; function OnCollisionEnter(){ PlayerPrefs.SetFloat("Score",score.GetComponent(Events).i); } Events is the script I assigned to ...
coder_86's user avatar
  • 175
-1 votes
1 answer
1k views

Code: ...
coder_86's user avatar
  • 175
4 votes
3 answers
5k views

I know some differences between Update() and FixedUpdate() and recently I have used both functions in one script. The code is ...
Raminlich's user avatar
  • 128
1 vote
0 answers
679 views

I try to make a curved shader with shadow effect I got a existing curved shader in github and it has no shadow effect i try to modify it but i couldn't find any appropriate solution. The shaderor ...
Rakesh's user avatar
  • 539
7 votes
1 answer
2k views

Hi I am making a very simple simple platformer game for android devices. I am using Unity's event system for player movement. The problem is when I touched the button first time there is a lag (hiccup)...
Shohanur Rahaman's user avatar

1
2
3 4 5
7