Question on LoadHTML()

Welcome! Forums Unity Plugins In-App Web Browser Question on LoadHTML()

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2358
    xuan_celestial
    Participant

    Is is possible to use this function to create one button overlay above the WebView?

    Things to achieve: Floating Navigation Button that allows the user to close the IAB with confirmation windows

    Thanks!

    #2360
    PiotrPiotr
    Keymaster

    Hey,
    I would rather play with ExecuteJS to dynamically attach such button.

    #2365
    xuan_celestial
    Participant

    Hi, Thanks for the fast reply!

    By ExecuteJS you mean the InAppBrowser.ExecuteJS() right?

    As I’m new to javascript, correct me if I am wrong with the following flow:
    1. html page with javascript implemented the floating navigation button. (Assume simply click and close IAB)
    2. when user clicked the button, the javascript of the html page will then post message to Unity, so that function listening to OnMessageFromJs() will run accordingly. (In this case the function simply close IAB)
    3. IAB is closed

    Another Question:
    Is it possible to have Unity UI element above IAB? or only achievable through Native Code

    Regards.

    #2367
    PiotrPiotr
    Keymaster

    Hey,
    Yeah so you dynamically attach button by using DOM manipulation API (createElement, appendChildren etc.), onClick sends message to Unity, C# script receives it and does something / closes it.

    No, it’s not possible.

    #2370
    xuan_celestial
    Participant

    Thank you very much!

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.