Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

IOException: Failed to Copy File

Discussion in 'Windows' started by Boonyarit, Jul 13, 2015.

  1. Boonyarit

    Boonyarit

    Joined:
    Mar 11, 2015
    Posts:
    2
    For build Windows phone 8 app
    I can't copy IAPMock.xml file to target VS project for WP8
    I used
    Code (CSharp):
    1. //Copy IAPMock.xml in the target VS Project for WP8
    2. string pathToIAPMock = Application.dataPath + "\\Plugins\\WP8\\IAPMock.xml";
    3. string targetPathToIAPMock = pathToBuiltProject + "\\" + PlayerSettings.productName + "\\IAPMock.xml";
    4. UnityEditor.FileUtil.DeleteFileOrDirectory(targetPathToIAPMock);
    5. UnityEditor.FileUtil.CopyFileOrDirectory(pathToIAPMock, targetPathToIAPMock);
     
  2. Tomas1856

    Tomas1856

    Unity Technologies

    Joined:
    Sep 21, 2012
    Posts:
    3,808
    I think you have to remove whitespaces from PlayerSettings.productName. Check if C:/Users/yim_b_000/Desktop/Soom-La/Test Project really exist, it might be C:/Users/yim_b_000/Desktop/Soom-La/TestProject
     
  3. Boonyarit

    Boonyarit

    Joined:
    Mar 11, 2015
    Posts:
    2
    Thank you.