Questions tagged [unityscript]

DO NOT use this tag to describe Unity scripts which are written in C#! UnityScript is a separate language and should be used only on questions explicitly using that language. UnityScript is a DEPRECATED scripting language used by the Unity game engine in versions prior to 2018.2. It is often mistakenly referred to as Javascript, but does not follow the ecmascript standards.

UnityScript was one of the scripting languages used by the prior to version 2018.2. It features classes, strict typing, and is generally developed within the framework, (similar to .Net but designed to be cross platform) among other features.

Although UnityScript is sometimes referred to as "JavaScript", it is a different language, that does not follow the standard. From the Unity3D wiki:

Though many in the Unity development community (and even in the Unity corporation) refer to UnityScript and JavaScript as if they were equivalent or interchangeable, the two are very different languages. Though they resemble each other syntactically, they have very different semantics.

The semantics of UnityScript resemble with the main difference (and really its biggest similarity to javascript) being the ability to have dynamically typed objects.

In the Unity blog "UnityScript’s long ride off into the sunset" it was announced that starting from Unity 2017.2 the ability to create a "UnityScript" has been removed from the "Create Assets" menu as one of the first steps taken to deprecating UnityScript. UnityScripts can however still be made in this version through other means.

As of Unity version 2018.2, support for UnityScript has been completely removed. A tool to convert UnityScript to C# scripts has been released by Unity to help UnityScript users transfer over to C#. More detailed information and a how-to can be found in the Unity blog "UnityScript to C# Conversion Tool"

References


Related tags

1604 questions
8
votes
3 answers

Convert Unity transforms to THREE.js rotations

How can I match the rotation of a THREE.js camera or object to a transform from a Unity GameObject? Unity uses a left-handed system with a ZXY euler order. THREE.js uses a right-handed system with an XYZ euler order. What transformations need to be…
Simon Cave
  • 3,971
  • 4
  • 24
  • 28
7
votes
2 answers

Unity global mouse events

Most Unity tutorials suggest using Mouse events within the Update function, like this: function Update () { if (UnityEngine.Input.GetMouseButton(1)) { } } This strikes me as really inefficient though, similar to using onEnterFrame in AS…
zoosrc
  • 515
  • 3
  • 6
  • 12
7
votes
4 answers

How to make game object transparent in unity

In my game I want to make the player object transparent for 2 seconds by scripting at run time if the player collided with a specific object during the game ... is it possible ?
Akari
  • 856
  • 8
  • 21
  • 36
6
votes
3 answers

Performing simple network call to retrieve JSON in Unity?

I have looked at the network documentation for Unity and most examples seem to be related to networking your game for multiplayer. I am just looking to grab a JSON response from an api for dynamically generating a menu. Is there some good examples…
Bobbake4
  • 24,509
  • 9
  • 59
  • 94
6
votes
1 answer

Can I use Java script language in Unity3d 2017.2?

I notice that in MonoDevelop editor the auto correction for javascript it doesn't work . Does this mean that Unity is willing to abandon JS ? Can I use Java script language in Unity 2017.2 ?
Nour
  • 63
  • 1
  • 5
6
votes
1 answer

Drawing 3D polygon on unity 3d

I am trying out unity for a project that i am on. I am attempting to draw 3D polygon from a set of coordinate that I have. So what i am doing now is to build a row of cube btw the two points. I plan to build these points into either a solid shape…
user2760642
  • 137
  • 1
  • 9
6
votes
1 answer

Cannot see javascript files in Monodevelop Unity 5.2

Since upgrading to Unity 5.2 javascript (unityscript) files are not showing in the Monodevelop Solution explorer (see image below). Does anyone know how to resolve this issue?
joe
  • 16,988
  • 36
  • 94
  • 131
6
votes
1 answer

Factors that affect FPS on mobile device in Unity

I am developing a simple player shooting game. It worked fine for me. But when I tried deploying it on the device the FPS reduced to almost 3-4FPS. Can anyone list out what are the factors that reduces the FPS in unity game.
Sagar Patil
  • 1,400
  • 15
  • 29
6
votes
2 answers

How does Unity JS have a class?

I was reading an article on Unity JS. The article showed an example of a class in unity js. class Person{ var name; var career; } //Create objects of type Person var john = Person(); john.name = "John Smith"; john.career =…
Moon
  • 22,195
  • 68
  • 188
  • 269
5
votes
5 answers

What is the best script language for Unity3D

I am starting with game dev using Unity3d and I can see there's 3 supported languages for creating scripts: C#, unityscript and Boo... although, coming from a web-design past I am obviously used with javascript, but after few attempts I could notice…
zanona
  • 12,345
  • 25
  • 86
  • 141
5
votes
1 answer

How to speed up the build and run process in unity for mobile devices iOS/Android

Hi I'm developing a game in unity and I need test this game in iOS. For particular case I need test the input touch for controllers but this takes much time. When I change some lines of code in script C#, I must re-build iOS game in unity, after…
kakashy
  • 714
  • 9
  • 24
5
votes
2 answers

Unity3d progress bar

I am developing a game using unity3D and I need help making a progress time bar such that on collecting particular items time is added and thus the game continues.
A.Njuguna
  • 81
  • 1
  • 1
  • 5
5
votes
1 answer

Can JavaScript be expressly used to develop Unity games?

I would like an authoritative answer on a point that has been a question mark for me for a little while. There seems to be a frequent use of the term JavaScript to mean or describe UnityScript. I have been told time and again that you can use…
ylluminate
  • 12,102
  • 17
  • 78
  • 152
5
votes
2 answers

Instantiate prefab randomly but not in already genrated position

I want to generate bubble randomly in my screen.When bubble is generated in one place then other bubble can not generated near of its radius 1 area. means bubbles can not collide or triggered with any other bubbles. How can i do it ? public void…
Sudhir Kotila
  • 687
  • 9
  • 20
5
votes
2 answers

Basic Functions in unityscript

I just have a basic question. I'm trying to learn how to use functions with unityscript and I learned that when you create a function using something like function Example(text) { print(text); } and then call it up using Example(); you can…