consulo-unity3d icon indicating copy to clipboard operation
consulo-unity3d copied to clipboard

Double clicking scripts/console logs doesn't focus Consulo

Open Souk21 opened this issue 9 years ago • 56 comments

Using OSX 10.11.5, latest consulo build, c# and unity plugins up-to-date. When I try to open a file from Unity, consulo do open the file, but the focus stays on Unity (I have to Cmd+Tab to consulo to see the file).

Souk21 avatar Jul 29 '16 10:07 Souk21

Just in case, I'm using Unity 5.3.4p6

Souk21 avatar Jul 29 '16 10:07 Souk21

I reproduced (at windows, my main OS, it works, no idea why it not work at MacOS)

I will try to fix it (i don't have real MacOS device)

VISTALL avatar Jul 29 '16 10:07 VISTALL

Tell me if I can help in any way ?

Souk21 avatar Jul 29 '16 10:07 Souk21

You created issue - that enough

VISTALL avatar Jul 29 '16 10:07 VISTALL

An extra info I omitted is that it works if I deselect "Use Consulo as Extern Editor" in Edit menu.

Souk21 avatar Jul 29 '16 10:07 Souk21

FWIW, that's how VSCode plugin is doing it. (Saying that I realize I should have posted this issue in Unity integration plugin)

Souk21 avatar Jul 29 '16 12:07 Souk21

Its ok, no matter where (Unity plugin or Unity plugin :D, better than in consulo)

When Consulo enabled inside Editor - open handler sent via HTTP (consulo <-> unity intergration).

But if you disable - UnityEditor tried to open Consulo via command line (and consulo resend program arguments)

It's a bug of handling 'unityOpenFile/' inside Consulo (rest api)

VISTALL avatar Jul 29 '16 12:07 VISTALL

I've started seeing this problem again with the latest Consulo + Unity Plugin and Unity 2017.2.0f1. Anyone else have this issue?

patrickoshaughnessey avatar Sep 29 '17 19:09 patrickoshaughnessey

I've having troubles with this, and updated Consulo to 1921 (windows), and in Unity, Edit -> Preferences... -> External Tools, leave External Script Editor Args empty, and check Editor Attaching. Now double clicking on a script or error works fine.

parmaia avatar Dec 11 '17 12:12 parmaia

This is still an issue in the latest version of Consulo (2649) running on Windows 10 (2004). Setting the External Script Editor Args to empty and checking Editor Attaching doesn't solve the issue. Consulo refuses to focus on double-click. It also does not correctly open the solution automatically if double-clicking a script when Consulo is not running. Couldn't this be implemented somehow?

xCISACx avatar Nov 12 '20 19:11 xCISACx

This is still an issue in the latest version of Consulo (2649) running on Windows 10 (2004). Setting the External Script Editor Args to empty and checking Editor Attaching doesn't solve the issue. Consulo refuses to focus on double-click. It also does not correctly open the solution automatically if double-clicking a script when Consulo is not running. Couldn't this be implemented somehow?

There update for Editor plugin (check https://github.com/consulo/UnityEditorConsuloPlugin). But need skip old warning about Editor plugin (due it's old branch - soon i will publish new version).

After using this plugin - files on double click must be opened. But focus is still issue, due OS restriction

VISTALL avatar Nov 12 '20 19:11 VISTALL

I placed the Editor folder inside my Assets folder and changed manifest.json so it had the "After 2019.3" lines added to it. image I'm using Unity 2019.4.1f1 but it still does not open the project automatically when double-clicking and Consulo is not running. When double-clicking, it opens Consulo's initial window where you can choose a project and change configurations. It should open the correct solution automatically, right?

xCISACx avatar Nov 12 '20 19:11 xCISACx

Consulo set as external editor (point to .exe file or app)?

Also this menu must be like this

image

VISTALL avatar Nov 12 '20 19:11 VISTALL

The Unity preferences are pointed to the consulo.exe (64-bit) image And the menu is the way you said it should be: image

This is a project that previously had the Consulo plugin in it, so I'm not sure if I should test it in a new project or not.

xCISACx avatar Nov 12 '20 19:11 xCISACx

  • Open this project inside Consulo.
  • Open this project inside Unity
  • Double click on C# file inside Unity
  • AltTab to Consulo

You file opened inside Consulo?

If not - check please Unity log

VISTALL avatar Nov 12 '20 20:11 VISTALL

Opening the project and double clicking on a script opens Consulo, but it's the main project window: image

If I open the project through this window, tab back into Unity and double-click the script again, it opens it in Consulo, but this requires me to manually select the project I want to open when Consulo should know it by searching the current project's directory, no?

It still has the issue where the Consulo icon flashes on the taskbar but the window is not automatically focused. It might be an issue with my current project, I can try it on a new one.

xCISACx avatar Nov 12 '20 20:11 xCISACx

If project is not opened(but Welcome window is opened) - Consulo not open on double click?

For flashing as i said - is OS restriction (there a some hacky way for it, but need time)

VISTALL avatar Nov 12 '20 20:11 VISTALL

If project is not opened(but Welcome window is opened) - Consulo not open on double click?

It does open on double-click, yes. I was wondering if it would be possible to open the project straight away without going through the Welcome window when double-clicking a script inside Unity.

For flashing as i said - is OS restriction (there a some hacky way for it, but need time)

I see, I will be waiting for the fix then, thank you!

xCISACx avatar Nov 12 '20 20:11 xCISACx

It does open on double-click, yes. I was wondering if it would be possible to open the project straight away without going through the Welcome window when double-clicking a script inside Unity.

Consulo not started on 2x click? Without errors? Consulo must open project, even if it's cold start

VISTALL avatar Nov 12 '20 20:11 VISTALL

Consulo opens on double-click but it's the Welcome window, not the project. The project only opens if Consulo's welcome window is open and you double-click the script again.

EDIT: The same behaviour occurs in a new project with a freshly imported Consulo plugin by changing the manifest.json. Double-clicking opens only the welcome window, from cold start.

xCISACx avatar Nov 12 '20 20:11 xCISACx

EDIT: The same behaviour occurs in a new project with a freshly imported Consulo plugin by changing the manifest.json. Double-clicking opens only the welcome window, from cold start.

and now known - it's a bug)

VISTALL avatar Nov 12 '20 21:11 VISTALL

Ah, so it is a bug! You managed to reproduce it? I thought it was my Consulo having issues, but I'm glad to know it can be reproduced.

xCISACx avatar Nov 12 '20 21:11 xCISACx

@xCISACx try change UPM version to 2.3.0. It's contains some hack for window focusing. test it

VISTALL avatar Nov 13 '20 06:11 VISTALL

I'll try it and let you know.

xCISACx avatar Nov 13 '20 09:11 xCISACx

So I changed the version to 2.3.0 and when you try opening a script by double-clicking when the welcome window is open, Consulo is focused. Screenshot_4

I get these errors on the console, not sure why.

EDIT: Socket searching turned itself off, for some reason. Turning it on makes the errors disappear. END EDIT

If Consulo is minimised, trying to double-click the script again after it is already open does not re-focus the window, however, nor does double-clicking a different script. If Consulo is open, we alt-tab to Unity and double-click the script, it does re-focus the window.

I think the issue is Consulo being minimized.

In summary: Consulo is not open + double-clicking on a script: Consulo welcome window opens. Consulo welcome window is open + double-clicking on a script: Consulo is focused. Consulo has the script open + alt-tab to Unity + double-clicking on a script: Consulo is focused. Consulo has the script open + minimising Consulo + double-clicking on a script: Consulo is NOT focused.

I'm having another issue now however where Consulo thinks the file doesn't belong to the project when it does, giving me no syntax highlighting or auto-complete.

Screenshot_3

xCISACx avatar Nov 13 '20 09:11 xCISACx

Yeah i found this problem too. It's fixed in nightly. I will test and publish to release. Need some time until current release build come. It will huge, current fixes are delayed until new release

VISTALL avatar Nov 13 '20 09:11 VISTALL

I see. I'm glad to know a lot of fixes are coming to release! Should I switch to nightly for the time being then?

xCISACx avatar Nov 13 '20 09:11 xCISACx

So I tried out the latest nightly just for the sake of experimentation and immediately got all these errors, which I suppose is normal, but checking for updates does not try to update any of the plugins. image

Syntax highlighting and auto-complete do not work either, which is expected since the plugins have errors. Is it because I exported the release version settings and imported them into the nightly?

Consulo does not open the correct project even if the welcome window is open and a script is double-clicked, so the release version works better in this aspect. Focusing also does not work in the nightly, it seems.

Changing the UPM version back to 2.2.0 does not fix this issue and trying to re-download the plugins by looking for them gives no results. image

xCISACx avatar Nov 13 '20 09:11 xCISACx

You ignored error on update about - Some plugins will not updated (do not ignore that error).

Call check for updates again. Some plugins will arrive. My build service is slow (you catch moment when it build new versions of plugins)

VISTALL avatar Nov 13 '20 09:11 VISTALL

Checking for updates again gives this result. image

I didn't update my other release of Consulo, I went to the repository and downloaded the latest nightly: https://hub.consulo.io/#!repo/nightly/consulo-win64

You ignored error on update about - Some plugins will not updated (do not ignore that error).

So I'm not sure what this means

xCISACx avatar Nov 13 '20 10:11 xCISACx