Search Unity

Get screen_window_t via libBB10Export.so ??

Discussion in 'BlackBerry' started by zezba9000, Aug 27, 2013.

  1. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    986
    Because no one has asked this specific question, i'll do so now.
    As it stands the only thing holding me and others back from making Unity3D plugins for BB10, is the fact that there is no obvious way to get back the "screen_window_t" that was created with "screen_create_window(...)" via the BB10 API in Unity somewhere...

    I have been on the #BlackBerryDev IRC and #OpenGL IRC to inquire about how I might possibly get back the root "screen_window_t" without Unity directly exposing it (at least not documented). I have found there is no way to get back this object from BB10 or EGL APIs directly.

    So simply put: Is there a way to get back the main "screen_window_t" object via a pInvoke into the "libBB10Export.so" lib?
    Or is there some other way to get back this object reference? If low level APIs are currently not exposed in Unity4.2, do we need to wait for Unity4.3 for this to happen?
     
    Last edited: Aug 27, 2013
  2. dberroa

    dberroa

    Joined:
    Dec 16, 2012
    Posts:
    146
    So just for clarification for me, basically you are saying that because we do not have a reference to the screen object, we can not place anything on the screen (such as Ads) from Unity as the plugin wouldn't be able to get the screen that Unity is displaying on?

    Thanks.
     
  3. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    986
    Yep thats what I'm saying :)
     
  4. dberroa

    dberroa

    Joined:
    Dec 16, 2012
    Posts:
    146
    I think whoever helps solve this issue for you should get a free copy of the plugin you are planning to create, eh eh?
     
  5. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    986
    Haha absolutely.
    I sen't you a PM.
     
  6. dberroa

    dberroa

    Joined:
    Dec 16, 2012
    Posts:
    146
    Cool.

    I responded.

    Has anyone tried to decompile the .so to find the method names to see if that helps?

    EDIT:

    Another thought, why wouldn't we be able to create another window to overlay that does have the ads on it? Using the function you mentioned screen_create_window(...).

    I think I just thought of why, maybe because when you create the window you would need to add it to the original window and then we are in the same place of not having the reference.
     
    Last edited: Aug 28, 2013
  7. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    986
    While the intentions are honest, I don't think decompiling is something you wan't to do as its probably not legal.
    Someone correct me if i'm wrong, but I think simply reflecting the extern C methods in a lib would be just fine, as these are intended to be public.

    Ya I tried that just for the sake of it, but it doesn't work and i'm not surprised there can only be one of those. I pretty sure we must have the one that unity uses.
     
  8. dberroa

    dberroa

    Joined:
    Dec 16, 2012
    Posts:
    146
    Sean Taylor from Blackberry (Gaming Lead) answered me back on this question with this:

    Hope this helps!
     
  9. AlexThibodeau

    AlexThibodeau

    Unity Technologies

    Joined:
    Jul 23, 2013
    Posts:
    309
  10. zezba9000

    zezba9000

    Joined:
    Sep 28, 2010
    Posts:
    986