Closed larssteenhoff closed 5 years ago
I found something that may be useful
https://answers.unity.com/questions/382973/programmatically-change-editor-layout.html One more for Unity 2018
// Loading layout from an asset
// LayoutUtility.LoadLayoutFromAsset("Assets/Editor/Layouts/Your Layout.wlt");
string path = Path.Combine(Directory.GetCurrentDirectory(), "Assets/Editor/Layouts/Layout1.wlt");
EditorUtility.LoadWindowLayout(path);
I found something that works
now I have 4 buttons that switch between layouts
Great! :)
https://unitylist.com/p/hfu/Unity-Layout-Exporter
I'm saving my layout with this tool and after I load it with the toolbar buttons.
// Loading layout from an asset
// LayoutUtility.LoadLayoutFromAsset("Assets/Editor/Layouts/Your Layout.wlt");
string path = Path.Combine(Directory.GetCurrentDirectory(), "Assets/Editor/Layouts/Layout1.wlt");
EditorUtility.LoadWindowLayout(path);
It works in unity 2018.3.
but for some reason does not work in 2019.2 they must have changed something again.
I'm not sure how to do it but I would like to make 4 buttons for the different editor layouts so I can quickly switch between them.
Can you help me out?