0
Escalated

Pinned inspector popups close when entering play mode

Youdaman 1 month ago updated by Lazlo Bonin (Lead Developer) 1 month ago 1

I've seen a couple of other issues similar to this, but here's more detail:

Repro steps:

1. enter maximised mode for the scene view with Peek

2. create a cube

3. pin one of its components like the transform 

4. enter playmode

5. transform pinned component panel disappears

6. pin the transform component again while in playmode

7. exit playmode

8. the pinned component remains

So my question is if the transition out of playmode does not destroy the pinned component, why does the transition into playmode? And could you use the same caching/functionality you're using for the exiting of playmode for the entering? Or is the component remaining after exiting a "bug"?

I know I can remove the Inspector from the black list of panels to show in maximised mode, however it doesn't remember the scroll position (for when you have a small pinned panel or a panel with lots of components). Yeah you could move the component you want to use most often to the top of the inspector, but it would be nice to just be able to pin a component rather than take several more clicks to interrupt the workflow that Peek provides.

Also, not sure if related, but the inspector panel when pinned disappears momentarily and reappears when you enter playmode. Perhaps the step that makes it refresh/disappear could be triggered immediately before the redraw/reappear so it feels constant. 

Unity Version:
2018.4.14
Peek Version:
1.1.6
Escalated

Hi Youdaman,

Thanks for the report.

The reason you see this behaviour when entering play mode, but not when exiting, is that Unity reloads all assemblies on play mode entry, but not exit. "Reload all assemblies" means reload absolutely everything in managed memory from disk. This is meant to "reset" everything so your play mode testing starts from a blank slate.

We actually had to have multiple hacks in place to support even the pinned tabs to persist across assembly reload, because they're not actually saved to your Unity layout. This is why it disappears (forced by Unity's reload) and reappears a frame later (our hack kicking in as soon as possible); there's no way to make this a "no-hiccup" thing as far as I know.

We could attempt similar hacks for pinned inspector popups. It could be argued that it's a bug that they don't stay. I'll look into this!