consulo / consulo-csharp

Languages: C#
Apache License 2.0
50 stars 6 forks source link

Auto generated files -New Input System- "not visible" in Consulo #578

Closed Eljeyna closed 3 years ago

Eljeyna commented 3 years ago

Maybe I'm doing something wrong, but external libraries works perfect...

Eljeyna commented 3 years ago

When New Input System create a settings file, some fields "doesn't exists". With that class not visible in other scripts (but it works in Unity)

UPD: no problem with reimport in Consulo and preprocessor variables

NewInputSystem.cs image

Player.cs image

VISTALL commented 3 years ago

Hello. Can you switch to nighlty (https://consulo.help/platform/update_channels/) and enable Experimental Features(Settings->Platform and Plugins -> Experimental Features) New Unity Importer (with asmdef) and Reimport Unity Project.

Eljeyna commented 3 years ago

Don't see this feature in nightly build with restart

UPD: both on Windows and Linux (Arch)

image

image

VISTALL commented 3 years ago

About -> Check for Updates. You changed channel, but not updated to last builds

Eljeyna commented 3 years ago

Sorry for my mistakes. After some retries i am break Consulo in Windows and on Linux Importer doesn't change anything

VISTALL commented 3 years ago

You can show me errors - and I will say what you need

Eljeyna commented 3 years ago

When New Input System create a settings file, some fields "doesn't exists". With that class not visible in other scripts (but it works in Unity)

UPD: no problem with reimport in Consulo and preprocessor variables

NewInputSystem.cs image

Player.cs image

Error: "is not resolved" (red fields), no others (class found in Consulo, but marked "red" in struct and other classes) Rename doesn't help

VISTALL commented 3 years ago

It's dependency problem. If new Unity import not fix - I will test it at weekends

VISTALL commented 3 years ago

Hmm... Can you say - where class NewInputSystem? I'm idk where. If it's from you project, can you say file path, also class declaration (if it inside #if)

Eljeyna commented 3 years ago

Filepath is not necessary (but in my main project: Assets -> Scripts -> InputSystem). It's simple to get it. Install Input System 1.02 from Package Manager. Enable New Input System (Unity will ask about it) or Edit -> Project Settings -> Player -> Active Input Handling (Input System Package (New)). Then Edit -> Input System Package -> Create Settings Asset. In Assets folder Create -> Input Actions. Double click on it (or Edit Asset). In left corner create new scheme (for example, keyboard), add new action (for example, space button in search). Save asset. Close settings. In Inspector click "Generate C# class" and Apply. Automatically created required file.

image

image

And my folder if it's needed image

VISTALL commented 3 years ago

Hm. Tested and looks like I found bug.

Test it. Just remove @ from type declaration. Like class @NewInputSystem -> class NewInputSystem.

Looks like bug inside C# analyzing

Eljeyna commented 3 years ago

Full refactoring helps (strange, it's didn't works before). Пользуясь случаем, сорян за английский :D (я его использовал для общего понимания), но я его плохо знаю. Thanks for excellent IDE (love it)! Close this thread? There is one more bug (open the new one?)

VISTALL commented 3 years ago

Nope. If bug not releated to this issue - create new issue. This issue related to @ bug in C# plugin. I will fix it in few days.

Нет. Если баг не касается это задачи - создавайте новую задачку. Эта задача касается @ бага внутри C# плагина. Я поправлю в течении пару ней.

Thanks