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); }