using System.Collections.Generic; using System; using UnityEngine; namespace UnityEditor.Rendering { public partial class MaterialUpgrader { /// /// Material Upgrader dialog text. /// [Obsolete("DialogText has been deprecated. #from(6000.3)")] public static class DialogText { /// Material Upgrader title. public static readonly string title = "Material Upgrader"; /// Material Upgrader proceed. public static readonly string proceed = "Proceed"; /// Material Upgrader Ok. public static readonly string ok = "OK"; /// Material Upgrader cancel. public static readonly string cancel = "Cancel"; /// Material Upgrader no selection message. public static readonly string noSelectionMessage = "You must select at least one material."; /// Material Upgrader project backup message. public static readonly string projectBackMessage = "Make sure to have a project backup before proceeding."; } /// /// Checking if project folder contains any materials that are not using built-in shaders. /// /// List if MaterialUpgraders /// Returns true if at least one material uses a non-built-in shader (ignores Hidden, HDRP and Shader Graph Shaders) [Obsolete("Please directly use ProjectContainsNonAutomaticUpgradePath now. #from(6000.3)")] public static bool ProjectFolderContainsNonBuiltinMaterials(List upgraders) { string[] pathsWhiteList = new[] { "Hidden/", "HDRP/", "Shader Graphs/" }; foreach (var material in AssetDatabaseHelper.FindAssets(".mat")) { if (material.shader.name.ContainsAny(pathsWhiteList)) continue; if (!IsMaterialUpgradable(upgraders, material)) return true; } return false; } } }