- Home /
Trouble updating old Unity syntax
Hello, I'm trying to adapt a conversation script from Balloon Diaspora for my own game. The source code I'm referring to is here.
The problem is that it's written in JavaScript so I'm copying it to C#, and it was also made with Unity 2 or 3 I believe, so a lot of stuff is outdated.
My main problem is that I don't know how to replace the Hash variables. There are Hashtables of course. I figured an ArrayList would work better for C#. I can't find anything about Hash ever being apart of Unity either.
I'm hoping someone can point out what I should replace it with and how I would add stuff to it like this line:
conversationObject = { "sceneList": new ArrayList(), "sceneData": {} };
But in C#. And if anyone has any links or words about conversation/dialogue systems in Unity I'd be very grateful.
Thanks!
Take a look at the accepted answer:
http://answers.unity3d.com/questions/21573/converting-code-from-javascript-to-c.html
$$anonymous$$aybe you find it useful.
Here is a link to the Hashtable class that shows its usage:
https://msdn.microsoft.com/en-us/library/system.collections.hashtable(v=vs.110).aspx
If you search for "dialog" in the Asset Store you'll find many results. A few of these assets are free:
Your answer
Follow this Question
Related Questions
Arrays with zero length 1 Answer
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers