protected static bool DecodeOrInspectJson(ref JsonBase j, bool foldedOut, string name = "") { var str = j.AsJsonString; if (str != null) { if (str.dataOnly) { if (!foldedOut) { name.edit(ref str.data); } } else if (foldedOut && "Decode 1 layer".Click()) { TryDecode(ref j); } } pegi.nl(); if (!foldedOut) { return(false); } var changed = j.Inspect().nl(); return(changed); }
protected static bool DecodeOrInspectJson(ref JsonBase j, bool foldedOut, string name = "") { var str = j.AsJsonString; if (str != null) { if (str.dataOnly) { if (!foldedOut) { name.edit(ref str.data); if (name.Length > 7 && icon.Copy.Click("Copy name to clipboard", 15)) { GUIUtility.systemCopyBuffer = name; } } } else if (foldedOut && "Decode 1 layer".Click()) { TryDecode(ref j); } pegi.nl(); } if (!foldedOut) { return(false); } var changed = j.Inspect().nl(); return(changed); }