- Home /
Question by
Inblinder · Feb 08, 2018 at 05:55 PM ·
c# to javascript
From Java to C# help
Can someone write this code for me in C#, please? Thanks.
var newScale : Vector3 = Vector3 (1, 1, 5);
var speed : float = 2.0f;
function Update ()
{
transform.localScale = Vector3.Lerp (transform.localScale, newScale, speed * Time.deltaTime);
}
Comment
Best Answer
Answer by Prastiwar · Feb 08, 2018 at 05:59 PM
It's not Java, its javascript, or even better unityscript.
Vector3 newScale = new Vector3(1,1,5);
float speed = 2.0f;
void Update()
{
// the same.
}
As you see syntax is very similiar.
Alright.. I'll try that. I just thought that the transform.localScale is different
Your answer

Follow this Question
Related Questions
How to use Android Dual Joysticks? 1 Answer
Making JS Interact with C# Variables 0 Answers
My Health Script Won't work in C# 1 Answer
fade code for c# 2 Answers
Combo Box script from C# to JavaScript 0 Answers