GetApplicationDataURL() public static method

public static GetApplicationDataURL ( ) : string
return string
Example #1
0
    void Start()
    {
        webTexture = GameObject.FindObjectOfType(typeof(WebTexture)) as WebTexture;

        UWKWebView view = gameObject.GetComponent <UWKWebView>();

        view.LoadURL(UWKWebView.GetApplicationDataURL() + "/StreamingAssets/uWebKit/Examples/AlphaMaskExample.html");
    }
    // Use this for initialization
    void Start()
    {
        JSObject.SetProperty("MyJSObject", "unityVersion", Application.unityVersion);

        webGUI = gameObject.GetComponent <WebGUI>();
        view   = gameObject.GetComponent <UWKWebView>();
        view.JSMessageReceived += onJSMessage;

        view.LoadURL(UWKWebView.GetApplicationDataURL() + "/StreamingAssets/uWebKit/Examples/JavascriptExample.html");

        webGUI.Position.x = Screen.width / 2 - view.MaxWidth / 2;
        webGUI.Position.y = 0;
    }