BomberUnits
...a Unity learning project
CharCustomizer Class Reference
+ Inheritance diagram for CharCustomizer:
+ Collaboration diagram for CharCustomizer:

Public Member Functions

void SetColor (Color c)
 Coloring models differently does work by setting the material of a specific mesh to a different color. More...
 
void SetName (string name)
 Sets the name for this character (the player's name) to be displayed as label.
 
void HideName ()
 
Sprite GetSprite ()
 

Public Attributes

CharSettings charSettings
 Common asset of settings valid for all characters.
 

Private Member Functions

void Awake ()
 

Private Attributes

Sprite charSprite = null
 Prefab holds its 2D image reference here for the UI to pick up.
 
MeshRenderer [] coloredMeshes = default
 These child MeshRenderers will be (partly) colored.
 
int [] coloredMeshMatIndices = default
 Also give the index of the mat to color for each Mesh.
 
Color color
 
string charName
 

Detailed Description

Definition at line 9 of file CharCustomizer.cs.

Member Function Documentation

◆ SetColor()

void SetColor ( Color  c)
inline

Coloring models differently does work by setting the material of a specific mesh to a different color.

Changing a set Material will change the asset itself on disk! This therefore relies on the correct meshes to have been set in the inspector to work.

Definition at line 46 of file CharCustomizer.cs.


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