- Home /
Call Unity class in XCode
Hi, I have imported my unity generated xcode project into my other xcode project. I want to call unity class when I click a button in my xcode project. However first I'm not sure what class to call and second from what I know the class to call should be a .m class and all the classes in my unity xcode project are .mm classes.
I'll appreciate if someone can help me with this.
Thanks
Answer by Anne-Pier · Apr 25, 2018 at 09:08 PM
Honestly how has nobody answered this yet... https://github.com/miyabi/unity-swift here's an extremely easy method of doing it with Swift. You could also do this in a .mm, you don't need .m just use UnitySendMessage, first parameter is the object, second is the function, third is the string parameter your function must have.