Importing the Input integration causes 153 compilation errors

chris73it

Member
Hi,

I have worked with UCC 2.3.5 and Unity LTS version 2020.3.17f1 for a while and it has always worked correctly, no matter what UCC integration I have tried to use on it.
I always work with the URP pipeline (I don't think it is important in this case, but I figured I mention it.) I also use Visual Studio 2019.

Today, I wanted to introduce my students to the UCC plugin, so I created a URP project based on 2020.3.17f1.
Then I installed the new Input System using Package Manager, and I agreed to reboot Unity to switch the configuration to the new Input System.
Once Unity came back, I installed the UCC using the Package Manager. I noticed it suggested upgrading from version 2.3.5 to 2.3.6, so I did.
Then I ran the UCC installer and waited for it to complete the installation.

Up to this point, everything was fine. Notice that the active scene is the default one that appears when the URP pipeline is chosen.

Then I went to the integration page and installed the integration for the input system. At this point, I get 153 errors. I have tried to follow the exact same steps with a different machine and even using a more modern version of Unity (2021.1.16f1) and I get the exact same results. In fact, all my students get the same results (some use the desktop in the lab, some have their own laptops, and we all get the same 153 errors.) I have also spent the afternoon trying to narrow down the problem, and the description above is the result of that effort.

The errors are in the attachment.
The first error looks like this:
Assets\Opsive\Shared\Integrations\InputSystem\CharacterInput.cs(6,19): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)
I would say that they all have to do with the input system.

I tried to go to Edit->Preferences->ExternalTools and press the "Regenerate project files" button but it doesn't do any good.

On Monday at 10 AM, I have a new class with my students, and I would love to have a solution by then.

Thank you for any help you can send my way, Chris
 

Attachments

  • All_153_errors_due_to_input_integration.txt
    31.9 KB · Views: 5
One more thing: is there a way to downgrade back to UCC version 2.3.5? I would like to try that version because I never had issues with that. Even sending it to me in an attachment via email would be appreciated. Thank you!
 
Now I am confused: I managed to use UCC 2.3.5 and I am getting the exact same result after I follow the same sequence described above: 153 errors.

Why suddenly, what has worked for weeks, doesn't work anymore, no matter the UCC version (2.3.5 or 2.3.6) or the Unity version (2020.3.17f1 or 2021.1.16f1) ?
 
Based off of that error your assembly definition is not referencing the Input System assembly. Maybe this changed? As soon as the assembly definition references the Input System assembly it should work.


On Monday at 10 AM, I have a new class with my students, and I would love to have a solution by then.
Does each student have a license to the system?
 
Can you please expand a bit on how I would be able to make the assembly definition reference the Input System assembly?
I am not sure what can possibly be different given that I have used Unity 2020.3.17f1 for many different small personal projects over the past few weeks and I have never had an issue compiling the new input system integration. That you know of, is there a way to "reset Unity" and recompile things from scratch, maybe a cache somewhere that I can erase?

As for the "license to the system", I assume you mean Ultimate Character Controller. No, they do not have a license to it, in fact until yesterday, they didn't know UCC exists. But I personally have a license for UCC and some of its extensions, and Behavior Designer and its three expansions and I am considering buying the inventory product Opsive makes as well. The reason I have these licenses is that I personally use UCC and the other plugins I own to develop and sell products to my customers, but that is done independently of my teaching job.

The work I do with my students is 100% "sourcecode oriented" and not "binary oriented", i.e. we are developing our simple game projects running them directly inside the Unity editor and without generating binaries that we plan to expose to the broad video game community.

Maybe because they learn UCC from me, one day some of them will decide to buy a license for it when they develop a product for a customer, but for right now it would be wrong of me to ask them to spend $210 to buy something they know nothing about. If you think that this does not fall under "fair use" please let me know, so I can change what plugins I teach them. Thank you.
 
Can you please expand a bit on how I would be able to make the assembly definition reference the Input System assembly?
I am not sure what can possibly be different given that I have used Unity 2020.3.17f1 for many different small personal projects over the past few weeks and I have never had an issue compiling the new input system integration. That you know of, is there a way to "reset Unity" and recompile things from scratch, maybe a cache somewhere that I can erase?
In the Input System integration it comes with an assembly definition that references the input system. It sounds like this assembly definition no longer has that reference:

