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 in Unity 2017 #34

Closed kevinfoley closed 6 years ago

kevinfoley commented 6 years ago

Line 808 of LODVolume is this:

var prefab = PrefabUtility.GetCorrespondingObjectFromSource(go);

This requires Unity 2018, but you don't have a corresponding compiler directive. You'll need to change this like you did in AutoLOD:

#if UNITY_2018_2_OR_NEWER
                var prefab = PrefabUtility.GetCorrespondingObjectFromSource(go);
#else
                var prefab = PrefabUtility.GetPrefabParent(go);
#endif
amirebrahimi commented 6 years ago

Fixed with 7f51dea Happy to take PRs from you in the future if that is easier.