A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in '2019.3 Beta' started by HonorableDaniel, May 17, 2019.
Has this feature landed yet in this alpha? I didn't see mention of it in the release notes.
Yes, please... I'm only waiting for it to test the Alpha! Is there any estimative?
Current estimate is 2019.3.0a5 - a6, so around 2 - 3 weeks from now.
Yippee! I absolutely can't wait! This is gonna open up a whole new world of possibilities!
@LeonhardP would he possible to create plugins without precompiling them? I mean be able to behave like iOS or Android where we can put in Unity .h .mm and .java files and make Unity compile them for us.
I think you can already do this if you're using IL2CPP scripting backend. See this: https://docs.unity3d.com/Manual/macOSPlayerCPlusPlusSourceCodePluginsForIL2CPP.html
I meant in Objective C like on iOS.
We should be able to support .m and .mm files if you put them in Unity project. If that doesn't work, mind submitting a bug report?
Bump. a6 is out now, any word if this feature has shipped?
It landed to alpha 7 last week. So you should be able to get your hands on it next week.
Thanks for the update.
It's here in a7!
OSX: Unity can now generate Xcode project for macOS standalone build
1) When I build it doesn't create a folder. It would be nice if it put all of the contents into a folder automatically.
2) I don't seem to have access to the source code like it is on iOS. I was hoping that we would have access to more source code this way, just like how on iOS I can modify AppDelegate and stuff like that. @Tautvydas-Zilys Any chance this will be exposed?
Unity's macOS support doesn't really have the same source code structure as iOS does. What specifically would you like exposed?
Does it have a layer written in Objective C? If so that would be what to expose. I'd like to see the NSWindow class. Also I'd like control over the dark mode and NSMenu visibility.
There is an Objective C layer but historically it was not designed to be exposed and customizable. It's a good feedback and we'll think about what can be done. We also considering adding more control over NSMenu but nothing specific yet.
I was happy to find that Unity 2019.3 was able to generate codesigned XCode projects ready for upload to the Mac App Store, which I thought would have fixed the nightmarish and currently impossible process of uploading correctly packaged apps to the Mac AppStore.
Unfortunately, it still doesn't seem to work properly.
When I make a build with the Scripting Backend IL2CPP I get the following error:
.app/Contents/Frameworks/GameAssembly.map: No such file or directory
and when I build with the Scripting Backend Mono I get the following error:
.app/Contents/Frameworks/MonoBleedingEdge: bundle format unrecognized, invalid, or unsuitable
Either way, it seems like an insurmountable problem, yet again, to clear this hurdle.
I have tried innumerable permutations in order to get it codesigned correctly but it always stops at one of these two points.
Any idea if there will be a way around this block in future updates?
Does this feature mean it would be possible to upload and sign an app using just a windows pc?
A mac is still required in order to build the project and codesign executables.
Would you mind sharing your build logs? In Xcode go to Report navigator and press Save button in order to export the log. Also some repro steps would be helpful.
When I build with the IL2CPP, it won't complete the build and I have attached the Report log Below.
When i build with the Mono Scripting Backend it will successfully build and play it, but it fails on the last codesign upon validation here: (reports also attached)
2019-07-16 14:14:37 +0000 Writing entitlements for <IDEDistributionItem: 0x7f8ad601b030 'XXXXXX.XXXXX' '<DVTFilePath:0x7f8ad4ef8840:'/Users/XXXXXXXXXLibrary/Developer/Xcode/Archives/2019-07-16/XXXXXXXX16-07-2019, 16.13.xcarchive/Products/Applications/XXXXXXXX.app'>'> to: /var/folders/22/dn5q5z554p91s14y49gqklxw0000gn/T/XcodeDistPipeline.suv/entitlements7F1N81
2019-07-16 14:14:37 +0000 Running /usr/bin/codesign '-vvv' '--force' '--sign' 'FAB1C0720E4AD302A0B84460E1E5329355BAF35E' '--preserve-metadata=identifier,flags' '--entitlements' '/var/folders/22/dn5q5z554p91s14y49gqklxw0000gn/T/XcodeDistPipeline.suv/entitlements7F1N81' '/var/folders/22/dn5q5z554p91s14y49gqklxw0000gn/T/XcodeDistPipeline.suv/Root/Applications/XXXXXXX.app'
2019-07-16 14:14:38 +0000 /var/folders/22/dn5q5z554p91s14y49gqklxw0000gn/T/XcodeDistPipeline.suv/Root/Applications/XXXXXXX.app: code object is not signed at all
In subcomponent: /private/var/folders/22/dn5q5z554p91s14y49gqklxw0000gn/T/XcodeDistPipeline.suv/Root/Applications/XXXXXXXXX.app/Contents/Frameworks/MonoBleedingEdge/etc/mono/config
2019-07-16 14:14:38 +0000 2019-07-16 14:14:38 +0000
2019-07-16 14:14:38 +0000 /usr/bin/codesign exited with 1
2019-07-16 14:14:38 +0000 2019-07-16 14:14:38 +0000
I tried removing the Unity IAP ( made no difference ). It was originally an IOS project that was converted to Mac build. It used to have GoogleMobileAds which I subsequently removed. Its Linear color space and Auto Api for Mac.
Thanks a lot for the report! From the IL2CPP log it seems that some of the files did not make it into the generated xcode project. When building in Unity did you notice any errors in the console? Are you able to build an empty Unity project this way? If it's specific to your game it would be great if you shared your Unity project with us using "Help/Report a bug" tool so we could reproduce the problem on our end.
Now that you mention it, I did find this error warning on IL2CPP build:
Error: Could not load signature of UnityEngine.Purchasing.UIFakeStore:GetOkayButton due to: Could not load file or assembly 'UnityEngine.UI, Version=18.104.22.168, Culture=neutral, PublicKeyToken=null' or one of its dependencies. assembly:UnityEngine.UI, Version=22.214.171.124, Culture=neutral, PublicKeyToken=null type:<unknown type> membernull) signature:<none>
Unity.UI is checked in the package manager...
When building with Mono this warning does not appear
I will share the Unity project with you using "Help/Report a bug" tool ASAP
I made an empty project build and was confronted with these errors in xcode ( see attached ) when attempting to archive.
As with the full project, it fails when attempting to codesign the config file in the MonoBleedingEdge Folder in the Frameworks
Seems like there are two separate issues with generated IL2CPP project and codesign in general. We will take a look, thanks for letting us know!
My app is having problems in fullscreen mode, can't access the doc or menu bar. Please open this stuff up so that I can make my app feel more like a native app.
Could you provide any documentation on this feature? I see just main.cpp and PlayerMain call. Probably an extern function from UnityPlayer.dylib.
How can I get windows mode? May be there are more options to control the target render surface of some UIView etc.
How can I access window Menu?
It looks like a very low level. Could you assist on this?
Unity, could you give an update on this topic? Thanks.
We currently have a fix waiting to be merged into the main branch. It will probably take a few days. Once that happens, it should be in the next alpha. So hopefully in 2020.2.0a8, but possibly in 2020.2.0a9.
My comment is solely in regards to using loose .mm and .m files. Sorry for any caused confusion.
Are we able to edit the xcode project (eg. adding an entitlement file) in a post build script like we can do with iOS with the XCode API?
At the moment this doesn't seem to work:
public static void PostProcess(BuildTarget buildTarget, string buildPath)
var project = new PBXProject();
-> UnauthorizedAccessException: Access to the path '/Users/me/Builds/MyApp/MyApp.xcodeproj' is denied.
You should be able to. Is that the right path?
Yeah the path is correct, I also tried reading a dummy .txt file in the same folder and it worked fine.
Could it be a race condition? My script running while Unity hasn't released the project file yet?
@Tautvydas-Zilys It looks like the project doesn't pick up any of the external libraries/bundles. A standard build grabs everything it needs, but an xcode project has none of them.
Are supposed to do this manually or is there something special to do? All my libraries have the mac os x64 platform enabled in the inspector.
Sorry I missed your last reply.
Regarding the script not working: did you try placing a breakpoint in that function and seeing whether the xcode project is on disk at that time?
As for the external libraries bundles, looks like you're running into this issue: https://issuetracker.unity3d.com/issues/macos-bundle-plugins-are-not-linked-on-xcode-project-export
The fix is planned for 2019.4. I don't have an ETA for it unfortunately. Until it is fixed, you may be able to work around it by editing the Xcode project yourself.
Thanks I'll give it a go.
New 2019.4.2 came out today but reading the changelog it doesn't look like it includes a fix for this
@Tautvydas-Zilys So I did a few tests:
- Added a breakpoint, the file is there. I'm able to double click on it and open it in xcode.
- I checked the file permissions and all users have read/write access
- I used the Finder's Go tool to go directly to the file location I get from the code, and it is the right file.
scratching me head
Ah I see the mistake. MyApp.xcodeproj is a folder, not a file. Try this:
var project = new PBXProject();
Ha good catch! Awesome that was it, thanks so much for your help!
(Btw the helper method PBXProject.GetPBXProjectPath() ,which I think usually takes care of this, only seems to work with iOS project structures. It returns a wrong path with mac os projects).