unity3d

HaXe Unity3d target
https://github.com/AxGord/hx-unity3d

To install, run:

haxelib install unity3d 0.0.5 

See using Haxelib in Haxelib documentation for more information.

README.md

hx-unity3d

HaXe Unity3d target

v0.0.5

Unity 4.x ready

Installation

haxelib install unity3d

Compile project example

haxe -main Main -cp src -cs bin -D no-compilation -lib unity3d {+required classes}
And then, use the .cs files in the unity3d editor

Tips and Tricks

You can use FlashDevelop-HaXe-Projects-Templates

You can use .NET Library for additional function

You can use Pony for building event-oriented system and use some magic

Example

package ;
import unityEngine.MonoBehaviour;
import unityEngine.Time;
import unityEngine.Vector3;
import unityEngine.GameObject;
using UnityHelper;
class MyClass extends MonoBehaviour {
	private var target:GameObject;
	private var speed:Single;
	private function Start():Void {
		speed = 5;
		if (target == null) target = GameObject.Find('/Target');
	}
	private function Update():Void {
		if (speed == 0) return;
		getTransform().position = Vector3.MoveTowards(getTransform().position, target.transform.position, Time.deltaTime * speed);
	}
}

Manual

Unity Runtime Classes
Contributors
AxGord
Version
0.0.5
Published
5 years ago
License
BSD

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github