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 }
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); } }