1631341194842.png

As for the "license to the system", I assume you mean Ultimate Character Controller. No, they do not have a license to it, in fact until yesterday, they didn't know UCC exists. But I personally have a license for UCC and some of its extensions, and Behavior Designer and its three expansions and I am considering buying the inventory product Opsive makes as well. The reason I have these licenses is that I personally use UCC and the other plugins I own to develop and sell products to my customers, but that is done independently of my teaching job.

The work I do with my students is 100% "sourcecode oriented" and not "binary oriented", i.e. we are developing our simple game projects running them directly inside the Unity editor and without generating binaries that we plan to expose to the broad video game community.

Maybe because they learn UCC from me, one day some of them will decide to buy a license for it when they develop a product for a customer, but for right now it would be wrong of me to ask them to spend $210 to buy something they know nothing about. If you think that this does not fall under "fair use" please let me know, so I can change what plugins I teach them. Thank you.
According to the Asset Store EULA each student must have a license to any per-seat assets used, even if you aren't building the binaries. If your school has some budget we have given student licenses in the past and you can get in contact with me at support@opsive.com. Unfortunately there aren't really other alternatives according to the EULA.
 
About the assembly issue, I think I found how to recreate the same screenshot on my machine that you produced on yours: does it look like anything is wrong? If so, do you know what I would need to do to fix it? Thank you.

UCC_InputSystemIntegration_Assembly.png
 
Update: I also tried to install from scratch a new Unity version and the UCC plus its integration on my old laptop and I still get the same 153 errors.
To the best of my recollection, UCC and the new Input System integration used to work fine.
The fact that I get the same 153 errors even on the desktop computers at the school where I teach and that I have never used to install Unity or anything else before, makes me think that maybe there is something wrong with the current version of the integration.
If I am wrong, could you please help me debug this issue further: I feel I ran out of things to try. Thank you, I appreciate any help you can send my way: the UCC is the centerpiece of my workflow and if this doesn't work on any of my machines where it used to work until few days ago, I am basically unable to do any productive work. Thanks again.
 
I managed to get rid of the 153 errors. Here are the steps I followed:

1. From the Project tab, I navigated to the Asset->Opsive->Shared->Integrations->InputSystem folder.

2. I clicked on the file named "CharacterInput". Notice that I did not double-click it, just a normal click will suffice.

3. From the Inspector, I looked at the section titled "Assembly Information" where the Filename field is "Opsive.Shared.dll" and below the Definition File field is "Opsive.Shared" [see 1st picture below]

4. I right-clicked on "Opsive.Shared" and selected the only item in the context menu that appeared named "Properties..." -> This causes the window content to change to a new one [see 2nd picture below]

5. In the Assembly Definition References section I noticed that the "Use GUIDs" field is an empty list (it says "Missing Reference"), so I clicked on the plus sign (all the way to the right side of the window, close to the minus sign), and in the search box at the top of the window that appeared I typed "input" in order to filter out all items below: at this point, it was simple to see that one of the items is named "Unity.InputSystem" and I double-clicked on it [see 3rd picture below]

At this point, I pressed the play button that triggered a recompilation, and all 153 errors were gone.

This is probably what you told me a few days ago, but given my lack of experience with assemblies I couldn't quite figure out what you meant me to do. Anyway, in hindsight, this looks pretty logical now, and I would like to thank you for your support over the past few days.
 

Attachments

  • OpsiveShared_requires_UnityInputSystem_part1.png
    OpsiveShared_requires_UnityInputSystem_part1.png
    726.1 KB · Views: 78
  • OpsiveShared_requires_UnityInputSystem_part2.png
    OpsiveShared_requires_UnityInputSystem_part2.png
    213.9 KB · Views: 82
  • OpsiveShared_requires_UnityInputSystem_part3.png
    OpsiveShared_requires_UnityInputSystem_part3.png
    189.4 KB · Views: 88
Last edited:
I managed to get rid of the 153 errors. Here are the steps I followed:

1. From the Project tab, I navigated to the Asset->Opsive->Shared->Integrations->InputSystem folder.

2. I clicked on the file named "CharacterInput". Notice that I did not double-click it, just a normal click will suffice.

