Search Unity

Implementing UnitySendMessage

Discussion in 'Tizen' started by Rohit_Sijwali, Aug 17, 2015.

  1. Rohit_Sijwali

    Rohit_Sijwali

    Joined:
    Aug 17, 2015
    Posts:
    30
    How to implement UnitySendmessage in tizen native shared library so that i can callback to C# script.

    Currently i am passing delegate (Function ptr) to native library but when i call this it crashes.
     
  2. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    Hi,

    I'm not sure what you've done so far but have you taken a look at the Plugins for Tizen docs? http://docs.unity3d.com/Manual/PluginsForTizen.html

    David
     
  3. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    ok, the url says to use UnitySendMessage but if you type that on a tizen native library it says it's not defined. So which library do we need to include for it to compile?
     
  4. sukwon-suh

    sukwon-suh

    Joined:
    Mar 31, 2015
    Posts:
    81
    There is an option to disable checking undefined symbol on Tizen Studio.
    Please right click on the project, then select properties. Maybe you can find it on link setting.
     
  5. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    yep I saw it, but it stops working after a while because the unity engine stops as soon as you display any UI component (or at least a window) from your native plugin. I haven't figured out a way to pass a Unity object to Tizen. I'm trying to get a surface or something so I can display video/webcam into it. No luck so far because it doesn't seem to be any documentation on how to pass those as parameters.
     
  6. skaljac

    skaljac

    Joined:
    Apr 9, 2015
    Posts:
    33
  7. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    yep you can pass pointers, but which one is the one that is compatible to modify the material texture from inside a native plugin?
     
  8. sukwon-suh

    sukwon-suh

    Joined:
    Mar 31, 2015
    Posts:
    81
    @creat327
    Do you want to use movie texture on Tizen?
    I tested it before, I'll try to update it on the Unity Asset Store.
     
  9. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Not movie texture. I want to get a reference to the material so I can draw on it from the webcam for instance. I'm not interested on an asset because I'm programming this myself and I can't use third parties. Surely there is a way to pass that surface to Tizen to draw on it
     
  10. sukwon-suh

    sukwon-suh

    Joined:
    Mar 31, 2015
    Posts:
    81
    Attached file is TIZEN camera plugin for UNITY. I tested it on Z1 device.

    upload_2017-5-19_10-3-31.png
     

    Attached Files:

  11. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    nice! thanks a million
     
  12. skaljac

    skaljac

    Joined:
    Apr 9, 2015
    Posts:
    33
    Wow, nice example!