Web Browser
Workflow
Functional web browser app which supports common web browser features. It’s fully integrated with the network system.
Web Browser app depends on its manager, its library and the network manager. You can add new websites or downloadable items by using Tools > DreamOS > Select Web Library. All website items require a prefab to create the page content and an unique URL address. You can exclude ‘www.’ from the address as Web Browser checks for ‘www.’ on search.
You can specify a file type for downloadable files. After selecting a file type, assign and/or enter a value in the appropriate field. ‘None’ file type doesn’t require any assignment. You can later on download the file by calling its name using the ‘Web Browser Event Sender’ component.
Scripting
using UnityEngine;
using Michsky.DreamOS; // DreamOS namespace
public class SampleClass : MonoBehaviour
{
[SerializeField] private WebBrowserManager webApp; // App variable
void YourFunction()
{
// Create new empty tab
webApp.CreateNewTab();
// Create tab with specified url
webApp.CreateNewTab("URL");
// Close tab
webApp.CloseTab(webApp.currentTabs[0].guid);
// Switch to tab
webApp.CloseTab(webApp.currentTabs[1].guid);
// Close all tabs
webApp.CloseAllTabs();
// Open pages
webApp.OpenPage("URL");
webApp.OpenHomePage();
webApp.OpenNoConnectionPage();
webApp.OpenNotFoundPage();
// Basic controls
webApp.GoBack();
webApp.GoForward();
webApp.Refresh();
// Download a file using webApp
webApp.DownloadFile("File name");
// Delete a downloaded file
webApp.DeleteDownloadedFile("File name");
// Set favorite state
webApp.SetFavoriteState(true, "URL");
// Activate or deactivate url field
webApp.ActivateURLField(true);
}
}
How can we help?
A premium WordPress theme with an integrated Knowledge Base,
providing 24/7 community-based support.