Static Public Member Functions

DiceMaster.DiceCreator Class Reference

Static editor class responsible for creating new dice prefabs and their textures. More...

List of all members.

Static Public Member Functions

static GameObject GenerateFinalPrefab (string diceName, DiceDefinition diceDefinition, Texture2D finalTexture, Mesh finalMesh, Mesh collisionMesh, Material finalMaterial, PhysicMaterial physicMaterial)
 Generate a prefab of the dice and save it among the assets.
static Texture2D GenerateFinalTexture (string diceName, DiceDefinition diceDefinition, Sprite[] pipSprites, Texture2D patternTexture, int targetTextureSize, float[] facesPipOrientation, float[] facesPipSize, float[] facesPipStretch)
 Generates a complete texture for the dice and save it.
static bool SaveTextureToFile (Texture2D texture, string diceName)
 Save the given dice texture to the output folder.

Detailed Description

Static editor class responsible for creating new dice prefabs and their textures.


Member Function Documentation

static GameObject DiceMaster.DiceCreator.GenerateFinalPrefab ( string  diceName,
DiceDefinition  diceDefinition,
Texture2D  finalTexture,
Mesh  finalMesh,
Mesh  collisionMesh,
Material  finalMaterial,
PhysicMaterial  physicMaterial 
) [static]

Generate a prefab of the dice and save it among the assets.

Parameters:
diceName Name of the dice (and asset) to generate.
diceDefinition Definition to use.
finalTexture Texture of the dice.
finalMesh Mesh of the dice.
collisionMesh Collision mesh of the dice.
finalMaterial Material of the dice.
physicMaterial Physics material of the dice.
Returns:
The new dice prefab GameObject.
static Texture2D DiceMaster.DiceCreator.GenerateFinalTexture ( string  diceName,
DiceDefinition  diceDefinition,
Sprite[]  pipSprites,
Texture2D  patternTexture,
int  targetTextureSize,
float[]  facesPipOrientation,
float[]  facesPipSize,
float[]  facesPipStretch 
) [static]

Generates a complete texture for the dice and save it.

Parameters:
diceName Name of the dice to generate.
diceDefinition Definition to use.
pipSprites Sprites to use as pips for the faces of the dice.
patternTexture Base pattern to use.
targetTextureSize Size of the target (final) texture
facesPipOrientation Orientation of each pip.
facesPipSize Multiplier for the size of each pip.
facesPipStretch Multiplier for the stretch of each pip.
Returns:
The final generated texture.
static bool DiceMaster.DiceCreator.SaveTextureToFile ( Texture2D  texture,
string  diceName 
) [static]

Save the given dice texture to the output folder.

Parameters:
texture Texture to save.
diceName Name of the dice this texture is for.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Properties Defines