Class ImpostorGenerator
Inherited Members
Namespace: UnityEngine.Pixyz.UnitySDK
Assembly: Unity.Pixyz.UnitySDK.Runtime.dll
Syntax
public static class ImpostorGenerator
Fields
progressReporter
Declaration
public static ProgressReporter progressReporter
Field Value
Type | Description |
---|---|
ProgressReporter |
Methods
Run(GameObject, Type, int, int, Mesh, List<Object>)
Create an impostor GameObject from a GameObject and its children.
Declaration
public static GameObject Run(GameObject root, ImpostorGenerator.Type type = Type.Octahedron, int resolution = 2048, int framesXY = 16, Mesh customMesh = null, List<Object> newAssets = null)
Parameters
Type | Name | Description |
---|---|---|
GameObject | root | The function will process this GameObject and all its children. |
ImpostorGenerator.Type | type | Project impostor on a "sphere" or an "hemisphere". Choose HemiOctahedron if the model is not going to be seen from underneath: it will save space in the texture, resulting in a better quality. |
int | resolution | The resolution of texture maps baked to render the imposter (ex 4096x4096) |
int | framesXY | The square root of the size of the atlas of the different captured frames. |
Mesh | customMesh | Bakes impostor on a custom mesh instead of a quad. |
List<Object> | newAssets | If not null, fills the list witch new assets created by the function. |
Returns
Type | Description |
---|---|
GameObject | The resulting GameObject. |