Table of Contents

Class UnityHtmlContentFetcher

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

Fetches launcher news HTML and extracts the configured content fragment from it.

public class UnityHtmlContentFetcher : MonoBehaviour, IHtmlContentFetcher
Inheritance
Object
Component
Behaviour
MonoBehaviour
UnityHtmlContentFetcher
Implements
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.GetEntityId()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Remarks

Fetching and formatting are separate concerns: this component produces a parsed node and the active ILauncherView renders it. Formatting used to live here, back when TextMeshPro rich text was the only output format.

Properties

HtmlPxToTmpSizeFactor

Approximate conversion factor from HTML pixels to TextMeshPro font size.

public float HtmlPxToTmpSizeFactor { get; }

Property Value

float

MaxRetries

Maximum number of retries for each web request.

public int MaxRetries { get; }

Property Value

int

RetryDelay

Delay in seconds between retries for web requests.

public float RetryDelay { get; }

Property Value

float

WebRequestService

Service for handling Unity web requests.

public UnityWebRequestService WebRequestService { get; }

Property Value

UnityWebRequestService

WebRequestTimeout

Timeout in seconds for each individual web request.

public int WebRequestTimeout { get; }

Property Value

int

Methods

FetchAndExtract(string, string, Action<HtmlNode>, Action<string>)

Fetches HTML from a URL and extracts the element identified by divClass.

public IEnumerator FetchAndExtract(string url, string divClass, Action<HtmlNode> onContentReady, Action<string> onError)

Parameters

url string

The URL to fetch HTML from.

divClass string

The class name of the div to extract.

onContentReady Action<HtmlNode>

Callback for successful extraction.

onError Action<string>

Callback for error handling.

Returns

IEnumerator

Coroutine enumerator.