Skip to content

Commit

Permalink
UrlSubmitter add Start On Load
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonic853 committed Dec 7, 2024
1 parent 298e99e commit b8ebc20
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Scripts/UrlSubmitter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@ public class UrlSubmitter : UdonSharpBehaviour
public UdonBehaviour udonSendFunction;
public string sendCustomEvent = "SendFunction";
public string setVariableName = "value";
public bool startOnLoad = false;
void Start()
{
if (startOnLoad) SubmitUrl();
}
public void SubmitUrl()
{
UrlLoader.PushUrl(url, udonSendFunction, sendCustomEvent, setVariableName);
if (!string.IsNullOrEmpty(url.ToString())) UrlLoader.PushUrl(url, udonSendFunction, sendCustomEvent, setVariableName);
}
public void SendFunction() => SubmitUrl();
public void SendFunctions() => SubmitUrl();
Expand Down

0 comments on commit b8ebc20

Please sign in to comment.