Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

Efficient C# to UnityScript extension for Unity [beta]

Discussion in 'Works In Progress - Archive' started by Lion, Nov 19, 2012.

  1. Lion

    Lion

    Joined:
    Aug 13, 2010
    Posts:
    12
    Hi everyone

    Manual : http://florentpoujol.github.com/CSharpToUnityScriptConverter/
    Live demo : http://www.florent-poujol.fr/en/unity3d/c-to-unityscript-converter

    It's time for me to come out of the closet and show you what I have been working on for the past few months :

    I have been working on an extension that perform the efficient conversion of C# scripts into UnityScript scripts.
    The extension really aims to convert everything that can be done automatically, every C# features that has an equivalent in UnityScript, and take into account every syntactic special cases.
    But because C# has features that UnityScript hasn't, the conversion just can't be perfect and in some cases manual work or even whole refactoring must be done.

    To check the quality of the conversion so far by yourself, you can download the UnityScript version of all 48 C# scripts of the Bootcamp demo, converted this morning in about 30 seconds.


    The extension can handle the conversion of any number of files as it can convert not just one script but also a whole hierarchy (and reproduce the hierarchy with the converted scripts).


    I think such extension can be very useful to devs who would want to code in UnityScript but still benefits from the upcoming Learn Unity service where only C# will be used.
    Plus, the conversion of snippets or whole scripts is a subject that still comes quite often in the forum or Unity Answers.


    I plan to release a first version to the asset store by the end of the first week of December (in 3 weeks). But in the meantime I am looking for a handful of volunteer beta testers who could put it to the test.


    For your information, I already have a working UnityScript to C# extension but I still have have a lot of work to do (I arbitrary set my deadline up for beta (or even release) at the end of January).
     
    Last edited: Dec 2, 2012
  2. Lion

    Lion

    Joined:
    Aug 13, 2010
    Posts:
    12
    Hey everyone !

    Manual : http://florentpoujol.github.com/CSharpToUnityScriptConverter/
    Live demo : http://www.florent-poujol.fr/en/unity3d/c-to-unityscript-converter

    The news of the day is that you can now test the extension by yourself with the webplayer demo I set up on my website :
    http://www.florent-poujol.fr/en/unity3d/c-to-unityscript-converter/
    The demo is limited to 100 lines at a time but the quality of the conversion in the demo is the same than in the extension.

    Tomorrow, I will release the extensions manual which mostly explains what is not converted and provides some workaround when they exists.
    The submission to the Asset Store is still planned next week.
     
    Last edited: Dec 2, 2012
  3. Lord Darkshayde

    Lord Darkshayde

    Joined:
    Sep 20, 2012
    Posts:
    7
    While I only code in C# myself and have yet to attempt learning UnityScript I applaud your efforts in making a conversion software to assist those that need it. Here's wishing you the best of luck!
     
unityunity