- Home /
C# to UnityScript.
Hi their everyone.
I have bought a puzzle pack from the unity asset store which is scripted c#, i have read around that it with enough information it's not that hard to convert c# into UnityScript.
I have been looking for the terms in this snippet of code to try and figure out how to write it up in UnityScript, but have had no luck so far.
I understand that GetBase is being used as a transform variable, but the rest of the code i do not understand at all.
can someone please shed some light on what the terms in the code means and how i could translate them to UnityScript.
Thanks.
public Transform GetBase(string ident)
{
return jigsaw.transform.FindChild(ident) as Transform;
}
Answer by Graham-Dunnett · Jul 14, 2011 at 06:52 PM
We have a function called GetBase that returns a transform given a name. The code finds the transform by going to the jigsaw game object and looking at it's children for a transform with the supplied name.
Thanks. :)
I ended up with.
function GetBase (Ident) { jigsaw.transform.Find(Ident); }
It did not throw up any errors in Unity so i assume it is right.
Thanks again for the help.
Your answer
Follow this Question
Related Questions
having prob while accessing java boolean from c# script 1 Answer
How to make a C# script to JavaScript 1 Answer
Need help with C# to Unityscript 3 Answers
What am I doing wrong 1 Answer