HEXE (Witch) is a prefab editor and runtime library for the Heaps game engine. HEXE is focused on 2D content and serves as a more user-friendly alternative to Hide (Heaps IDE).
Use the editor to create a prefab from your project assets and save it as a file in the res
directory. Then, you can use the hxe.Lib
library to load the prefab file into the game as an hxe.Prefab
display object.
List of Heaps h2d objects that can be added to a prefab:
- Object
- Bitmap from image file
- Bitmap from loaded Texture Atlas
- Text with default or loaded Font
- Interactive
- Graphics
- Linked Prefab
- Anim
- ScaleGrid
- Mask
Download the editor and create your prefab.
Install the library from haxelib:
haxelib install prefab
Alternatively the dev version of the library can be installed from github:
haxelib git prefab https://github.com/nayata/prefab.git
Include the library in your project's .hxml
:
-lib prefab
Use hxe.Lib
to load and add a prefab instance to the scene. Note: the prefab name must be without extension.
var object:hxe.Prefab = hxe.Lib.load("myPrefab", s2d);