示例#1
0
        protected override void reimport(SearchJob job, SerializedProperty prop, SearchResult result)
        {
            ImportableSearchAssetData assetData = (ImportableSearchAssetData)job.assetData;
            AssetImporter             importer  = assetData.GetImporter();
            MethodInfo m = AssetImporterMethodUtil.GetMethodForProperty(importer, prop);

            if (m != null)
            {
                m.Invoke(importer, new object[] { replaceValue });
                result.replaceStrRep = replaceValue.ToString();
            }
            else
            {
                result.replaceStrRep = "Unsupported";
            }
        }
示例#2
0
        protected override void reimport(SearchJob job, SerializedProperty prop, SearchResult result)
        {
#if PSR_FULL
            AssetImporter importer = AssetImporter.GetAtPath(job.assetData.assetPath);
            MethodInfo    m        = AssetImporterMethodUtil.GetMethodForProperty(importer, prop);
            if (m != null)
            {
                m.Invoke(importer, new object[] { replaceValue });
                importer.SaveAndReimport();
                result.replaceStrRep = replaceValue.ToString();
            }
            else
            {
                result.replaceStrRep = "Unsupported";
            }
#endif
        }