3. From the Inspector, I looked at the section titled "Assembly Information" where the Filename field is "Opsive.Shared.dll" and below the Definition File field is "Opsive.Shared" [see 1st picture below]

4. I right-clicked on "Opsive.Shared" and selected the only item in the context menu that appeared named "Properties..." -> This causes the window content to change to a new one [see 2nd picture below]

5. In the Assembly Definition References section I noticed that the "Use GUIDs" field is an empty list (it says "Missing Reference"), so I clicked on the plus sign (all the way to the right side of the window, close to the minus sign), and in the search box at the top of the window that appeared I typed "input" in order to filter out all items below: at this point, it was simple to see that one of the items is named "Unity.InputSystem" and I double-clicked on it [see 3rd picture below]

At this point, I pressed the play button that triggered a recompilation, and all 153 errors were gone.

This is probably what you told me a few days ago, but given my lack of experience with assemblies I couldn't quite figure out what you meant me to do. Anyway, in hindsight, this looks pretty logical now, and I would like to thank you for your support over the past few days.
Thanks so much for posting this. I'm a newcomer to the asset and spent far too long trying to troubleshoot this after following the documentation to the letter.

Same situation as yourself even in a new project on multiple versions: Assets/Opsive/Shared/Integrations/InputSystem is not referencing Unity.InputSystem. Feels like this is something which either needs fixing in the integration asset or at least putting in the setup docs if this is expected behaviour.
 
Hi!

I was there with the 153 errors. In my case I had actually ended up with two versions of CharacterInput.cs because I might have installed the integration two times using different media (can't remember, hours are dark). The other one was under Opsive/Shared/Integrations, and I ended up deleting that one, which resolved the error because it was bundled under the Opsive.Shared asmdef which doesn't reference UnityEngine.InputSystem. Took me a while to figure out there were actually two copies of the same script under those folders.

So, lessons learned:
- Needs to be just Opsive/Shared/Input
- The file Opsive/Shared/Input/InputSystem/Opsive.Shared.Integrations.InputSystem.asmdef needs to reference Unity.InputSystem
 
ok..question...now i get errors because the locomotion handler scripts are using the old input types like getaxisraw??? did i miss something?
 
ok..question...now i get errors because the locomotion handler scripts are using the old input types like getaxisraw??? did i miss something?
You might have. Did you follow the instructions? Because you should have replaced components on your character(s). You may also need to update any prefabs/scenes you have with additional characters.
 
I managed to get rid of the 153 errors. Here are the steps I followed:

1. From the Project tab, I navigated to the Asset->Opsive->Shared->Integrations->InputSystem folder.

2. I clicked on the file named "CharacterInput". Notice that I did not double-click it, just a normal click will suffice.

3. From the Inspector, I looked at the section titled "Assembly Information" where the Filename field is "Opsive.Shared.dll" and below the Definition File field is "Opsive.Shared" [see 1st picture below]

4. I right-clicked on "Opsive.Shared" and selected the only item in the context menu that appeared named "Properties..." -> This causes the window content to change to a new one [see 2nd picture below]

5. In the Assembly Definition References section I noticed that the "Use GUIDs" field is an empty list (it says "Missing Reference"), so I clicked on the plus sign (all the way to the right side of the window, close to the minus sign), and in the search box at the top of the window that appeared I typed "input" in order to filter out all items below: at this point, it was simple to see that one of the items is named "Unity.InputSystem" and I double-clicked on it [see 3rd picture below]

At this point, I pressed the play button that triggered a recompilation, and all 153 errors were gone.

This is probably what you told me a few days ago, but given my lack of experience with assemblies I couldn't quite figure out what you meant me to do. Anyway, in hindsight, this looks pretty logical now, and I would like to thank you for your support over the past few days.
Thanks for the write-up, this solved my issue too! Saved many many hours!!!!

(I upgraded from 2021.2.19 to 2021.3.2f1 and it triggered this issue)
 
I had a similar issue. I'm using Unity 2020.2.1f1 Personal.

1.) I created a brand new 3D project.
2.) Installed the new Unity input system package.
3.) Imported the UCC package.
4.) Installed the integrations input system package.

