public virtual bool PEGI() { "Profile Name: ".edit(80, ref name); #if UNITY_EDITOR string path = PainterCamera.Data.meshesFolderName + "/" + folderName; if (icon.Save.Click("Save To:" + path, 25).nl()) { this.SaveToAssets(path, name); UnityHelperFunctions.RefreshAssetDatabase(); (name + " Saved to " + path).showNotification(); } UnityEngine.Object myType = null; if (pegi.edit(ref myType).nl()) { var msol = (MeshPackagingProfile)(new MeshPackagingProfile().Decode(StuffLoader.LoadTextAsset(myType))); PainterCamera.Data.meshPackagingSolutions.Add(msol); PlaytimePainter.inspectedPainter.selectedMeshProfile = PainterCamera.Data.meshPackagingSolutions.Count - 1; } #endif bool changed = false; for (int i = 0; i < sln.Count; i++) { changed |= sln[i].PEGI().nl(); } return(changed); }
public bool PEGI() { bool changed = false; if (dataExplorer.inspectedTag == -1) { this.inspect_Name(); if (Std != null && dataExplorer.tag.Length > 0 && icon.Save.Click("Save To Assets")) { StuffSaver.Save_ToAssets_ByRelativePath(Mgmt.fileFolderHolder, dataExplorer.tag, dataExplorer.data); UnityHelperFunctions.RefreshAssetDatabase(); } pegi.nl(); if (Std != null) { if (dataExplorer.tag.Length == 0) { dataExplorer.tag = Std.ToPEGIstring() + " config"; } "Save To:".edit(50, ref Mgmt.fileFolderHolder); var uobj = Std as UnityEngine.Object; if (uobj && icon.Done.Click("Use the same directory as current object.")) { Mgmt.fileFolderHolder = uobj.GetAssetFolder(); } uobj.clickHighlight(); pegi.nl(); } "Comment:".editBig(ref comment).nl(); } dataExplorer.Nested_Inspect(); return(changed); }
public bool PEGI(TextureSetForForCombinedMaps sets) { PlaytimePainter p = InspectedPainter; pegi.nl(); currentPEGI = this; bool changed = "Name".edit(80, ref name); var path = PainterCamera.Data.texturesFolderName + "/" + folderName; if (icon.Save.Click("Will save to " + path, 25).nl()) { this.SaveToAssets(path, name); UnityHelperFunctions.RefreshAssetDatabase(); (name + " was saved to " + path).showNotification(); } pegi.newLine(); changed |= "Color texture ".toggle(80, ref isColor).nl(); bool usingBumpStrength = false; bool usingColorSelector = false; bool usingGlossMap = false; for (int c = 0; c < 4; c++) { var ch = channel[c]; changed |= ((ColorChanel)c).getIcon().toggle(ref ch.enabled); if (ch.enabled) { if ((ch.flip ? "inverted" : "+ 0").Click("Copy as is or invert (1-X)")) { ch.flip = !ch.flip; } changed |= ch.Nested_Inspect().nl(); usingBumpStrength |= ch.Role.UsingBumpStrengthSlider(ch.sourceChannel); usingColorSelector |= ch.Role.UsingColorSelector; usingGlossMap |= ch.Role.GetType() == typeof(TextureRole_Gloss); } pegi.nl(); } if (usingBumpStrength) { changed |= "Bump Strength".edit(ref bumpStrength).nl(); } if (usingColorSelector) { changed |= "Color".edit(ref fillColor).nl(); } if (usingGlossMap) { if (sets == null || sets.HeightMap != null) { if ("Gloss Mip -= Height Noise".toggle(ref glossNoiseFromHeight).nl()) { changed = true; glossNoiseFromBump = false; } } if ((sets == null || sets.NormalMap != null) && "Gloss Mip -= Normal Noise".toggle(ref glossNoiseFromBump).nl()) { changed = true; glossNoiseFromHeight = false; } if (glossNoiseFromHeight || glossNoiseFromBump) { "Fraction".edit(ref bumpNoiseInGlossFraction, 0f, 40f).nl(); } } if (sets != null) { if ("Combine".Click().nl()) { Combine(sets, p); } if (p != null) { "You will still need to press SAVE in Painter to update original texture.".writeHint(); } } return(changed); }