public static void LoadProjectLayout(string layoutFileName) { MethodInfo LoadWindowLayout; LoadWindowLayout = windowLayoutType.GetMethod("LoadWindowLayout", new[] { typeof(string), typeof(bool) }); LoadWindowLayout.Invoke(null, new object[] { Path.Combine(projectLibraryPath, layoutFileName), false }); }
public static bool LoadProjectLayout(string layoutFileName) { MethodInfo LoadWindowLayout; LoadWindowLayout = windowLayoutType.GetMethod("LoadWindowLayout", new[] { typeof(string), typeof(bool) }); var filePath = Path.Combine(projectLibraryPath, layoutFileName); if (File.Exists(filePath)) { LoadWindowLayout.Invoke(null, new object[] { filePath, false }); return(true); } else { if (EWFDebugging.Enabled) { UnityEngine.Debug.LogError(filePath + " does not exist."); } return(false); } }