Giter Club home page Giter Club logo

unihx's Introduction

unihx

Unity-Haxe tools. Compile to Unity3D from Haxe.

Goal

Make Haxe be a first-class Unity development language, and make it easier to work with Haxe on Unity than the natively supported Unity languages

Getting started

Use haxelib git unihx https://github.com/waneck/unihx.git to install it.

On an existing Unity project, run haxelib run unihx init path/to/unity/proj. Beware that you currently need a Haxe nightly build to be able to compile and use this library correctly.

What works

You can see a demonstration of some of its features at http://waneck.github.io/wwx-unity3d-haxe/ . The following are working already:

  • When Unity gets back to focus, it compiles the changed .hx scripts
  • You can click & drag .hx scripts into the inspector, like you can do with pure C#/UnityScript scripts
  • The resulting C# files are compiled in a directory relative to the .hx script file - so you can create Editor scripts, etc more easily
  • You can access other C# scripts from within Haxe, and vice-versa - even those that are compiled within the same compilation unit!
  • Access to any .NET library through -net-lib
  • Extend MonoBehaviour and code like you would with other Unity languages. Be sure to check the wwx presentation to get an idea of the types equivalence (e.g. C#'s array are cs.NativeArray in Haxe)
  • Use the @:nativeGen metadata to generate very clean code
  • Error positions always shown in the .hx code
  • Operator overloading on core structures like Vector2, Vector3, Matrix4x4, Quaternion, etc. See more about it at Core Structures

What still needs work

  • The HaxeBehaviour class is available, but some of its features demonstrated were proof-of-concept and are currently only accessible through the development branch.

Help wanted

Any kind of contribution will be much appreciated - from feature requests, testing it and adding bug reports, tutorials and documentation, to actual code and features! Pull requests are very welcome, and if you are excited as we are to bring an awesome Haxe support to Unity, let us know and join the team!

unihx's People

Contributors

waneck avatar m22spencer avatar

Watchers

James Cloos avatar  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.