Git Product home page Git Product logo

unifree's Introduction

Migrate Unity projects to other engines!

⚠️ This is an early prototype. ⚠️

Features

  • Scan source project and detect files eligible for migration
  • Use ChatGPT to translate .cs files into Godot scripts and Unreal 3D classes. Here is how sample translation looks:
  Unity                                                  | Godot                                   
  ------------------------------------------------------ | ------------------------------------------------------
  public class Player : MonoBehaviour                    | class_name Player:
  {                                                      | 
    private SpriteRenderer spriteRenderer;               | var sprite_renderer: SpriteRenderer
    public Sprite[] sprites;                             | var sprites: Array
    private int spriteIndex;                             | var sprite_index: int
                                                         | 
    public float strength = 5f;                          | var strength: float = 5.0
                                                         | 
    private Vector3 direction;                           | var direction: Vector3
                                                         | 
    private void Awake()                                 | func _ready():
    {                                                    |   sprite_renderer = get_node("SpriteRenderer")
      spriteRenderer = GetComponent<SpriteRenderer>();   | 
    }                                                    | func _on_start():
                                                         |   call_deferred("animate_sprite")
    private void Start()                                 |   set_process(true)
    {                                                    | 
      InvokeRepeating(                                   | func _on_enable():
          nameof(AnimateSprite),                         |   var position = transform.position
          0.15f,                                         |   position.y = 0.0
          0.15f                                          |   transform.position = position
      );                                                 |   direction = Vector3.ZERO
    }                                                    | class_name Player:
                                                         | 
    private void OnEnable()                              | var sprite_renderer: SpriteRenderer
    {                                                    | var sprites: Array
      Vector3 position = transform.position;             | var sprite_index: int
      position.y = 0f;                                   | 
      transform.position = position;                     | var strength: float = 5.0
      direction = Vector3.zero;                          | 
    }                                                    | var direction: Vector3
  }                                                      |

Installation and Usage

launch.sh (or launch.bat on windows) is the main script that downloads Unifree code, install python virtual environment, installs dependencies and launches the main program (unifree/free.py). It accepts following parameters:

Key Description
<your_openai_api_key> How to get Open AI Key
<config_name> Name of the migration. Currently supported: godot, unreal
<source_project_dir> Absolute path of the project to migrate
<destination_project_dir> Absolute path of where results should be written

macOS

brew install git python3
curl -0 https://raw.githubusercontent.com/ProjectUnifree/unifree/main/launch.sh | bash
OPENAI_API_KEY=<your_openai_api_key> ./launch.sh <config_name> <source_project_dir> <destination_project_dir>

Windows

Install Git for Windows https://git-scm.com/download/win, then run:

git clone https://github.com/ProjectUnifree/unifree
cd unifree
launch.bat <your_openai_api_key> <config_name> <source_project_dir> <destination_project_dir>

Ubuntu/Debian

sudo apt install git python3 python3-venv
curl -0 https://raw.githubusercontent.com/ProjectUnifree/unifree/main/launch.sh | bash
OPENAI_API_KEY=<your_openai_api_key> ./launch.sh <config_name> <source_project_dir> <destination_project_dir>

Call To Action

👋 Join our Discord server for a live discussion!

We are actively seeking contributors. If you are familiar with Unity, Godot, Cocos2d or any other engines, help us!

Here is what we need help with:

Asset Migration

  • ❗ ❗ Migrate Unity assets to Godot
  • ❗ ❗ Migrate Unity assets to Cocos2d
  • What other engines should be implemented?

Source Migration

  • Experiment with ChatGPT prompts for better code translation
  • Add prompts/configs to migrate to Cocos2d
  • What other engines should be implemented?

Framework

  • ❗ Step-by-step console based migration wizard
  • ❗ More edge case handling
  • Architecture review and improvements

unifree's People

Contributors

bshikin avatar harryarakkal avatar aragubas avatar flooferland avatar dpayne avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.