Skip to content

Instantly share code, notes, and snippets.

@nekochanfood
Created February 23, 2023 03:35
Show Gist options
  • Save nekochanfood/36399520a0988ea3e7a9ae2bd39f415d to your computer and use it in GitHub Desktop.
Save nekochanfood/36399520a0988ea3e7a9ae2bd39f415d to your computer and use it in GitHub Desktop.
VRCStringDownloader Example
using UdonSharp;
using UnityEngine;
using UnityEngine.UI;
using VRC.SDK3.StringLoading;
using VRC.SDKBase;
using VRC.Udon;
public class strloader : UdonSharpBehaviour
{
[SerializeField]Text m_text;
[SerializeField]VRCUrl url;
UdonBehaviour a;
void Start()
{
a = (UdonBehaviour) this.gameObject.GetComponent(typeof(UdonBehaviour));
VRC.SDK3.StringLoading.VRCStringDownloader.LoadUrl(url,a);
}
public override void OnStringLoadSuccess(IVRCStringDownload result)
{
Debug.Log(result.Result);
m_text.text = result.Result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment