public static bool NewTextureOptions_PEGI(this PlaytimePainter p) { bool changes = false; if (p.ImgData != null) { return(changes); } if (p.MaterialTexturePropertyName == null) { pegi.write("This material has no textures"); pegi.newLine(); return(changes); } bool color = pegi.Click(icon.NewTexture.getIcon(), "New Texture", 25); if (pegi.Click("Create Mask") || color) { List <string> texes = p.GetMaterialTextureNames(); if (texes.Count > 0) { p.CreateTexture2D(256, "New " + p.MaterialTexturePropertyName, color); changes = true; } } return(changes); }
public static bool SelectTexture_PEGI(this PlaytimePainter p) { int ind = p.SelectedTexture; if (pegi.select(ref ind, p.GetMaterialTextureNames())) { p.SetOriginalShaderOnThis(); p.SelectedTexture = ind; p.OnChangedTexture_OnMaterial(); p.CheckPreviewShader(); return(true); } return(false); }