Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Add try/catch for UdonNetworkReady to prevent breaking issues.
Browse files Browse the repository at this point in the history
Longer term solution will be to remove CyanEmu components existing in the scene before playmode.
  • Loading branch information
CyanLaser committed Jan 24, 2021
1 parent 6b959f5 commit 91c2d90
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion CyanEmu/Scripts/VRCSDK3/CyanEmuUdonManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#if UDON

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
Expand Down Expand Up @@ -57,7 +58,15 @@ public void OnNetworkReady()

foreach (var helper in udonBehavior.GetComponents<CyanEmuUdonHelper>())
{
helper.OnNetworkReady();
try
{
helper.OnNetworkReady();
}
catch (Exception e)
{
this.LogError(e.Message + "\n" +e.StackTrace);
this.LogWarning("Failed to send network ready for object: " +VRC.Tools.GetGameObjectPath(helper.gameObject));
}
}
}
}
Expand Down

0 comments on commit 91c2d90

Please sign in to comment.