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

anyone able to create a plugin?

Discussion in 'Tizen' started by creat327, May 8, 2017.

  1. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Hi

    I followed all the steps detailed on the unity tizen plugin page, and as expected there is no example code and it won't work.
    Creating the plugin inside tizen studio took me less than an hour... trying to get it to work with Unity has been impossible.
    My error:
    DllNotFoundException: com.echoboom.videoplayer
    at (wrapper managed-to-native) TizenVideoPlayer:play (string)
    at TizenVideoPlayer.PlayVideo (System.String path) [0x00000] in <filename unknown>:0
    at VideoPlayerScript.Start () [0x00000] in <filename unknown>:0

    No matter what I try I get that dll not found exception. The file is called libcom.echoboom.videoplayer.so and it's on Plugins/Tizen/Libs checked as a tizen plugin

    The c# is a piece of cake:
    [DllImport("com.echoboom.videoplayer")]
    private static extern void Play(string path);

    In theory, that should work, no "lib" and no ".so" on the file name should be placed on DllImport. Still... DllNotFoundException, what gives?
    Anyone got any plugin done and working? what was your trick?
     
  2. sukwon-suh

    sukwon-suh

    Joined:
    Mar 31, 2015
    Posts:
    81
    @creat327

    1. Please check so file name.
    If your so file name is libsharedlibrary.so, use like this.
    [DllImport("sharedlibrary")]
    bool tizensharedlibrary();

    2. please check the architecture of tizen project.
    for device : arm
    for emulator : x86

    Let me know results.
    Thank you.
     
  3. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    the file name is libcom.echoboom.videoplayer.so and it's compiled for arm
    using the code above gives the exception I posted
     
  4. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    ok so I found the issue, unity doesn't like several dots on the name, so it can't really work with that, it needs to file to be something like libNODOTSINNAME.so
     
  5. skaljac

    skaljac

    Joined:
    Apr 9, 2015
    Posts:
    33
    I can confirm, that you need to have the name of plugin in this format libsharedlibrary.so for Tizen 2.3.
    I have tested on Z1 device with Tizen 2.3.
    Funny thing is that Z3 device with Tizen 2.4 allows you to name .so file how ever you want. You can name it libcom.company.sharedlibrary.so it will work.
    But to support T2.3 you should name it libsharedlibrary.so