private static void ChangeAssetItemPath(object assetItem, string selectedFolderPath)
        {
#if !UNITY_5_3_PLUS
            AssetsItem item = (AssetsItem)assetItem;
            item.exportedAssetPath = selectedFolderPath + item.exportedAssetPath.Remove(0, 6);
            item.pathName          = selectedFolderPath + item.pathName.Remove(0, 6);
#else
            string destinationPath = (string)DestinationAssetPathFieldInfo.GetValue(assetItem);
            destinationPath = selectedFolderPath + destinationPath.Remove(0, 6);
            DestinationAssetPathFieldInfo.SetValue(assetItem, destinationPath);
#endif
        }
Beispiel #2
0
 private static void ChangeAssetItemPath(object assetItem, string selectedFolderPath)
 {
     if (IsOlder53VersionAPI)
     {
         AssetsItem item = (AssetsItem)assetItem;
         item.exportedAssetPath = selectedFolderPath + item.exportedAssetPath.Remove(0, 6);
         item.pathName          = selectedFolderPath + item.pathName.Remove(0, 6);
     }
     else
     {
         string destinationPath
             = (string)DestinationAssetPathFieldInfo.GetValue(assetItem);
         destinationPath
             = selectedFolderPath + destinationPath.Remove(0, 6);
         DestinationAssetPathFieldInfo.SetValue(assetItem, destinationPath);
     }
 }