Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to use UnitySendMessage with Dynamic frameworks (iOS) ?

Discussion in 'Scripting' started by martijng, Nov 12, 2015.

  1. martijng

    martijng

    Joined:
    Apr 27, 2015
    Posts:
    2
    I am working on a dynamic framework for iOS and have difficulties linking the UnitySendMessage function.
    Normally (when building a static library / framework) you just declare the method in the .h file and it will be linked correct.

    However this doesn't work with a dynamic library. Any ideas how to link this correct and let it work with Dynamic frameworks?
     
  2. BenZed

    BenZed

    Joined:
    May 29, 2014
    Posts:
    524
  3. martijng

    martijng

    Joined:
    Apr 27, 2015
    Posts:
    2
    I've seen this documentation. Unfortunately this only works with the static frameworks not the dynamic frameworks. I've indeed wrapped the c functions in the "external C" to prevent name mangling, however it still seems not getting linked to the UnitySendMessage method (in the "UnityInterface.h" file) at runtime.. Any other ideas ? :)
     
  4. Kiwasi

    Kiwasi

    Joined:
    Dec 5, 2013
    Posts:
    16,860
    Have you tried ExecuteEvents instead of SendMessage?
     
  5. abhi666

    abhi666

    Joined:
    Dec 19, 2014
    Posts:
    2
    Did you solve this issue ? I am facing this from many days. Not able to solve this.
     
  6. abhi666

    abhi666

    Joined:
    Dec 19, 2014
    Posts:
    2
    Facing this issue from quite long and not able to solve. Please some one help here.
     
  7. KB73

    KB73

    Joined:
    Feb 7, 2013
    Posts:
    234
    Same here, any luck?