potential compatibi...
 
Notifications
Clear all

potential compatibility problem with TPMC and new unity InputSystem  

arcanor
(@arcanor)
Active Member

I'm using the latest 2019 LTS release (2019.4.18f1). I have updated my editor (which is Visual Studio Community 2017) today, to version 15.9.31, which I believe is the latest. I've updated all VS packages.

I'm encountering errors when importing TPMC. I've done nothing except the following:

  1. created a new empty project
  2. changed the build target from Windows x86 to x86_64
  3. used Package Manager to install Input System 1.0.1, saying YES to reboot and set the new backend as active
  4. import TMPC (2.810, released Nov 24, 2020, which is the latest version as far as I can tell)

Not tried to even open any demo scenes. Not done any TMPC setup yet. The project has 5 errors:

  1. Assets\ootii\Assets\Framework_v1\Code\Input\UnityInputSystemSource.cs(4,19): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
  2. Assets\ootii\Assets\Framework_v1\Code\Input\UnityInputSystemSource.cs(5,19): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
  3. Assets\ootii\Assets\Framework_v1\Code\Input\UnityInputSystemSource.cs(25,24): error CS0246: The type or namespace name 'PlayerInput' could not be found (are you missing a using directive or an assembly reference?)
  4. Assets\ootii\Assets\Framework_v1\Code\Input\UnityInputSystemSource.cs(841,16): error CS0246: The type or namespace name 'Key' could not be found (are you missing a using directive or an assembly reference?)
  5. Assets\ootii\Assets\Framework_v1\Code\Input\UnityInputSystemSource.cs(24,16): error CS0246: The type or namespace name 'PlayerInput' could not be found (are you missing a using directive or an assembly reference?)

Strangely, if I create my own new C# class, and put in the "using UnityEngine.InputSystem;", I don't get an error. However that same line of code at the top of your UnityInputSystemSource.cs is unable to find the new InputSystem.

I've been looking into this for several hours, over several days. I can't understand what's going on. Any ideas?

Thanks in advance!

Quote
Topic starter Posted : 13/01/2021 4:22 pm
arcanor
(@arcanor)
Active Member

Okay, I've narrowed it down a bit. The problem seems to be in your ASMDEF files. If I remove the 4 of them then everything compiles without error. I will leave them removed for now as a workaround until you can verify and give me further guidance.

For the record, the specific files I'm referring to are:

  1. Assets\ootii\Assets\ootii.asmdef
  2. Assets\ootii\_Demos\Shared\Scripts\Editor\ootii.Demos.Shared.Editor.asmdef
  3. Assets\ootii\_Demos\ootii.Demos.asmdef
  4. Assets\ootii\Editor\ootii.Editor.asmdef
ReplyQuote
Topic starter Posted : 13/01/2021 5:31 pm
Tim
 Tim
(@timtryz)
Member Admin

This one is a bit tricky...

I use Unity's Assembly Definition Files to help cut down on compile times. With the AssDef ( 🤣 ) files, you specify the DLLs that are used by that group of code and it works well.

With Unity's asset packages (like the new Unity Input System), some people have the DLLs installed and some people don't. By default, the Unity Input System DLLs don't exist. So, I can't put them in the AssDef setup ahead of time.

That means once you install the Unity Input System, you have to add the DLLs to the existing AssDef files. I describe that process here in step #4:

https://ootii.com/knowledge-base/unity-input-system/

 

Now that the Unity Input System is officially release, I should make this a much bigger note in the normal documentation.

Let me know if that helps.

ReplyQuote
Posted : 13/01/2021 5:38 pm
Tim
 Tim
(@timtryz)
Member Admin
Posted by: @arcanor

Okay, I've narrowed it down a bit. The problem seems to be in your ASMDEF files. If I remove the 4 of them then everything compiles without error. I will leave them removed for now as a workaround until you can verify and give me further guidance.

For the record, the specific files I'm referring to are:

  1. Assets\ootii\Assets\ootii.asmdef
  2. Assets\ootii\_Demos\Shared\Scripts\Editor\ootii.Demos.Shared.Editor.asmdef
  3. Assets\ootii\_Demos\ootii.Demos.asmdef
  4. Assets\ootii\Editor\ootii.Editor.asmdef

Hah... apparently we're doing this at the same time. 🙂

That's correct. Because you're taking Unity's Assembly Definition File system out of play... totally acceptable. However, you're going to find that your compile times increase. They increase because when you write code in your folder, Unity will now compile all code in the entire project.

If assembly definition files are in-play, than Unity won't compile my code... which doesn't change on each of your compiles. If you have several of my assets, that could be 10 seconds or longer for each of your compiles. This is true for any asset developer that uses assembly definition files. 

ReplyQuote
Posted : 13/01/2021 5:43 pm
arcanor
(@arcanor)
Active Member

Thanks Tim! I have reviewed the document. When I add a reference to the new UnityEngine.InputSystem into

  1. Assets\ootii\Assets\ootii.asmdef
  2. Assets\ootii\_Demos\ootii.Demos.asmdef

the problem goes away. Your document recommends I also do

  • <project>\Assets\ootii\_Demos\ootii.Demos.asmdef

however, since there's no errors now, do I still need to add that reference? Also, your doc doesn't mention anything about 

  • Assets\ootii\_Demos\Shared\Scripts\Editor\ootii.Demos.Shared.Editor.asmdef

so I guess I just won't worry about that one?

ReplyQuote
Topic starter Posted : 13/01/2021 6:11 pm
Tim
 Tim
(@timtryz)
Member Admin

If you're not doing any updates to the demos, you can ignore them.

ReplyQuote
Posted : 14/01/2021 4:03 am
Share: