static private SmartMaterial GetSprite() { if (sprite == null || sprite.material == null) { sprite = new SmartMaterial("Sprite/Default"); } return(sprite); }
public SmartMaterial(SmartMaterial met) { if (met.material != null) { material = new Material(met.material); material.mainTexture = met.material.mainTexture; } }
static private SmartMaterial GetAdditive() { if (additive == null || additive.material == null) { additive = new SmartMaterial("Mobile/Particles/Additive"); } return(additive); }
static private SmartMaterial GetAlpha() { if (alpha == null || alpha.material == null) { alpha = new SmartMaterial("Mobile/Particles/Alpha Blended"); } return(alpha); }
public SmartMaterial GetMaterial() { if (material == null || material.material == null) { material = MaterialManager.GetVertexLitCopy(); } return(material); }
public Material GetStaticMaterial() { if (material == null) { material = MaterialManager.GetVertexLitCopy(); material.SetColor(Color.black); } return(material.material); }
static public SmartMaterial GetMaterial() { if (material == null) { material = MaterialManager.GetAlphaCopy(); material.SetTexture(Resources.Load <Texture>("Pattern/1")); } return(material); }
public SmartMaterial GetStaticMaterial() { if (staticMaterial == null || staticMaterial.material == null) { staticMaterial = MaterialManager.GetVertexLitCopy(); staticMaterial.SetColor(Color.black); } return(staticMaterial); }
public Material GetFillMaterial() { if (customMaterial) { return(customFillMaterial); } else { if (fillMaterial == null) { fillMaterial = MaterialManager.GetVertexLitCopy(); } fillMaterial.SetColor(slicerColor); return(fillMaterial.material); } }
public Material GetBorderMaterial() { if (customMaterial) { return(customBoarderMaterial); } else { if (boarderMaterial == null) { boarderMaterial = MaterialManager.GetVertexLitCopy(); } boarderMaterial.SetColor(Color.black); return(boarderMaterial.material); } }
static private SmartMaterial GetVertexLit() { if (vertexLit == null || vertexLit.material == null) { if (Slicer2DSettings.GetRenderingPipeline() == Slicer2DSettings.RenderingPipeline.Universal) { vertexLit = new SmartMaterial("Legacy Shaders/Transparent/VertexLit"); } else { vertexLit = new SmartMaterial("Sprites/Default"); } if (vertexLit != null) { vertexLit.SetTexture(Resources.Load("Textures/LineTexture16") as Texture); } } return(vertexLit); }
void Start() { lineMaterial = MaterialManager.GetVertexLitCopy(); lineMaterialBorder = MaterialManager.GetVertexLitCopy(); }