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
30
votes
3 answers

How to calculate sizeDelta in RectTransform?

I write a custom content fitter that is required for my custom layout. So, I need to control RectTransform.sizeDelta property when anchors aren't same but I can't get that shows this value. I don't need Unity3D API reference, I read it and got a…
Denis Sologub
  • 7,277
  • 11
  • 56
  • 123
14
votes
3 answers

How to get contact points from a trigger?

I'm in a situation where I need a 2d sensor that will not collide but will also give me contact points for a collision. Triggers don't give me contact points and colliders give me contact points but cause a collision. I've tried disabling collisions…
shwick
  • 4,277
  • 6
  • 21
  • 28
12
votes
3 answers

How to disable physics system in unity

I want to develop native android app in unity engine, and does not need to use physics, could it possible to disable physics engine for specific project in unity.
Muhammad Ameen
  • 179
  • 1
  • 2
  • 9
12
votes
4 answers

Display live camera feed in Unity

I have a question regarding Unity. I hope this hasn't been answered before. I want to connect a Camera (like a HD cam) to my computer and the video feed should be displayed inside my Unity scene. Think of it like a virtual television screen, that…
Sören Kampschroer
  • 348
  • 1
  • 3
  • 9
11
votes
5 answers

Unity3d performance on iPhone

I am really interested in using Unity3d to develop an app. I like the fact that I can develop once and port the app to multiple platforms (Mac/Windows/iPhone/Android), and the performance on my Mac seems to be quite good. This will be the first time…
Rishi
  • 3,538
  • 5
  • 29
  • 40
11
votes
2 answers

How to call method and return its value with UnityPlayer.UnitySendMessage

How can I call this C# method from Java then return the string value? public string getTest () { return "test"; } This is what I've tried: String str = UnityPlayer.UnitySendMessage("ProfileSave", "getTest",""); I am getting the below error String…
user3855589
  • 1,113
  • 2
  • 15
  • 43
11
votes
4 answers

Raycasting to find mouseclick on Object in unity 2d games

I am trying to delete the object on which the mouse is clicked. I am making a 2D game using the new Unity3D 4.3. Here is the code I'm using void Update () { if (Input.GetMouseButtonDown(0)) { Ray ray =…
Bimal Bose B S
  • 221
  • 1
  • 5
  • 14
10
votes
1 answer

How should I call my C++ function from Unity3D

This is a little bit difficult because I don't even know if my C++ is well implemented. I want to call a function from Unity3D which I pass some parameters such float *points and my C++ writes in that pointer. Well, starting from the C++ part, I've…
Rafael Ruiz Muñoz
  • 5,333
  • 6
  • 46
  • 92
10
votes
3 answers

Unity multiple collider on same object

I am using several box colliders on the same GameObject, the question is, is it possible to refer to each of those colliders separately using gameObject.getComponent().enabled = false; Keep in mind that I have few colliders and I want some of them…
Metaldream
  • 125
  • 1
  • 1
  • 9
10
votes
2 answers

How to set the font size of text in Unity?

How can I make the size of the font in a label larger? I used this function to display the text : function OnGUI() { GUI.color = Color.green; GUI.Label(Rect(500,350,200,50),"Lose"); } And that results in: How can I make this text bigger?
Akari
  • 856
  • 8
  • 21
  • 36
9
votes
4 answers

Making a post request in Unity on Windows Phone 8

I'm trying to do a post request on windows phone 8 from the Unity Platform. I do not want to use the unity WWW method as this blocks rendering (and is not thread safe). The following code works in the editor and on Android, but when building it for…
JensB
  • 6,663
  • 2
  • 55
  • 94
8
votes
2 answers

Display and render only a specific object in wireframe in Unity3D

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 the problem I want to view and render only a certain object (not the whole scene) in…
Tak
  • 3,536
  • 11
  • 51
  • 93
8
votes
4 answers

Screen record in unity3d

How to do screen record in unity? I want to record my screen(gameplay) during my running game. That should be play/stop , replay , save that recording on locally from device, open/load from my device (which is already we recorded). In my game one…
Sudhir Kotila
  • 687
  • 9
  • 20
8
votes
1 answer

Load material from assets in Unity

In my Assets folder I have a folder named Material where I stored all the needed materials, One of the materials in the Material folder is Night_Sky, which I want at a certain moment of the game to replace the day_sky and set Night_sky as my default…
Tarik Mokafih
  • 1,247
  • 7
  • 19
  • 38
8
votes
3 answers

C# version of Array.Unshift() from UnityScript?

I'm trying to write a simple chat box, and I found a really simple piece of code for it on the unity forums, but its in UnityScript (similar to JavaScript). I tried to convert the code to C# and I've had some success, but the problem is that the…
Matrixian
  • 177
  • 2
  • 6
1
2 3
99 100