Exemple #1
0
    public static bool IsMaterialPath(string path, string id)
    {
        if (string.IsNullOrEmpty(path))
        {
            throw new ArgumentNullException(nameof(path));
        }

        if (path.StartsWith("Packages"))
        {
            return(false);
        }

        if (path.EndsWith(".mat"))
        {
            return(URP2DConverterUtility.DoesFileContainString(path, new string[] { id }));
        }

        return(false);
    }
Exemple #2
0
    public static bool IsPrefabOrScenePath(string path, string[] ids)
    {
        if (string.IsNullOrEmpty(path))
        {
            throw new ArgumentNullException(nameof(path));
        }

        if (path.StartsWith("Packages"))
        {
            return(false);
        }

        if (path.EndsWith(".prefab", StringComparison.OrdinalIgnoreCase) || path.EndsWith(".unity", StringComparison.OrdinalIgnoreCase))
        {
            return(URP2DConverterUtility.DoesFileContainString(path, ids));
        }

        return(false);
    }