I then get 14 errors. I wound up modifying the file: Opsive.Shared.Integrations.InputSystem with the contents:
{
"name": "Opsive.Shared.Input.UnityInputSystem",
"rootNamespace": "",
"references": [
"Unity.InputSystem",
"Opsive.Shared",
"Opsive.UltimateCharacterController"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Prior to that, there were only the first two references. No idea why. When I hit build in Visual Studio, I'd get other errors like in the images. I now get 829 errors. The ObjectPool inside of SpawnObject.cs says it's not in the namespace, but it is there.

So then I exit Visual Studio and Unity. Upon restarting Unity though, it says there's compilation errors, so I got into Safe Mode. Upon entering Safe Mode, there are no errors shown. When I open up Visual Studio, I still have 829 errors.

So no errors in Unity, but after opening the Demo scene, there's now other errors of not being able to load scripts onto various prefabs. This is highly strange. It's like references were lost but not really. As an example, a prefab has the Health.cs script attached, but it says it can't load it. When I try to just drag it onto the prefab, it says it can't because it doesn't inherit from a native class. It does though obviously.

When I try and create a new scene, now there's no more menu option for anything Opsive. The Tools menu disappears.

So in general, I think there's something amiss with the integrations package. I've experienced this with Behavior Designer as well. I've been able to fix those errors by actually modifying the source code--the Tooltip annotation is something I recall there being a names clash with Unity's Tooltip, so I had to fully qualify these. Otherwise, it would not compile. For the UCC integration input errors though, I just can't fix it. I started with a new project, and I just can't get it to integrate.

So I'm just going to forgo trying to fix it and use Unity's old input system. If this has something to do with the Unity version I'm using, I'd gladly change it.
 

Attachments

  • strangeness.jpg
    strangeness.jpg
    145.5 KB · Views: 6
  • 829-errors.jpg
    829-errors.jpg
    137.2 KB · Views: 6
  • ObjectPoolError.jpg
    ObjectPoolError.jpg
    104.9 KB · Views: 6
I had a similar issue. I'm using Unity 2020.2.1f1 Personal.

1.) I created a brand new 3D project.
2.) Installed the new Unity input system package.
3.) Imported the UCC package.
4.) Installed the integrations input system package.

I then get 14 errors. I wound up modifying the file: Opsive.Shared.Integrations.InputSystem with the contents:
{
"name": "Opsive.Shared.Input.UnityInputSystem",
"rootNamespace": "",
"references": [
"Unity.InputSystem",
"Opsive.Shared",
"Opsive.UltimateCharacterController"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

Prior to that, there were only the first two references. No idea why. When I hit build in Visual Studio, I'd get other errors like in the images. I now get 829 errors. The ObjectPool inside of SpawnObject.cs says it's not in the namespace, but it is there.

So then I exit Visual Studio and Unity. Upon restarting Unity though, it says there's compilation errors, so I got into Safe Mode. Upon entering Safe Mode, there are no errors shown. When I open up Visual Studio, I still have 829 errors.

So no errors in Unity, but after opening the Demo scene, there's now other errors of not being able to load scripts onto various prefabs. This is highly strange. It's like references were lost but not really. As an example, a prefab has the Health.cs script attached, but it says it can't load it. When I try to just drag it onto the prefab, it says it can't because it doesn't inherit from a native class. It does though obviously.

When I try and create a new scene, now there's no more menu option for anything Opsive. The Tools menu disappears.

So in general, I think there's something amiss with the integrations package. I've experienced this with Behavior Designer as well. I've been able to fix those errors by actually modifying the source code--the Tooltip annotation is something I recall there being a names clash with Unity's Tooltip, so I had to fully qualify these. Otherwise, it would not compile. For the UCC integration input errors though, I just can't fix it. I started with a new project, and I just can't get it to integrate.

So I'm just going to forgo trying to fix it and use Unity's old input system. If this has something to do with the Unity version I'm using, I'd gladly change it.

The "153 errors" issue is caused by namespace change. Search and find CharacterInput.cs and if there are two copies, there's your culprit. I listed the necessary action in my earlier post.
 
I recently went through a test with this and you will want to make sure you are running the latest version of the character controller. In version 1.4.7 (I think?) I made a change to the Shared Assembly Definition which will get rid of the errors when importing the input system. In my test I used Unity 2021.3 and didn't have any errors importing the input system.
 
Top