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

Variables declared with ":" instead of "="

Can someone explain the difference in Javascript between: var x = something and var x : something I have no idea on where/how to search about it. I saw the code above at the bottom of page 4 of this document:…
Saturnix
  • 10,130
  • 17
  • 64
  • 120
5
votes
5 answers

Finding Line segment-Rectangle intersection point

Simply put, I have: A viewport rectangle where (0,0) is the bottom-left corner, (1,1) is the top-right and (0.5,0.5) is the centre of the screen. A point (a,b) which is outside of the rectangle. This is in viewport coordinates so +X is right, +Y…
jt78
  • 906
  • 2
  • 10
  • 22
5
votes
1 answer

FFMpeg Continuous Real-time Image to Video Encoding

I am trying to use FFMpeg to take a stream of image files and turn them into a video. Now, I have successfully done this, but only after I have already captured all the images that I want. What I would like to do is turn the images into a video as…
Ben
  • 951
  • 12
  • 19
4
votes
2 answers

Why doesn't MonoDevelop code completion work for objects?

I am using MonoDevelop 2.4.2, and code completion works fine for everything inside my class scope. But it doesn't work for properties/functions of instances and static classes. For example, when typing: this.myFunct - pops up MyStaticCla - pops…
4
votes
1 answer

iOS not loading next level

I'm aware that having a large initial level in Unity causes the iPhone/iPad to shut down the app before it is done loading. The solution, I thought, would be a loading level that yields for 1 or 2 frames and then proceeds to load the next…
Zophiel
  • 129
  • 2
  • 12
4
votes
2 answers

Unity (C#) -> Kotlin <- Coroutines

I'm experimenting with Kotlin for the first time and would like to use Coroutine. What the code below does is pause the execution of the current function without sleeping the executing thread. The pause is based on the amount of time provided. The…
Wonderlus
  • 331
  • 1
  • 2
  • 9
4
votes
1 answer

How can I integrate Unity APP And Ionic

I have one question how can i integrate unity app into my ionic project? Can I deploy unity as a webservice? Can I deploy unity as a webapp and use in ionic? How can I pass data from Ionic to unity app . How can I integarte both? Is there any way…
user3855589
  • 1,113
  • 2
  • 15
  • 43
4
votes
1 answer

Unity C# scrollable GUI.BOX not working on android

I have a GUI I am drawing when clicking on the shop button, there is GUI.BeginScrollView and inside some buttons, anyway, I have the scrollview working only in unity editor, if I run this on phone it doesn't work, I see the buttons but I don't have…
DAVIDBALAS1
  • 484
  • 10
  • 31
4
votes
1 answer

Why isn't my definition for OnCollisionEnter() being used?

I have a character that a Boolean flag which determines whether or not he is jumping (if he is jumping, he cannot jump again). When he jumps, the jump flag is set to true, and when he collides with something it is set back to false (so he can jump…
4
votes
1 answer

Rotate instantiated prefabs

I'm instantiating prefabs in a circle around a central point via the following code... #pragma strict var numPoints : int = 7; var radiusX : int; var radiusY : int; var chair : Transform; function Start () { distributeFields(); } function…
tintyethan
  • 1,772
  • 3
  • 20
  • 44
4
votes
1 answer

Error in Unity project : No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher')

I have an android library project with resources and imported the library project in the Unity project here (F:\Unity\demoproject\testing\Testing\Assets\Plugins\Android) When I am trying to build my project in Unity then I am getting the…
user1986760
  • 813
  • 2
  • 10
  • 19
4
votes
2 answers

How can I save Unity Statistics or Unity Profiler Statistics (stats on CPU, Rendering, Memory...) in a file (text or CSV ...)?

I need to know please if I can save the profiler statistics (http://docs.unity3d.com/Manual/ProfilerWindow.html) and/or Unity Rendering Statistics (the overlay window that shows realtime statistics) -…
HB87
  • 413
  • 7
  • 16
4
votes
6 answers

How to destroy a game object marked "DontDestroyOnLoad" when a new scene loads?

So I created a music player to play music through all my menu and story scenes without interrupting, but then in my game scene I want to delete that music. How can destroy the playing music when my game scene loads? Here is my music script: #pragma…
Anton nelson
  • 333
  • 3
  • 8
  • 18
4
votes
1 answer

Are Update's serialized or parallelized?

I'm new to Unity5, and I'm trying to create a simple game. By extending MonoBehaviour, I receive an Update() function. But I don't know how it works behind the scenes. My question is, are the Update() functions serialized (called one after the…
user121292
  • 43
  • 4
4
votes
5 answers

Unhandled Exception: System.Reflection.ReflectionTypeLoadException in Unity3d

I'm getting this error: compile time error when running i have searched on unity forum they are saying its for the System.Web.dll file issue, i have cleared that, also reimported assets but its still not working. Unhandled Exception:…
Divya
  • 1,469
  • 1
  • 13
  • 25