Search Unity

Get the Unity "Evas_Object* win" object?

Discussion in 'Tizen' started by zezba9000, Jul 24, 2015.

  1. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    I need to be able to get the base C "Evas_Object* win" object Unity creates with "elm_win_util_standard_add".

    I need this so I can make a plugin that uses it and pass it into other native methods like "Evas_Object* popup = elm_popup_add(win);"

    Is this object exposed in Unity? Can't seem to find any Tizen method to get the currently active one.
     
  2. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    Is this something that is specific to Tizen or have you had to get a native window object on other platforms as well? If so, what Unity API have you used to do so?
     
  3. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    For BB10 I had to do a total hack to merge two window contexts into the global window group. BB10 had an API that would allow me to do this without knowing what Unity's window handle actually was.

    Right now i'm talking to a Tizen / Enlightenment expert on how I might get this "Evas_Object* win" object without Unity exposing it. So far he says its impossible, even more so when they update to Wayland away from x11.

    I must have Unity's main "Evas_Object* win" object it creates to almost do anything with Tizen as every API like popups even require it. BB10 didn't require this so much.

    Do you think you could expose this object via a method I could "DLLImport" in C# to get an IntPtr from it? Without it I can't do anything, not even show a simple OK/Cancel box...
     
    Last edited: Jul 24, 2015
  4. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    As an example to init the Ok/Cancel popup box I call: "Evas_Object* popup = elm_popup_add(ad->win);"
    Notice "ad->win" this is the object created in Unity when calling "ad->win = elm_win_util_standard_add(...);".

    I must have that "win" handle to create a MessageBox dlg. So if there was a static reference to it I could get from invoking a C method Unity exposes that would be everything I need.
     
  5. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    This is very specific to Tizen. Anyway we could get that object exposed in a future update? If there's a better idea i'm all ears but don't think there is and almost all Tizen objects require it. Ad frameworks are going to require this ect.
     
  6. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    Or you could expose this via a C# tizen API. What ever is easier doesn't matter as long as you can get that "win" handle exposed.
     
  7. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    Just wanted to let you know that I'm investigating the best way to implement this right now.
     
  8. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    Thats awesome! Thanks for the heads up.
     
  9. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    Any chance this object might be exposed in Unity 5.2?
    I'm happy to give any info I can on the matter that might help if there is still confusion regarding this.
     
  10. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    At this time we've decided to not expose this functionality. However if there is enough interest in the feature then we may reconsider in the future.
     
  11. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    Wow... thanks for killing the plugin market before it even starts... So we can't make a plugin that even shows a NATIVE Ok/Cancel box, IAP dlg, (How are Ad frameworks going to work without this), ect, because someone doesn't "feel" its needed??

    Where is the logic here because I don't see it? Time? How would adding a single line of "extern C" and "C#" code take any time...? Security? How would exposing this cause any security issues? I don't want to insult but maybe its just incompetence, who is making these final determinations on this team and why? Is Unity that crapped out under the hood this is really more effort then its worth. One more point for the Unreal Engine as I would never have any of these silly issues with that engine. The is beyond stupid unless a work around is possible and posted I don't know about.

    This choice makes no sense and is frustrating sorry for this reaction but I can't help it. Unity is starting to NOT be a profitable market tool anymore... sad rly.

    Can we take the sugar coating off the BS a little and explain??
     
    Last edited: Aug 20, 2015
    Wadjey likes this.
  12. Wadjey

    Wadjey

    Joined:
    Feb 4, 2015
    Posts:
    244
    If you don't want your developers to support Tizen and build useful plugins for this platform then simply don't tell that Unity is supporting Tizen!
    I don't understand what's the problem in adding bunch of lines of code that help Asset developers to make a useful plugins for your customers!!!
    I hope you'll change your opinion and help @zezba9000 to add Tizen support to his plugin, he's an excellent developer and he provide an excellent plugins for your engine, please support it and do not lose it.
     
    Last edited: Aug 21, 2015
  13. Masterfalcon

    Masterfalcon

    Unity Technologies

    Joined:
    Dec 29, 2014
    Posts:
    364
    After internal talks we have decided to implement this for 5.2. However, it was too late for the initial 5.2 release and should be available for 5.2.0p1.

    You will be able to use the API like this:

    Code (csharp):
    1. IntPtr handle = Tizen.windowHandle;
     
  14. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    992
    This is great news, sorry for any negativity this may have caused.
    I'll be sure to make use of this when available.