-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a spawner and made it easier to spawn an object at a location from
the object pool
- Loading branch information
Showing
32 changed files
with
415,446 additions
and
26,918 deletions.
There are no files selected for viewing
212,861 changes: 205,467 additions & 7,394 deletions
212,861
Assets/MMMaellon/ExampleScene/ExampleScene.unity
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,45 @@ | ||
| ||
using UdonSharp; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
using VRC.SDKBase; | ||
using VRC.Udon; | ||
|
||
public class NetworkCloggedDetector : UdonSharpBehaviour | ||
{ | ||
void Start() | ||
public Text text; | ||
float clogStart = -1001f; | ||
bool clogged = false; | ||
public void Update() | ||
{ | ||
|
||
|
||
if (clogged) | ||
{ | ||
if (!Networking.IsClogged) | ||
{ | ||
Debug.LogWarning("!!!!!!!!!!!!!!!!!!! Network is now unclogged. Total clogged time: " + (Time.timeSinceLevelLoad - clogStart)); | ||
clogged = false; | ||
if (text) | ||
{ | ||
text.text = "Status: Not clogged. Total clogged Time: " + (Time.timeSinceLevelLoad - clogStart); | ||
} | ||
} | ||
else | ||
{ | ||
if (text) | ||
{ | ||
text.text = "Status: ⚠ Clogged ⚠ Total clogged Time: " + (Time.timeSinceLevelLoad - clogStart); | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
if (Networking.IsClogged) | ||
{ | ||
Debug.LogWarning("!!!!!!!!!!!!!!!!!!! Network is now clogged"); | ||
clogStart = Time.timeSinceLevelLoad; | ||
clogged = true; | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.