Runtime package that renders and updates Veauty virtual trees as Unity GameObjects.
- Unity 6000.5 or later (Unity 6)
com.uzimaru.veauty
Add to Packages/manifest.json:
{
"dependencies": {
"com.uzimaru.veauty": "https://github.com/uzimaru0000/Veauty.git",
"com.uzimaru.veauty-gameobject": "https://github.com/uzimaru0000/Veauty-GameObject.git"
}
}Mount a Veauty tree under a GameObject with VeautyObject.
using UnityEngine;
using Veauty;
using Veauty.GameObject;
using Veauty.GameObject.Attributes;
using Veauty.VTree;
public class Counter : MonoBehaviour
{
private VeautyObject app;
void Start()
{
this.app = new VeautyObject(this.gameObject, Render);
}
static IVTree Render()
{
var count = Hooks.UseState(0);
return new Node<GameObject>(
"Counter",
new IAttribute<GameObject>[] {
new Position(Vector3.zero, true)
},
CountLabel(count)
);
}
[Component]
static IVTree CountLabel(State<int> count)
{
var renderCount = Hooks.UseRef(0);
renderCount.Current++;
return new Node<GameObject>(
$"Count-{count.Value}",
new IAttribute<GameObject>[] {
new Active(count.Value % 2 == 0)
}
);
}
}Methods marked with [Component] get their own hook scope and lifecycle — no manual FunctionComponents.Create() wrapping needed.
// Basic node
new Node<GameObject>("Name", attrs, children...)
// Typed node — adds a Unity component to the GameObject
new Node<GameObject, Rigidbody>("Body", attrs, children...)
// Keyed node — efficient list diffing
new KeyedNode<GameObject>("Items", attrs,
("player", playerNode),
("enemy", enemyNode)
)| Attribute | Effect | Reset value on removal |
|---|---|---|
Active(bool) |
Sets activeSelf |
true |
Tag(string) |
Sets tag |
"Untagged" |
Position(Vector3, isLocal) |
Sets position | Vector3.zero |
Rotation(Quaternion, isLocal) |
Sets rotation | Quaternion.identity |
Scale(Vector3) |
Sets local scale | Vector3.one |
VeautyObjectrebuilds the virtual tree on state changes and applies only the diff to existing GameObjects.- Typed nodes add their component on render. When the component type changes, the old one is destroyed (MonoBehaviour components only) and a new one is added.
- Keyed node moves reuse existing GameObjects.
- If the mounter has a
RectTransform, child nodes are also created withRectTransform(for uGUI interop).
- Manual — getting started, architecture, VeautyObject, patching, attributes
- API reference — full public API
- AGENTS.md — guide for LLM coding agents
- CHANGELOG.md — version history