consulo / consulo-unity3d

Frameworks: Unity3D
Apache License 2.0
103 stars 10 forks source link

Cannot run project from Consulo when Unity Editor is open (Unity 5.1) #21

Closed bfishman closed 8 years ago

bfishman commented 9 years ago

Hello. Great work, I love what you're doing here.

I've gotten Consulo to successfully build my Unity 5.1 project, and even run it when the Unity editor is closed. But if the Unity Editor is open, I get a failure with the following message in the log file:

 BATCHMODE ARGUMENTS:

-batchmode
-projectPath
C:/Users/Public/Documents/Unity Projects/Test Project
-buildWindowsPlayer
C:/Users/Public/Documents/Unity Projects/Test Project/out/production/Test Project/$ModuleName$.exe
-quit
Successfully changed project path to: C:/Users/Public/Documents/Unity Projects/Test Project
C:/Users/Public/Documents/Unity Projects/Test Project
It looks like another Unity instance is running with this project open.

Multiple Unity instances cannot open the same project.

Project: C:/Users/Public/Documents/Unity Projects/Test Project

(Filename: C:/buildslave/unity/build/Editor/Src/Application.cpp Line: 303)

Aborting batchmode due to failure:
Fatal error! It looks like another Unity instance is running with this project open.

Multiple Unity instances cannot open the same project.

Project: C:/Users/Public/Documents/Unity Projects/Test Project

I'm using the latest (as of right this moment) version of Consulo and the Unity3d Plugin. Any suggestions?

VISTALL commented 9 years ago

Hi. Yeah i known about this problem. For now - i dont known how communicate with UnityEditor, when Editor is opened.

Unity working on REST api, but for now it not shipped.

I did not found way how fix it.

Batch mode have some another issues(like he dont building in debug mode, and debug is not working.

bfishman commented 9 years ago

Does this work for earlier versions of Unity? I've seen your gifs of debugging from Consulo.

Anyway, understood that it's an issue talking to Unity. Feel free to close. Thank you again for your efforts.

VISTALL commented 9 years ago

Debug work if u attach to Editor, or attach to app (if it builded in debug mode by Editor)

VISTALL commented 9 years ago

MonoDevelop can compile project - but how i dont known. Trying to decompile assemblies, is bad idea. Unity opened many their repositories https://github.com/Unity-Technologies but it hard to read, no docs:)

bfishman commented 9 years ago

image

I am able to right-click scripts in the Unity Editor and edit them using Consulo, but not debug unfortunately. Is there an argument I need to pass to Consulo?

bfishman commented 9 years ago

Also, I've created a debug-build from the Editor. You say I can debug this with Consulo?

image

VISTALL commented 9 years ago

You have this button? If u running Editor it will show one item:

bfishman commented 9 years ago

Thank you! That worked great. I can now use breakpoints.

Would you like help writing tutorials/documentation for this plugin?

VISTALL commented 9 years ago

It will be great. I dont have time to write all

VISTALL commented 9 years ago

About debug, it will show not only Editor - it will show an App if u run outside Editor(with debug option)

bfishman commented 9 years ago

How do you make a debug run configuration?

Also, for the write-up you will either have to give me access to contribute to the wiki, or perhaps I can create a fork of the plugin and you can pull the document. Not sure.

VISTALL commented 9 years ago

For now - u can only attach to apy desktop app.

VISTALL commented 9 years ago

I am enabled wiki, anybody can edit it https://github.com/consulo/consulo-unity3d/wiki

bfishman commented 9 years ago

Will edit. I still am not sure if I understand what you meant by "About debug, it will show not only Editor - it will show an App if u run outside Editor(with debug option"

I will start the tutorial now, will show how to point Consulo towards your Unity directory, how to link Unity Editor to Consulo, and how to attach Consulo to Unity process

VISTALL commented 9 years ago

Sorry :)

Batch mode(via command line) always ignore 'Script debugging' option. I did not found way how enable it.

That why - if u want debug 'Standalone App' outside Editor, u need compile app by Editor(not consulo)

bfishman commented 9 years ago

Hm. So I build an EXE with the editor, having 'Script Debugging' enabled. Then what?

FYI, almost done with the wiki.

VISTALL commented 9 years ago

Run it, and then try to attach, if all is ok - u will see another process to attach

bfishman commented 9 years ago

It's attaching but nothing is outputting to the console. Perhaps I have to have breakpoints enabled before compiling?

Also... I don't know what changed but now I'm having the "Multiple Unity instances cannot open the same project." problem again, but now after having successfully attached to the Unity Editor process...

VISTALL commented 9 years ago

i think unity process didnot closed(kill it by task manager)

Hm. I will test attach to 'Standalone App' later, maybe some regression.

bfishman commented 9 years ago

Standalone app - I got it to use breakpoints, was attaching during the "Launcher" window (where you choose resolution, etc"), but needed to attach once the game had actually started.

It was not showing console output (using 'print()'), however (this did work when attaching to the editor process). Will try to kill unity process and try again, standby...

bfishman commented 9 years ago

Still no luck running from Consulo with Editor open. Not sure what changed, I may need to restart. (Unity process was not running)

VISTALL commented 9 years ago

Running from consulo is useless, no debug.

Use only Editor for building app

VISTALL commented 9 years ago

I think need disable compilation & running inside Consulo, too many problems with it

bfishman commented 9 years ago

It may save you some headaches at least :)

Just finished the wiki page, let me know if you want me to make changes or add anything else.

bfishman commented 9 years ago

https://github.com/consulo/consulo-unity3d/wiki/Setup-and-Usage

VISTALL commented 9 years ago

Oh, big thanks.

Some correction. Microsoft .NET & Mono .NET is not needed for unity:)

Run configuration is not needed too. Attach working without it.

VISTALL commented 9 years ago

please use new issue https://github.com/consulo/consulo-unity3d/issues/22

dont spam here:)

VISTALL commented 8 years ago

Building via command line is dropped from code. Issue obsolete