Skip to content

Commit

Permalink
Added a spawner and made it easier to spawn an object at a location from
Browse files Browse the repository at this point in the history
the object pool
  • Loading branch information
MMMaellon committed Jul 15, 2024
1 parent 42b825e commit 0be5ee5
Show file tree
Hide file tree
Showing 32 changed files with 415,446 additions and 26,918 deletions.
212,861 changes: 205,467 additions & 7,394 deletions Assets/MMMaellon/ExampleScene/ExampleScene.unity

Large diffs are not rendered by default.

162 changes: 162 additions & 0 deletions Assets/MMMaellon/ExampleScene/NetworkCloggedDetector.asset
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,156 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 12
Data: 3
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: text
- Name: $v
Entry: 7
Data: 2|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: text
- Name: <UserType>k__BackingField
Entry: 7
Data: 3|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: UnityEngine.UI.Text, UnityEngine.UI
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 3
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: true
- Name: _fieldAttributes
Entry: 7
Data: 4|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: clogStart
- Name: $v
Entry: 7
Data: 5|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: clogStart
- Name: <UserType>k__BackingField
Entry: 7
Data: 6|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Single, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 6
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 7|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 7
Data:
- Name: $k
Entry: 1
Data: clogged
- Name: $v
Entry: 7
Data: 8|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
- Name: <Name>k__BackingField
Entry: 1
Data: clogged
- Name: <UserType>k__BackingField
Entry: 7
Data: 9|System.RuntimeType, mscorlib
- Name:
Entry: 1
Data: System.Boolean, mscorlib
- Name:
Entry: 8
Data:
- Name: <SystemType>k__BackingField
Entry: 9
Data: 9
- Name: <SyncMode>k__BackingField
Entry: 7
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
- Name:
Entry: 6
Data:
- Name:
Entry: 8
Data:
- Name: <IsSerialized>k__BackingField
Entry: 5
Data: false
- Name: _fieldAttributes
Entry: 7
Data: 10|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
- Name:
Entry: 12
Data: 0
Expand All @@ -51,3 +201,15 @@ MonoBehaviour:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 8
Data:
- Name:
Entry: 13
Data:
- Name:
Entry: 8
Data:
36 changes: 34 additions & 2 deletions Assets/MMMaellon/ExampleScene/NetworkCloggedDetector.cs
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;
}
}
}
}
Loading

0 comments on commit 0be5ee5

Please sign in to comment.