public static void CreateDirectories() { string customPortraitsDirectory = CompanionCustomPortraitsManager.GetPortraitsDirectory(); foreach (string companionName in CompanionCustomPortraitsManager.CompanionGUID.Values) { Directory.CreateDirectory(Path.Combine(customPortraitsDirectory, companionName)); } }
private static void OnGUI(UnityModManager.ModEntry modEntry) { GUILayout.BeginHorizontal(); if (GUILayout.Button("Open Portraits Directory", new GUILayoutOption[] { GUILayout.Width(170f) })) { System.Diagnostics.Process.Start(CompanionCustomPortraitsManager.GetPortraitsDirectory()); } if (GUILayout.Button("Reload Portraits", new GUILayoutOption[] { GUILayout.Width(130f) })) { CompanionCustomPortraitsManager.Instance.LoadPortraits(); } GUILayout.Label(string.Format("After reload, it takes effect after you enter any location or load a game."), new GUILayoutOption[] { GUILayout.ExpandWidth(false) }); GUILayout.EndHorizontal(); }