MeshBaker
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
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:

Public Member Functions

Dictionary< Material, Rect > GetMat2RectMap ()
 
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
 
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

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.
string MB2_TextureBakeResults.GetDescription ( )
Dictionary<Material, Rect> MB2_TextureBakeResults.GetMat2RectMap ( )

Member Data Documentation

MB_AtlasesAndRects [] MB2_TextureBakeResults.combinedMaterialInfo
bool MB2_TextureBakeResults.doMultiMaterial
bool MB2_TextureBakeResults.fixOutOfBoundsUVs
Material [] MB2_TextureBakeResults.materials
Rect [] MB2_TextureBakeResults.prefabUVRects
Material MB2_TextureBakeResults.resultMaterial
MB_MultiMaterial [] MB2_TextureBakeResults.resultMaterials

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