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
0 votes
1 answer
3k views

I'm searching on Input.Touch properties to find how can I simulate tapping on touch for Android. Something like ...
virtouso's user avatar
  • 2,680
1 vote
1 answer
4k views

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/...
Bruno Brant's user avatar
-2 votes
2 answers
692 views

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 ...
Angel Vasilev's user avatar
0 votes
1 answer
481 views

I tried to search different solutions but also due to the lack of knowledge in camera handling I found none fitting my needs. The situation is the following. I have a 2d game structured in ...
Leggy7's user avatar
  • 1,464
0 votes
1 answer
1k views

I would like to know if Rigidbody2D's can detect collisions with 3D Box colliders and/or normal rigidbodies. I seem to have a ...
BiiX's user avatar
  • 499
0 votes
1 answer
1k views

I have a 2d game where I want to display UI element perfectly aligned to specific gameObjects. I have an ortographic camera and I used to ...
Leggy7's user avatar
  • 1,464
1 vote
1 answer
6k views

I have a 2D, tile-based map. I want to be able to control the number of visible tiles on the screen vertically and horizontally, regardless of resolution. I want the player to be able to move the ...
Tim Metcalfe's user avatar
0 votes
1 answer
1k views

I want to understand how does Color.Lerp works in unity. According to this page it is quite clear to understand how to use it but I'm interested in how it is ...
Leggy7's user avatar
  • 1,464
1 vote
1 answer
611 views

I m new to unity and C#. I suspect that transform.find() function below does not need actual object reference like player.transform.find() because it transform find is already applied to the ...
ERJAN's user avatar
  • 613
0 votes
1 answer
1k views

I'm trying to create a Character touch controls for 2d platform. In my script Im using one horizontal swipe and hold touch gesture and one vertical swipe gesture without hold.Both are different ...
user75648's user avatar
  • 181
2 votes
1 answer
1k views

In my script below I'm using horizontal and vertical swipe gesture to move the character but both gestures are called on a single touch. ...
user75648's user avatar
  • 181
0 votes
1 answer
672 views

Heres my PlayerControl script ...
user75648's user avatar
  • 181
-1 votes
1 answer
630 views

I am working in coin system. if the player get the coin it adding to +1 coin. after game over i want to store the coins. if the player again earn coin means the new coin want to add with existing ...
Manoj Balaji M's user avatar
3 votes
2 answers
415 views

Well I had a problem with the implementation of my A* algorithm in C# for unity, and I don't realize how to prevent the diagonal movement and the cross walls, I had the next code, the print line's are ...
Juan Carlos Leon's user avatar
0 votes
1 answer
24 views

I have made a box where you can type in your name in unity. After typing your name you can click on the button. Clicking on the button it will copy the string that you typed in within a sentence. so ...
Hendriks3D's user avatar
2 votes
0 answers
515 views

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 ...
Seyed Morteza Kamali's user avatar
2 votes
0 answers
2k views

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 ...
Ssiro's user avatar
  • 85
3 votes
1 answer
2k views

i am android programmer and i want control button input in android for example i made a game that when you press back button in android mobile nothing happens but i want quite from game. This is how ...
Seyed Morteza Kamali's user avatar
1 vote
0 answers
530 views

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. ...
BunBunBun's user avatar
2 votes
1 answer
581 views

Let's assume having a (2d-) gameobject with 3 images: Head, body, feet. By using RaycastHit2D I can find out if the gameobject was hit (for example by the mouse): <...
mosquito87's user avatar
1 vote
2 answers
167 views

This is more a question about architecture. Not sure if there's a right or wrong: Let's assume I have some gameobjects: GUI: A menu containing some elements like "Go to position". It's opened when ...
mosquito87's user avatar
3 votes
1 answer
2k views

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 ...
Sivamurugan's user avatar
0 votes
1 answer
942 views

Can anyone explain why, in the editor I get: while, on my Galaxy S6, I get: My Panel UI element (which is the parent) has the ...
NoGall's user avatar
  • 111
1 vote
1 answer
234 views

(Unity 5.1) My Issue is when attaching a script to a gameObject, all the examples I've found are based with the update() function and it's pretty wierd for me, as a desktop games developer. Is there ...
Guy Ben-Moshe's user avatar
0 votes
2 answers
2k views

Im making an AI that checks if the player exists or not. How do I check if a certain object exists and put it in a boolean variable?
ElPolloLoco999's user avatar
0 votes
4 answers
6k views

