Error creating a project

Hi all,

When creating a new project, a window appears informing me that there are errors and that I must enter ‘Safe Mode’ to fix them. Upon entering I see that there are 86 errors similar to the following:

Library\PackageCache\com.unity.test-framework@1.1.29\UnityEditor.TestRunner\TestRunner\Callbacks\WindowResultUpdater.cs(49,37): error CS0246: The type or namespace name ‘ITestAdaptor’ could not be found ( are you missing a using directive or an assembly reference?)

Library\PackageCache\com.unity.ugui@1.0.0\Runtime\UI\Core\Button.cs(13,27): error CS0246: The type or namespace name ‘Selectable’ could not be found (are you missing a using directive or an assembly reference?)

Does anyone know why this happens?

Kind regards

This is the 2D forum, it isn’t for posts about project creation problems. It’s about 2D features.

I would recommend posting on the Package Manager, Testing or UI sub-forums.

It looks like a versioning issue with mismatched packages though somehow.

I can move your post to any of those forums if you wish.

Hi Melv May,

Yes, no problem, you can move the message where you think is most convenient. I posted it here because the error appears when creating a 2D project, I’m sorry for the error (I haven’t tried it when creating a 3D project).

Kind regards

Possibly this noise:

Extra unwanted packages in new projects (collab, testing, rider and other junk):

https://discussions.unity.com/t/846703/2

About the fastest way I have found to make a project and avoid all this noise is to create the project, then as soon as you see the files appear, FORCE-STOP (hard-kill) Unity (with the Activity Manager or Task Manager), then go hand-edit the Packages/manifest.json file as outlined in the above post, then reopen Unity.

Sometimes the package system gets borked from all this unnecessary churn and requires the package cache to be cleared:

https://stackoverflow.com/questions/53145919/unity3d-package-cache-errors/69779122

1 Like

Thanks for answering Kurt-Dekker, but unfortunately the solution you propose doesn’t work for me. The same errors appear.

It seems very strange to me because everything is freshly installed and I have not changed any of the default configuration.

It’s also very odd because those are two independent packages so something fundamental is going wrong or some kind of corruption. Maybe come out the project and delete the Library/Obj/Log folders and try again. The packages you have should be appropriate for your version of Unity.

You can also go to Help and select to reset package defaults. Or just try creating a new project.

Hi Melv May,

It hasn’t worked. The error appears when I create projects, both 2D and 3D. The projects that I have created before I can open them without problems.

The only thing that has changed is that I have reinstalled Unity to a newer version. I’m going to try downloading the old version to see if that’s the problem, but that will take a little while because my internet speed is slow.

When I have done it, I will comment if it has worked.

Are you using the latest Hub? Maybe it’s related to the new v3 Hub.

I finally got it :).

I have reinstalled the old version of the editor (2021.2.0f1), but I have installed it manually, without using Unity Hub.

All this has happened because the Srite Editor stopped working for me. Since I couldn’t find a way to solve it, I uninstalled everything: the editor, the hub and all the Unity folders I found on the computer, leaving it as if it had never been installed. Installing the latest versions of everything (Hub 3.0.1 and Editor 2021.2.10f1) is when I’ve had these issues.

PS: If anyone has problems activating the license with version 3.0.1, I want to tell them that I solved it by installing version 2.4.5 of Unity Hub. There is another forum post about this and the bug is already reported.

Thank you all for your time

This might be solved in the Unity Hub 3.1 beta but glad you got it sorted.