Calling objective C functions

Hi all,

I touched on this in another post, but thought I should split it to its own topic.

  1. Once you compile a Unity project for the iPhone, are you able to edit the XCode project before doing the final compile to add things ‘around’ the Unity game?

  2. How can we call Objective C functions from within Unity script (assuming we can do (1) above). According to Dreamora: with 1.1 and iPhone Advanced, you can expose obj c functionality to the scripting from what mentioned, then that would be possible.
    Could somebody elaborate on this?

Kind regards,
Peter

This is from Stinkbots Unity3D iPhone extension pack:
Intra-engine communication happens through PlayerPrefs. These calls aren’t atomic. i.e. After you call “getInput”, you can’t be sure that the “sb_result” will exist immediately after the engine is unpaused. In a world without direct function calls and return values, you have to write your code to be a little more forgiving. I know it’s imperfect, but hey, it works today

However, Dreamora hinted at a solution that may be atomic/synchronous?

EDIT: Yes, we will be using iPhone advanced

you will have to wait for 1.1 until you can expose Obj C functions to the scripting. until then this “pipe driven” communication is the only way you have (ok not the only but the alternative is long winded enough that it makes little sense especially as 1.1 is just around the corner)

‘Just around the corner’? :slight_smile:
How long are we talking? Exciting!

HiggyB mentioned a timeframe in the "Umm, 1.1?
" thread just a few below this one

Woohoo!