MeshBaker
MB2_TextureBakeResults Class Reference

This class stores the results from an MB2_TextureBaker when materials are combined into atlases. More...

Inheritance diagram for MB2_TextureBakeResults:

Classes

class  Material2AtlasRectangleMapper
 

Public Member Functions

bool ContainsMaterial (Material m)
 
string GetDescription ()
 

Static Public Member Functions

static MB2_TextureBakeResults CreateForMaterialsOnRenderer (Renderer r)
 Creates for materials on renderer. More...
 

Public Attributes

MB_AtlasesAndRects [] combinedMaterialInfo
 
Material [] materials
 
Rect [] prefabUVRects
 
MB_MaterialAndUVRect [] materialsAndUVRects
 
Material resultMaterial
 
MB_MultiMaterial [] resultMaterials
 
bool doMultiMaterial
 
bool fixOutOfBoundsUVs
 

Detailed Description

This class stores the results from an MB2_TextureBaker when materials are combined into atlases.

It stores a list of materials and the corresponding UV rectangles in the atlases. It also stores the configuration options that were used to generate the combined material.

It can be saved as an asset in the project so that textures can be baked in one scene and used in another.

Member Function Documentation

§ ContainsMaterial()

bool MB2_TextureBakeResults.ContainsMaterial ( Material  m)

§ CreateForMaterialsOnRenderer()

static MB2_TextureBakeResults MB2_TextureBakeResults.CreateForMaterialsOnRenderer ( Renderer  r)
static

Creates for materials on renderer.

Returns
Generates an MB2_TextureBakeResult that can be used if all objects to be combined use the same material. Returns a MB2_TextureBakeResults that will map all materials used by renderer r to the rectangle 0,0..1,1 in the atlas.
Parameters
rThe red component.

§ GetDescription()

string MB2_TextureBakeResults.GetDescription ( )

Member Data Documentation

§ combinedMaterialInfo

MB_AtlasesAndRects [] MB2_TextureBakeResults.combinedMaterialInfo

§ doMultiMaterial

bool MB2_TextureBakeResults.doMultiMaterial

§ fixOutOfBoundsUVs

bool MB2_TextureBakeResults.fixOutOfBoundsUVs

§ materials

Material [] MB2_TextureBakeResults.materials

§ materialsAndUVRects

MB_MaterialAndUVRect [] MB2_TextureBakeResults.materialsAndUVRects

§ prefabUVRects

Rect [] MB2_TextureBakeResults.prefabUVRects

§ resultMaterial

Material MB2_TextureBakeResults.resultMaterial

§ resultMaterials

MB_MultiMaterial [] MB2_TextureBakeResults.resultMaterials

The documentation for this class was generated from the following file: