Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

UnityEngine.UI.dll deleted when compiling for iOS

Discussion in 'Unity 5 Pre-order Beta' started by RustyFlash, Dec 11, 2014.

  1. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    Ok, not much use at debugging this, but... Every time I build my project to device (iPhone 6+) for testing, it will work... but, immediately following this I get a ton of errors regarding the UI component? Loading any project after that results in the same error.
    My only solution is the delete unity and reinstall it every time I build to device.

    Using Beta 16 on OS X.

    Code (CSharp):
    1. Missing assembly     UnityEngine.UI.dll for GUISystem. Extension support may be incomplete.
    Followed by this for every script that uses the ui,

    Code (CSharp):
    1. Assets/Scripts/EditorScript.cs(3,19): error CS0234: The type or namespace name `UI' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
    Does anyone else have this problem?
     
  2. TeamZero

    TeamZero

    Joined:
    Sep 3, 2013
    Posts:
    30
    I'm also using B16 on OS X and am not having that problem. Whenever I include
    Code (CSharp):
    1. using UnityEngine.UI;
    in my C# scripts it does not throw any errors. I've been testing Xcode build on an iPhone 6 & iPad Mini 2 without this problem occurring.
     
  3. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    It is something that has only occurred in b16? It is really odd. All is fine in the editor, but as soon as I build the Xcode project these errors then crop up *after* running on the device. Beginning to wonder if there is corruption in my project somewhere?
     
  4. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    Deleted anything non important (settings) from the project and erased and reinstalled Unity. Now it appears to work, except in the 'build' phase (prior to launching Xcode), I get this error (not sure why Unity wants to write there or what?)

    Code (CSharp):
    1. Error building Player: UnauthorizedAccessException: Access to the path "/Users/Applications" is denied.
     
  5. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    Ok, this is still driving me absolutely nuts.

    Everything is fine running in the editor but as soon as I build for device (Build or Build & Run), I get this error,

    Code (CSharp):
    1. Error building Player: IOException: Failed to Copy File / Directory from '/Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll' to '/Users/michaelware/Desktop/BaldersiOS2/Libraries/../../../../../Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll'.
    2.  
    Examining the contents of unity to "Unity.app/Contents/UnityExtensions/Unity/GUISystem/" reveals it does not have the dll mentioned?
    The contents are,
    [dir]Editor
    ivy.xml
    [dir]Standalone
    UnityEngine.UI.dll.mdb

    ?

    Totally confused by this (and also by the "Libraries/../../../../../" part of the destination.

    This then causes numerous errors from here on in,

    Code (CSharp):
    1. Assets/Scripts/EditorScript.cs(3,19): error CS0234: The type or namespace name `UI' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
    2. Assets/TextMesh Pro/Examples/Scripts/Benchmark01_UGUI.cs(6,19): error CS0234: The type or namespace name `UI' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
    X 100

    PLEASE, has anyone got any ideas?

    The only way I can rectify this is to reinstall Unity, but then I still cannot compile to device?
     
  6. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    somehow, UnityEngine.UI.dll is being deleted from Unity.app?

    The way it look to me is that on OS X it is not copying the file to the project but rather moving it there, thus halting the rest of the compile. Looking in the resulting Xcode project created, within Librarys I can see "UnityEngine.UI.dll.s" is there.

    Just to also confirm, the resulting project can be loaded into Xcode, compiled and run on the device. That works. But... With the file now missing from unity.app, I can no longer compile unless I download and reinstall unity (must remember to copy the file next time and then I can replace it each time - a workaround).
     
    Last edited: Dec 13, 2014
  7. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    Just been messing about for ages and really cannot fathom this out?

    When building for iOS, the progress bar gets to "AOT Cross Compile 9/9" and then stops with an error :-

    Copying /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll to /Users/michaelware/Desktop/BaldersiOS/Libraries/../../../../../Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll: No such file or directory

    UnityEngine.UI.dll is now no longer present in the Unity.app container.
     
  8. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    Deleted everything except for Assets/ and re-setup the project again. Now it appears to work again for the second time. All compiles ok apart from the occasional
    Code (CSharp):
    1. Error building Player: UnauthorizedAccessException: Access to the path "/Users/Applications" is denied.
    The only thing now is, when testing in the editor, if platform is set to iOS, all works ok. But when the platform is set to win/osx, then when the app changes scenes there is a huge delay before the new scene runs, resulting in a beach ball for 10-15 seconds?

    Oh well, out of one something-or-other, and into another ;)
     
  9. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    Getting the same problem (as subject title) on b17. Already logged a bug (655709); but I'm wondering if it's specific to the selected folder destination where the player is built.

    This is the error I get when I build the iOS player.

    Code (CSharp):
    1. Copying /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll to /Users/iandunlop/Desktop/Xcode/Libraries/../../../../../../Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll: No such file or directory
    I just noticed that when it builds it creates an Application folder in the root of my unity project (one up from the Assets) folder. It tries to copy the Unity application here and then fails (it's a zero byte length package).
     
  10. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    Figured out a workaround; I export the player to the root of the Unity project in question. That allows it to build without breaking the editor.
     
  11. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    On OS X, my project layout was always as such

    Users/me/documents/unity/project

    And I would build to the desktop for the Xcode project file.

    This resulted in the error mentioned and another error about user/applications (access denied?)

    I then moved the projects all to a new directory

    Users/me/unity/project

    And this cured the missing dll error, but building to the desktop still resulted in the access denied error.

    Code (CSharp):
    1. UnauthorizedAccessException: Access to the path "/Users/Applications" is denied.
    So, I now build directly into a directory in the project and now all errors are gone. Phew.

    What still baffles me is 'why' has this changed somewhere between b15 and b17, and can't we have it fixed so we can place our projects and builds where we want on OS X?
     
  12. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    Ps. Thanks for replying here idunlop, was beginning to think it was just me and I had made a pigs ear of things :)
     
  13. idunlop_oefun

    idunlop_oefun

    Joined:
    Aug 31, 2010
    Posts:
    240
    You're welcome. Perhaps that is how to reproduce the bug - building to the Desktop folder. That is what was causing me issues.
     
  14. SurvivalMachine

    SurvivalMachine

    Joined:
    Jun 21, 2013
    Posts:
    15
    I still have this problem in b18.
     
  15. RustyFlash

    RustyFlash

    Joined:
    Oct 8, 2014
    Posts:
    88
    Yes. The problem lingers. The only solution is to move your project and build location.
     
  16. SurvivalMachine

    SurvivalMachine

    Joined:
    Jun 21, 2013
    Posts:
    15
    Moving build location into inside the project folder solved this, thanks Flash80!
     
  17. CgPanda

    CgPanda

    Joined:
    Aug 23, 2012
    Posts:
    6
    Moving build location into inside the project folder solved this, thanks Flash80!

    +1
     
  18. DanSuperGP

    DanSuperGP

    Joined:
    Apr 7, 2013
    Posts:
    408
    Sounds like you guys finally tracked down some reproducible steps for this.