Example #1
0
        private static void ChangeAssetItemPath(object assetItem, string selectedFolderPath)
        {
            var destinationPath = (string)DestinationAssetPathFieldInfo.GetValue(assetItem);

            destinationPath = selectedFolderPath + destinationPath.Remove(0, destinationPath.IndexOf('/'));
            DestinationAssetPathFieldInfo.SetValue(assetItem, destinationPath);
        }
        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
        }
Example #3
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);
     }
 }