For the complete documentation index, see llms.txt. This page is also available as Markdown.

Instance Transform

Represents an instance’s position, rotation, and scale

FloraInstanceTransform stores position, rotation, and scale relative to a parent, or in world space when no parent is assigned.


Usage

Defining an Instance Transform

Instances can be placed using local-space transform data relative to a parent Transform:

var localTransform = new FloraInstanceTransform(localPosition, localRotation, localScale);
FloraSystem.Instance.CreateInstance(prefab, this.transform, localTransform);

Converting from a Unity Transform

You can construct a FloraInstanceTransform from a Transform, in either local or world space:

var local = FloraInstanceTransform.FromUnityTransform(this.transform, Space.Self);
var world = FloraInstanceTransform.FromUnityTransform(this.transform, Space.World);

Writing Instance Transforms

To update an instance’s transform after creation:

FloraSystem.Instance.UpdateInstanceWorldTransform(handle, transform);

You can also update multiple instances at once using arrays or native containers.

Transform Composition and Manipulation

FloraInstanceTransform includes utility methods for manipulating transform data:

Last updated