I am trying to make an AI that tries to move towards the player but I don't know how. I tried using Vector2.MoveTowards() but it just mimics my movements instead of ...
ElPolloLoco999's user avatar
0 votes
1 answer
1k views

I need to make an "AI" that makes a ball try to touch the player. But Vector2.MoveTowards()needs a Vector2 variable but how do i get the location of an object?
ElPolloLoco999's user avatar
1 vote
1 answer
450 views

I've been debugging an issue where when my player is moving forward at high speeds (I have configurable movement modes for an overview/overwatch mode) if they are in walk mode and hit a steep slope ...
Miguet Schwab's user avatar
-1 votes
1 answer
604 views

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 ...
Tak's user avatar
  • 143
0 votes
1 answer
537 views

It was working fine last night but it doesn't work today, the zJumpCount stays at zero after I jump now. If the zJumpcount stays ...
subc0der's user avatar
-1 votes
1 answer
161 views

I am a 3D environmental artist and I'm currently planning an independent passion game project of mine. I have the concept of crazy hallways that lead to the rooms that the player has already visited, ...
Mitch Sigley's user avatar
1 vote
2 answers
7k views

I want to know the current time of the played animation using script in Unity3d. I tried using currentState.normalizedTime but this time is not the time of the ...
Tak's user avatar
  • 143
0 votes
1 answer
427 views

I am creating an endless runner with a flying character. I want to lock any movement in the x axis so that the character object can only move up and down but still move forward through the scene. I ...
Gaz's user avatar
  • 1
1 vote
1 answer
3k views

I am trying to learn Unity for a simple board game. The question is, is it possible to use grid layout group (or any layout component) with sprites? The goal is to fit a board into my view regardless ...
Berker Soyluoglu's user avatar
-1 votes
2 answers
340 views

I have made my own game, but I can't change the object's collider properties from the interface. I can't click on the expand button, because behind it there are other colliders. How could I change ...
Doni Putra's user avatar
0 votes
1 answer
2k views

I use the ui slider to control how loud is the game, what I want to know is how to make one ui slider control all of the game audio?
Bob's user avatar
  • 127
1 vote
1 answer
1k views

I have not use playerprefs before, I want to know how to keep the change of the audio when the player change it throughout the game.
Bob's user avatar
  • 127
-1 votes
1 answer
118 views

I got my code right here: ...
Bob's user avatar
  • 127
3 votes
3 answers
5k views

I'd like to have a button to mute game sounds and another to stop the game music. How can I do this?
Bob's user avatar
  • 127
-3 votes
1 answer
84 views

So the code down below is supposed to load the next scene once the player touches the flag which the code is attached to. I've made sure that is trigger is checked and yet I'm still getting errors ...
Harry's user avatar
  • 1
0 votes
1 answer
468 views

Say for example I have a ball, I want the sphere collider to be a certain radius when it comes into contact with one material (material A in diagram) and a different size when it comes into contact ...
jacobsieradzki's user avatar
2 votes
1 answer
342 views

I have an animation and I modified some rotations of some bones in the animation at a certain frame. What I want to do is how to make the animation in the next couple of frames interpolate smoothly so ...
Tak's user avatar
  • 143
0 votes
1 answer
2k views

I have a MeshRenderer mr public variable in script1. I dragged mesh1 from the assets in the <...
Tak's user avatar
  • 143
0 votes
1 answer
5k views

I want to know how to view and render a specific game object (mesh) in wireframe, not the whole scene. I can change the scene to wireframe using GL.wireframe but ...
Tak's user avatar
  • 143
1 vote
2 answers
821 views

How to change the gravity of a ball upward with a click Then change it again downward with another click And so on In unity
asem ayman's user avatar
0 votes
2 answers
1k views

I have a main_mesh that has 10 submeshes, I wonder how I can change the color of of these submeshes to a different color (e.g submesh1 will have a red color, ...
Tak's user avatar
  • 143
0 votes
1 answer
509 views

I have a mesh and I want to color each group of vertices with a certain color. If anyone could please advise how this can be done in Unity using coding?
Tak's user avatar
  • 143
2 votes
2 answers
5k views

In Unity, I've almost 200 or more objects. I wish to apply single script to all those objects. I'm a beginner & learning scripts in Unity. Edit: At the time of editing the scene itself.
sagarkothari's user avatar
5 votes
3 answers
2k views

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 ...
user3208290's user avatar
0 votes
1 answer
146 views

I'm using Unity3d and I'm trying to rotate the left leg bone of an avatar but it is not working although scaling is working well. This is the code used for scaling and is working perfect: ...
Tak's user avatar
  • 143

1 2 3
4
5
7