Exemple #1
0
    private void Find()
    {
        if (selectShader == null)
        {
            unusedStaticRes = null;
            return;
        }

        AssetDatabase.TryGetGUIDAndLocalFileIdentifier(selectShader, out string guid, out long fileId);
        string path = AssetDatabase.GetAssetPath(selectShader);

        Debug.LogError($@"GUID: {guid} 
                        localId: {fileId} 
                        path: {path}", selectShader);
        if (string.IsNullOrEmpty(guid))
        {
            unusedStaticRes = null;
            return;
        }

        if (guid == "0000000000000000f000000000000000" || path.ToLower().Contains("unity_builtin_extra"))
        {
            unusedStaticRes = null;

            return;
        }

        FindProject.FindWithGuid(guid, fileId, list => { unusedStaticRes = list.ToArray(); });
    }
Exemple #2
0
    private void Find()
    {
        if (selectMaterial == null)
        {
            unusedStaticRes = null;
            return;
        }

        AssetDatabase.TryGetGUIDAndLocalFileIdentifier(selectMaterial, out string guid, out long localId);
        Debug.LogError($"GUID: {guid} \n localId: {localId}", selectMaterial);
        if (string.IsNullOrEmpty(guid))
        {
            unusedStaticRes = null;
            return;
        }

        FindProject.FindWithGuid(guid, localId, (o) => { unusedStaticRes = o.ToArray(); });
    }