- Home /
NetcodeForGameObjects compilation error
When I fire up a new project in Unity 2021.2.8f1 and just import the Netcode for GameObjects package by name as mentioned on the Unity websites I constantly get the following two warnings in the console:
Script 'Packages/com.unity.collections/DocCodeSamples.Tests/CollectionsAllocationExamples.cs' will not be compiled because it exists outside the Assets folder and does not to belong to any assembly definition file. UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScripts (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,string[])
Script 'Packages/com.unity.collections/DocCodeSamples.Tests/CollectionsExamples.cs' will not be compiled because it exists outside the Assets folder and does not to belong to any assembly definition file. UnityEditor.Scripting.ScriptCompilation.EditorCompilationInterface:CompileScripts (UnityEditor.Scripting.ScriptCompilation.EditorScriptCompilationOptions,UnityEditor.BuildTargetGroup,UnityEditor.BuildTarget,int,string[])
What exactly does these warnings mean? And how can I fix them to get rid of the messages?
I am looking forward to your help. Thank you!
I was just wondering about this myself - wasn't showing in 2020.3, just showed up after upgrading project to 2021.2
Answer by andrew-lukasik · Jan 19 at 12:47 PM
Reading from the error message it looks like they forgot to upload an assembly definition or put those unit tests in a Editor
folder. You can fix this, given there won't be dozens more such errors ofc.
com.unity.collections@...
package should be in \PROJECT_NAME\Library\PackageCache
Move this specific package dir to \PROJECT_NAME\Packages\HERE
so you can modify it's content. Now, just delete this /com.unity.collections.../DocCodeSamples.Tests
directory, tests are optional. (or create assembly definition if you want to run those unit test).
Your answer
Follow this Question
Related Questions
How can i make both two cameras to follow the player but only one with control on player ? 0 Answers
Add gameObject/transform to script component slot with editor 1 Answer
Cogwheel icon in inspector 2 Answers
Is Unity 2018.1.5f1 compatible with .NET Standard? 0 Answers
MonoDevelop Error Underlinings for *.js 0 Answers