如何在 Unity 5 中切换到基于深度的渲染模式

How to switch to Depth-Based render mode in Unity 5

我将我的项目从 Unity 4 移到了 Unity 5,从那时起,每次我为 iOS 或 Android 构建时,Unity 都会抛出以下错误:

如何永久切换到基于深度的模式,这样它就再也不会询问了?

With Unity 5 is recommended to switch to Depth-Based render mode or Legacy mode with atlases only. Please see Unity 5 Compatibility docmentation page for more information. Do you want to switch to Depth-Based mode?

我使用的资产商店中的第 3 方库 Mad Level Manager 从代码中抛出了这个错误。覆盖

bool sw = EditorUtility.DisplayDialog(
        "Unity 5 Compatibility", "With Unity 5 .......", "Yes (Recommended)", "No");
if (sw) {
    renderMode = RenderMode.DepthBased;
}

renderMode = RenderMode.DepthBased;