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.

50 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
494 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
2k 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
26 views

Scene for Computer Screen

We are developing a scene that will involve heavily interacting with a "touch screen monitor" in the scene.. Because the workflow of the touch screen will need to be dynamic we are creating a REST API ...
1
vote
0answers
45 views

Discrete line inside a 3D matrix

First of all a little premise: I'm following this tutorial on YouTube for procedural 2d cave generation in unity using cellular automata and I'm extending it in order to make caves in all three ...
1
vote
0answers
55 views

How to implement a network proximity checker in Unity using LLAPI?

I'm trying to implement a network proximity checker using my own functions in Unity, using LLAPI. How can I implemnet a network proximity checker, with similar functionalities than the ones in the ...
1
vote
0answers
212 views

Unity3D - How to create flat map render based on endless noise data

The Project I'm working actually on a Endless Map Generator (with chunks, height-map noise, threading system, etc..) This is actually what "dev data display" look like: The Goal Now I want to ...
1
vote
0answers
81 views

vSync for gameplay in monitor and VR headset in Unity not being consistent?

Following my previous question, I'm building a project, my monitor refresh rate is 60Hz, and in my project I have set my vSync value into 2 so I can get 30fps. ...
1
vote
0answers
657 views

Save Generated GameObject as Prefab

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 ...
1
vote
0answers
144 views

Gyro and swipe in Unity

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 ...
1
vote
0answers
482 views

Unity3D: How to play 360 video without VR mode?

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 ...
1
vote
0answers
61 views

Unity-Error within Tree Editor

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 ...
1
vote
0answers
61 views

Problems exporting animations to Unity 5

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 ...
1
vote
0answers
537 views

I try to make a Unity Curved Shader with shadow Effect?

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 ...
1
vote
0answers
63 views

Second Animation is not working after Collision?

I want to show an accident of Character with car. so I wrote this code and in update function I wrote this... ...
1
vote
0answers
1k views

2D Unity: How to make a enemy jump from a navmesh platform to another?

I'm currently working on a 2d platformer, however I came across an issue where the enemy moves within a certain range of the platform. In this case I use a navmesh to limit the enemy's movement ...
1
vote
0answers
376 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. ...
1
vote
0answers
815 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 ...
1
vote
1answer
95 views

Game (Physics) work in Unity Editor/Remote but won't on Android?

I have a script attached to a car game object that allows the player to tap the screen and then accelerate, the game object has a RB2D and collider set to it , it works fine in Unity Remote , but when ...
0
votes
0answers
53 views

Get C# code from Unity apk

This is the app I built using Unity. The current version of the app is 8. I was stupid enough to lose the code for version 8. Now, I only have code till version 7. This is the code which doesn't have ...
0
votes
0answers
30 views

Can I use Unity's free assets for commercial purposes?

i have a question, if someone is developing a game on unity for commercial purposes, can free or even paid assets be used in the game even if it is to sell the game? are assets not subject to ...
0
votes
1answer
162 views

How to make random spawn objects in unity 3D

I created an infinte runner game. I need to make random spawning obstacles ON 3D. How do I randomly spawn prefabs on the X axis using a C# script?
0
votes
0answers
17 views

Prefabs scaling change also the original prefab

I want to work with a prefab as local and global variable? something like that. So my question is how to change a prefab scale without affecting the original prefab.
0
votes
0answers
40 views

unity3D Angry bird orthographic 3d approach

i want to create a game like angry birds but in orthographic mode 3D . i want to give the player the ability to Jump to the Red and Blue Platform (see the picture below) with the Click, Drag and ...
0
votes
0answers
24 views

Animation for some reason doesn't trigger after death

So I am trying to trigger this explosion animation after this enemy dies, but for some reason the animation doesn't trigger. I've made sure that the explosion animation is linked to "Any State", and ...
0
votes
0answers
70 views

Unity 3d Raycast from localspace to worldspace

I want a raycast direction not relative to the rotation, but what happens is that the raycast points to one place as if it was a transform.forward Why is the happening help ...
0
votes
0answers
35 views

Why does my "spawnedEnemies" variable not update when enemies are destroyed?

I'm creating a shooter game and I'm trying to update the current count of enemies on screen. When the laser hits an enemy, it is supposed to subtract 1 from the "spawnedEnemies" and then destroy the ...
0
votes
0answers
28 views

Make players Rigibody move in direction its going?

I have my snowboard character which I am trying to fix the movement for. At the moment, The player is using transform.forward on the rigidbody to move forward. If my player turns around and faces up ...
0
votes
0answers
41 views

How can I deactivate and activate a button?

I have a code that keeps a gameObject between scenes, the theme is that this gameObjecte has as a child a button, which I can change the linerenderer color, besides changing the image of the button ...
0
votes
0answers
9 views

Issues with Flashlight Handle position with player rotation

I want the flashlight to look same while looking up and down as when looking straight. Normal Position for Hand and flashlight: Looking up and down, position is completely off: More images for ...
0
votes
0answers
58 views

How to make mobile movement using CharacterController

How can i change my movement for mobile i think left and right gonna work but i don't know what should i do for jump ...
0
votes
0answers
360 views

Unity Erase Image from mouse pointer

I want to erase the image for mouse pointer in unity. My pointer should be as a eraser. What is I do create the eraser? My sprite is always change because it provide from the server. Please help me.
0
votes
0answers
47 views

Unity: camera moving up and down for no reason

I have a standard camera in my scene. With standard I mean the camera you get when you click right mouse > Camera, with no modification except for the transform position and rotation. Then I attached ...
0
votes
0answers
158 views

What's wrong in switching Script - Unity Multiplayer

I'm trying to switch between weapons but when I want to display another screen "some example" in client I don't see any change! This screenshot shows what I mean. [1] : https://imgur.com/uEUOFhC "...
0
votes
0answers
124 views

Unity Photon multiplayer :: check distance between two players

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: ...
0
votes
0answers
100 views

Capture Video without Third Party SDK's

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'...
0
votes
0answers
146 views

Why when creating lines using LineRenderer it's creating too much objects?

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. ...
0
votes
0answers
85 views

if the player moves in the real world the game object also want to move

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 ...
0
votes
0answers
105 views

Add translation at each animation cycle loop in Unity

I have a running animation. It already contains root animation. At every loop, it jumps to starting position. What is the best way to add a translation every time the animation loops?
0
votes
0answers
763 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
1k views

How do I fix this "java.lang.ClassNotFoundException" error?

I received my first crash report via the Google Developer Console, yesterday, and I'm completely lost. This is my error message: java.lang.ClassNotFoundException: Didn't find class "com.unity3d....
0
votes
1answer
573 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 ...
-1
votes
1answer
718 views

The value of animation parameter is not changing?

Code: ...
-1
votes
1answer
510 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 ...
-1
votes
1answer
3k 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
439 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
70 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
84 views

How can I select a sequence of objects by moving mouse in Unity?

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. ...
-2
votes
2answers
626 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 ...
-2
votes
1answer
2k views

How to change trail renderer start width dynamically by script in Unity?

I created a prefab that contains a trail renderer to draw a sprite in the GUI which I in a GameObject in a script. I want to change the start width or end width of the trail renderer dynamically ...
-2
votes
1answer
2k 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 ...