Base code plus an example of dockable panel.
- Go to https://scriptui.joonas.me and create your UI(that one is not dockable).
- Export that code and paste it to this base code, where it says //Paste code here
- Replace window declaration with createDockableUI(this) and delete that line(row 23, we don't need that anymore).
- Replace the last function argument with the name of your window.
You also have a file as an example. You can copy that to your After Effects ScriptUI folder and see how it works.
I have also crated an article on Medium about this, with a lot more explanation. You can check it out here https://medium.com/@andreipopa191187/easiest-way-to-create-a-dockable-panel-in-adobe-after-effects-a9791d2e012a
Suggestions and constructive criticism always welcomed.