Unity-Technologies / AutoLOD

Automatic LOD generation + scene optimization
https://blogs.unity3d.com/2018/01/12/unity-labs-autolod-experimenting-with-automatic-performance-improvements/
Other
1.84k stars 215 forks source link

Compiler Error 2018.1.3f1 #35

Closed Theobarth closed 6 years ago

Theobarth commented 6 years ago

I have got this issue when importing in a 2018.1.3 project :

Assets/AutoLOD/Scripts/Editor/MeshSimplifiers/QuadricMeshSimplifier.cs(2,7): error CS0246: The type or namespace name `UnityMeshSimplifier' could not be found. Are you missing an assembly reference?

The line are those devenv_2018-08-01_12-05-25

duncanx commented 6 years ago

I also have this issue in 2018.2

Snow-Okami commented 6 years ago

I had this same issue.

It is caused by downloading the AutoLOD package and not pulling it using git and the submodules the repo requires.

You can fix it by downloading and adding these 2 packages to your Unity Project (which are referenced here in the submodules):

UnityMeshSimplifier ConditionalCompilationUtility

After that, you MUST add a reference to UnityMeshSimplifier to your AutoLOD-Editor project. You can usually do this by right clicking the project in your IDE (I use Jetbrains) <- this issue arose due to asmdef - see edit below.

Add Reference

EDIT: Actually this does not fully solve the problem either - I found the issue to be with these new asmdef files. They do not work as intended for me I believe.

I tried both of these to no avail:

https://forum.unity.com/threads/assembly-definition-files-not-working-as-expected.511232/ https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html

A quick fix for this would be simply change the file extension of the 'UnityMeshSimplifier.asmdef' file to something like 'UnityMeshSimplifier.asmdef.bak'. This will have to do until more of this new assembly dll compiler workflow is explained.

amirebrahimi commented 6 years ago

The issue is that you cloned directly from the latest UnityMeshSimplifier instead of cloning recursively from master on this repository, which would get you the correct version of UnityMeshSimplifier. Either way, I've updated to the latest UnityMeshSimplifier in 84a096e.