Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac Silicon, game console, and additional platform support #86

Open
TCROC opened this issue Jul 6, 2023 · 11 comments
Open

Mac Silicon, game console, and additional platform support #86

TCROC opened this issue Jul 6, 2023 · 11 comments

Comments

@TCROC
Copy link

TCROC commented Jul 6, 2023

I mentioned something I am trying out over here in this issue:

SoftwareGuy/ENet-CSharp#41
SoftwareGuy/ENet-CSharp#41 (comment)

I'm just opening an issue to track it here as well as it is specifically Ignorance that I am using to test it with. Quote of comment here for ease of reading:

@SoftwareGuy I was doing some digging around on this as I'm also in need of Mac and hopefully soon PlayStation, XBox, and Switch support. I found this:

https://docs.unity3d.com/Manual/PluginInspector.html

And this:

https://forum.unity.com/threads/how-to-setup-this-windows-player-c-source-code-plugins-for-il2cpp.537269/

Reading through it, it sounds like Unity supports including native C code in your project and it will compile it in the il2cpp build process. It won't work in mono builds or Editor (because of mono).

I'll try it out with enet and if it works, it should make it so enet supports all platforms unity compiles il2cpp with (which I think is all of them).

I'll keep this issue updated with my findings and put in a PR for review if it works on my local.

@SoftwareGuy
Copy link
Owner

Ok, that'll be great. Good to know that Unity might be able to do the compiling, although it might need some compile defines for it to compile successfully.

@TCROC
Copy link
Author

TCROC commented Jul 6, 2023

Good call. I'm scrolling through the c file now and seeing those ifdefs. I'll keep you updated on my findings

@TCROC
Copy link
Author

TCROC commented Jul 6, 2023

Good news, mac compiled. Now I'm trying uploading to the AppStore / Test Flight. Then gonna test it on intel and m1 macs with some users tonight

@SoftwareGuy
Copy link
Owner

Awesome. This will mean I don't have to go to the lengths of having to fix up the libraries when Unity can do it for us, only downside I think would be if it's trying to load the library or something from disk? Unless it's marked as "embedded" so it doesn't try to load libenet.dylib or enet.dll?

@TCROC
Copy link
Author

TCROC commented Jul 7, 2023

Have not tested yet. Had to recompile cause Apple rejected my build because of different libraries. I'm recompiling and reuploading.

I don't think that will be an issue. Only downside I've been able to identify is Mono builds w
and Unity Editor doesn't work with it (because editor relies on Mono).

Actually... I'm not sure about the Mono builds. I'll have to test. I wonder if Unity still compiles C code for mono builds. If so, then the only thing precompiled libraries will be needed for is the Unity Editor.

@TCROC
Copy link
Author

TCROC commented Jul 7, 2023

Update:

I finally got it to compile and upload to App Store Connect. Then it got flagged for not indicating whether or not is uses non exempt encryption...

I set the setting and triggered another build. Hopefully this one makes Apple happy :)

@TCROC
Copy link
Author

TCROC commented Jul 8, 2023

Update:

Yay! AppStore Connect is happy! Gonna try it out tomorrow and see how it actually works at runtime.

@SoftwareGuy
Copy link
Owner

Sweet. This'll be great to know!

@TCROC
Copy link
Author

TCROC commented Jul 11, 2023

Update:

Things seem to be working for mac Intel (x86_64).

I'm going to run some more tests on it tomorrow. Haven't had a chance to test Mac M1 yet. Will also try to do that tomorrow.

@SoftwareGuy
Copy link
Owner

Any updates on this?

@TCROC
Copy link
Author

TCROC commented Jul 16, 2023

Yep Mac Intel seems to be working. I got caught up in some other testing with my users and didn't get a chance to do Mac ARM yet. Gonna try to do that this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants