consulo / consulo-unity3d

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

Some third party dlls are not recognized, so no autocomplete or syntax errors #156

Closed parmaia closed 6 years ago

parmaia commented 6 years ago

This happens with few plugins in different ways:

image

If I write the code correctly putting a space then the dot and then delete the space and continue with the enum name (without autocomplete), Unity compiles everything correctly.

I can give you more info on this issue if you need it.

VISTALL commented 6 years ago

Hello. Can you provide simple project with broken library? or say how add it to unity project.

Thanks

parmaia commented 6 years ago

Here is a demo project using TextMeshPro. I think it will be already in the project, but if not, in Unity, you should go to Window -> Package Manager -> Select "All" tab, search for TextMesh Pro and install it (in the right panel).

TextMeshProConsuloBug.zip

For the AVPro plugin, I can't upload a demo project because it is a paid plugin. I'll look a way to send you the demo for this.

VISTALL commented 6 years ago

Hello.

Looks like it's bug of resolving libraries from new Package Manager. I added support for it, but looks like i missed something.

I'll check it.

Thanks

VISTALL commented 6 years ago

I was wrong. I added packages support only for resolving predefined dependencies like UnityEngine.Analytics (since they removed from main distribution).

There no handle of manifect.json

Some strange logic of resolving inside this packages.

Maybe at this week - i'm implement that.

There no temp solution, since TMPro package is source-package (that mean you can't add it like library, i'm even don't known how add it)

Thanks

parmaia commented 6 years ago

Wow, that was fast!

I also tried to find and import the TMPro package, but wasn't able too...

I'm glad to collaborate with this amazing project. I just sent an email to vistall.valeriy@gmail.com with the link fo the demo project for the AVPro plugin bug.

VISTALL commented 6 years ago

You can see logic about packages path here:

https://github.com/consulo/consulo-unity3d/blob/master/plugin/src/main/java/consulo/unity3d/packages/Unity3dPackageWatcher.java#L211

At windows path: C:\Users\VISTALL\AppData\Local\Unity\cache\packages\packages.unity.com

parmaia commented 6 years ago

That was interesting to know!

VISTALL commented 6 years ago

Hello. I pushed new support for packages. But i can say, that implementation will not work as expected - due Unity package system are dumb (they creating new VS project for each package, and then attach it to user workspace, you can see few .csproj files in project root named like unity packages).

Fix will be available at nightly channel (https://github.com/consulo/consulo/wiki/Update-channels)

VISTALL commented 6 years ago

Fixed highlight stuck

parmaia commented 6 years ago

Excellent. I'm the middle of a project and don't want to try this now. I'll try to test it on another machine and let you know the results.

parmaia commented 6 years ago

Hi, this is working great now with AvPro. I'll mark the issue as resolved.

VISTALL commented 6 years ago

Thanks for notify:)

TeorikDeli commented 6 years ago

Hello! Consulo can't find the preview packages right now. For example, Post Processing Stack V2 is tagged as preview and its version is 2.0.13-preview =/ I cloned the 2.0.13-preview package in /Users/USERNAME/Library/Unity/cache/packages/packages.unity.com and removed "-preview" in its name and Consulo now can find the package.

There are way too many packages in the preview right now (AR Foundation, new render pipelines, Post Processing V2, Entities, Jobs, etc). =/ I think manifest file has full version codes in it for all the packages (like, "com.unity.postprocessing": "2.0.13-preview").

VISTALL commented 6 years ago

can you show how it was added to Unity project in package file? manifest.json?

like:

"com.unity.postprocessing": "2.0.13-preview"

and directory is

com.unity.postprocessing@2.0.13-preview

I'm correct? If yes - i known where is problem

TeorikDeli commented 6 years ago

Yes, you are correct.

VISTALL commented 6 years ago

pushed change (https://github.com/consulo/consulo-unity3d/commit/229dd3b086027e2ea230792836773152151eb81b)

already build to nightly channel. try it!

TeorikDeli commented 6 years ago

Yes! It is working now. Just a reminder for anyone has this problem, you need to re-import the unity project after the update.