Cleaned up and more use of Ready
This commit is contained in:
@@ -115,19 +115,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: isOwner
|
||||
Data: offsetTime
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 7|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: isOwner
|
||||
Data: offsetTime
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 8|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
Data: System.Single, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -169,13 +169,13 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: isSynced
|
||||
Data: internalTime
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 10|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: isSynced
|
||||
Data: internalTime
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
@@ -217,25 +217,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: offsetTime
|
||||
Data: nextEventTime
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 12|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: offsetTime
|
||||
Data: nextEventTime
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 13|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Single, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
Entry: 9
|
||||
Data: 8
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 8
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -250,7 +244,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 14|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 13|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -271,19 +265,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: internalTime
|
||||
Data: lastEventTimestamp
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 15|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 14|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: internalTime
|
||||
Data: lastEventTimestamp
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 8
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 8
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -298,7 +292,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 16|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 15|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -319,19 +313,25 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: nextEventTime
|
||||
Data: lastEventId
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 17|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 16|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: nextEventTime
|
||||
Data: lastEventId
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Entry: 7
|
||||
Data: 17|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Byte, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 17
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -367,118 +367,16 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: lastEventTimestamp
|
||||
Data: retriesWithoutSuccess
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 19|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: lastEventTimestamp
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
- 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: 20|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: lastEventId
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 21|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: lastEventId
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 22|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Byte, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 22
|
||||
- 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: 23|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: retriesWithoutSuccess
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 24|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: retriesWithoutSuccess
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 25|System.RuntimeType, mscorlib
|
||||
Data: 20|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Int32, mscorlib
|
||||
@@ -487,7 +385,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 25
|
||||
Data: 20
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -502,7 +400,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 26|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 21|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -526,13 +424,13 @@ MonoBehaviour:
|
||||
Data: buffer
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 27|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 22|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: buffer
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 28|System.RuntimeType, mscorlib
|
||||
Data: 23|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Byte[][], mscorlib
|
||||
@@ -541,7 +439,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 29|System.RuntimeType, mscorlib
|
||||
Data: 24|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Object[], mscorlib
|
||||
@@ -562,7 +460,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 25|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -586,16 +484,16 @@ MonoBehaviour:
|
||||
Data: bufferIndex
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 31|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 26|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: bufferIndex
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 25
|
||||
Data: 20
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 25
|
||||
Data: 20
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -610,7 +508,7 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 32|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 27|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 0
|
||||
@@ -634,13 +532,13 @@ MonoBehaviour:
|
||||
Data: networkedData
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 33|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 28|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: networkedData
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 34|System.RuntimeType, mscorlib
|
||||
Data: 29|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Byte[], mscorlib
|
||||
@@ -649,7 +547,7 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 34
|
||||
Data: 29
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -664,13 +562,13 @@ MonoBehaviour:
|
||||
Data: false
|
||||
- Name: _fieldAttributes
|
||||
Entry: 7
|
||||
Data: 35|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
Data: 30|System.Collections.Generic.List`1[[System.Attribute, mscorlib]], mscorlib
|
||||
- Name:
|
||||
Entry: 12
|
||||
Data: 1
|
||||
- Name:
|
||||
Entry: 7
|
||||
Data: 36|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
Data: 31|UdonSharp.UdonSyncedAttribute, UdonSharp.Runtime
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
@@ -694,10 +592,112 @@ MonoBehaviour:
|
||||
Data: <Ready>k__BackingField
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
Data: 32|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: <Ready>k__BackingField
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 7
|
||||
Data: 33|System.RuntimeType, mscorlib
|
||||
- Name:
|
||||
Entry: 1
|
||||
Data: System.Boolean, mscorlib
|
||||
- Name:
|
||||
Entry: 8
|
||||
Data:
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 33
|
||||
- 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: 34|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: <Synced>k__BackingField
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 35|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: <Synced>k__BackingField
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 33
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 33
|
||||
- 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: 36|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: <SyncedTime>k__BackingField
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 37|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: <SyncedTime>k__BackingField
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
@@ -739,19 +739,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: <SyncedTime>k__BackingField
|
||||
Data: <Dt>k__BackingField
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 39|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: <SyncedTime>k__BackingField
|
||||
Data: <Dt>k__BackingField
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 8
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 8
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -787,19 +787,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: <Dt>k__BackingField
|
||||
Data: <IsEventUpdate>k__BackingField
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 41|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: <Dt>k__BackingField
|
||||
Data: <IsEventUpdate>k__BackingField
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 33
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 13
|
||||
Data: 33
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -835,19 +835,19 @@ MonoBehaviour:
|
||||
Data:
|
||||
- Name: $k
|
||||
Entry: 1
|
||||
Data: <IsEventUpdate>k__BackingField
|
||||
Data: <IsOwner>k__BackingField
|
||||
- Name: $v
|
||||
Entry: 7
|
||||
Data: 43|UdonSharp.Compiler.FieldDefinition, UdonSharp.Editor
|
||||
- Name: <Name>k__BackingField
|
||||
Entry: 1
|
||||
Data: <IsEventUpdate>k__BackingField
|
||||
Data: <IsOwner>k__BackingField
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
Data: 33
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 8
|
||||
Data: 33
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
@@ -892,10 +892,10 @@ MonoBehaviour:
|
||||
Data: indexAtLastSerialization
|
||||
- Name: <UserType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 25
|
||||
Data: 20
|
||||
- Name: <SystemType>k__BackingField
|
||||
Entry: 9
|
||||
Data: 25
|
||||
Data: 20
|
||||
- Name: <SyncMode>k__BackingField
|
||||
Entry: 7
|
||||
Data: System.Nullable`1[[UdonSharp.UdonSyncMode, UdonSharp.Runtime]], mscorlib
|
||||
|
||||
@@ -87,16 +87,6 @@ namespace Marro.PacManUdon
|
||||
/// </summary>
|
||||
[SerializeField] private SyncedObject[] syncedObjects;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the current perspective is the transmitting side.
|
||||
/// </summary>
|
||||
private bool isOwner;
|
||||
/// <summary>
|
||||
/// Whether the current perspective is synced with the owner. (Always true if current perspective is owner.)
|
||||
/// </summary>
|
||||
private bool isSynced;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Offset from system time to network time, including delay.
|
||||
/// </summary>
|
||||
@@ -147,6 +137,11 @@ namespace Marro.PacManUdon
|
||||
/// </summary>
|
||||
public bool Ready { get; private set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the current perspective is synced with the owner. (Always true if current perspective is owner.)
|
||||
/// </summary>
|
||||
public bool Synced { get; private set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// The time since last full sync which is currently being simulated.
|
||||
/// </summary>
|
||||
@@ -167,7 +162,7 @@ namespace Marro.PacManUdon
|
||||
/// <summary>
|
||||
/// Is the local user owner?
|
||||
/// </summary>
|
||||
public bool IsOwner => isOwner;
|
||||
public bool IsOwner { get; private set; }
|
||||
#endregion
|
||||
|
||||
#region General
|
||||
@@ -181,8 +176,7 @@ namespace Marro.PacManUdon
|
||||
if (!BitConverter.IsLittleEndian)
|
||||
{
|
||||
Debug.LogError($"({nameof(PacManUdon)} {nameof(NetworkManager)}) Fatal: NetworkManager only supports little endian! Network sync will not be possible.");
|
||||
var zero = 0;
|
||||
Debug.Log(1 / zero); // Intentionally crash
|
||||
Ready = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -190,7 +184,7 @@ namespace Marro.PacManUdon
|
||||
|
||||
buffer = new byte[BufferMaxTotalEvents][];
|
||||
bufferIndex = 0;
|
||||
isSynced = isOwner; // Owner is always synced
|
||||
Synced = IsOwner; // Owner is always synced
|
||||
retriesWithoutSuccess = 0;
|
||||
lastEventTimestamp = 0;
|
||||
lastEventId = 0;
|
||||
@@ -207,17 +201,20 @@ namespace Marro.PacManUdon
|
||||
|
||||
public void FixedUpdate()
|
||||
{
|
||||
// Fetch the current time
|
||||
UpdateInternalTime();
|
||||
|
||||
if (!isOwner)
|
||||
// If able and needed, process received events
|
||||
if (Ready && !IsOwner)
|
||||
{
|
||||
ProgressEventTime();
|
||||
}
|
||||
|
||||
// Forwards simulated time at the FixedUpdate pace
|
||||
PerformFixedSyncedUpdate();
|
||||
}
|
||||
|
||||
public void UpdateInternalTime()
|
||||
private void UpdateInternalTime()
|
||||
{
|
||||
internalTime = Time.fixedTime - offsetTime;
|
||||
}
|
||||
@@ -240,8 +237,7 @@ namespace Marro.PacManUdon
|
||||
if (retriesWithoutSuccess > 3)
|
||||
{
|
||||
Debug.LogError($"({nameof(PacManUdon)} {nameof(NetworkManager)}) Fatal: Retried 3 times without success.");
|
||||
var zero = 0;
|
||||
Debug.Log(1 / zero); // Intentionally crash
|
||||
Ready = false;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -252,9 +248,9 @@ namespace Marro.PacManUdon
|
||||
ClearBuffer();
|
||||
}
|
||||
|
||||
isSynced = false;
|
||||
Synced = false;
|
||||
|
||||
if (!isOwner)
|
||||
if (!IsOwner)
|
||||
{
|
||||
RequestEvent(NetworkEventType.FullSync);
|
||||
}
|
||||
@@ -266,7 +262,7 @@ namespace Marro.PacManUdon
|
||||
|
||||
private void SetOwner(bool isOwner)
|
||||
{
|
||||
this.isOwner = isOwner;
|
||||
this.IsOwner = isOwner;
|
||||
|
||||
if (DebugImageToIndicateOwner != null)
|
||||
{
|
||||
@@ -278,7 +274,12 @@ namespace Marro.PacManUdon
|
||||
#region Sender
|
||||
public void SendEvent(NetworkEventType eventType)
|
||||
{
|
||||
if (!isOwner)
|
||||
if (!Ready)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsOwner)
|
||||
{
|
||||
Debug.LogError($"({nameof(PacManUdon)} {nameof(NetworkManager)}) Attempted {nameof(SendEvent)} while not the owner!");
|
||||
return;
|
||||
@@ -345,6 +346,11 @@ namespace Marro.PacManUdon
|
||||
[NetworkCallable]
|
||||
public void RequestEventReceived(NetworkEventType eventType)
|
||||
{
|
||||
if (!Ready)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SendEvent(eventType);
|
||||
}
|
||||
#endregion
|
||||
@@ -352,7 +358,12 @@ namespace Marro.PacManUdon
|
||||
#region Receiver
|
||||
public void RequestEvent(NetworkEventType eventType)
|
||||
{
|
||||
if (isOwner)
|
||||
if (!Ready)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsOwner)
|
||||
{
|
||||
Debug.LogError($"({nameof(PacManUdon)} {nameof(NetworkManager)}) Attempted {nameof(RequestEvent)} while we are the owner!");
|
||||
return;
|
||||
@@ -415,7 +426,7 @@ namespace Marro.PacManUdon
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!isSynced)
|
||||
if (!Synced)
|
||||
{
|
||||
Debug.LogWarning($"({nameof(PacManUdon)} {nameof(NetworkManager)}) Received event of type {eventType} while we are not yet synced to the remote time, ignoring event.");
|
||||
continue;
|
||||
@@ -463,7 +474,7 @@ namespace Marro.PacManUdon
|
||||
|
||||
// Immediately apply the full sync
|
||||
UpdateNextEventTime(ignoreOrder: true);
|
||||
isSynced = true;
|
||||
Synced = true;
|
||||
}
|
||||
|
||||
private void ProgressEventTime()
|
||||
@@ -605,7 +616,7 @@ namespace Marro.PacManUdon
|
||||
#endregion
|
||||
|
||||
#region Header
|
||||
public static byte GetNextEventId(byte currentEventId)
|
||||
private static byte GetNextEventId(byte currentEventId)
|
||||
{
|
||||
if (currentEventId == byte.MaxValue) // Udon forces overflow checks
|
||||
{
|
||||
@@ -617,22 +628,27 @@ namespace Marro.PacManUdon
|
||||
return currentEventId;
|
||||
}
|
||||
|
||||
public static ushort GetEventSizeFromHeader(byte[] @event, int eventIndex = 0)
|
||||
private static ushort GetEventSizeFromHeader(byte[] @event, int eventIndex = 0)
|
||||
=> BitConverter.ToUInt16(@event, eventIndex + HeaderEventSizeIndex);
|
||||
|
||||
public static NetworkEventType GetEventTypeFromHeader(byte[] @event, int eventIndex = 0) =>
|
||||
private static NetworkEventType GetEventTypeFromHeader(byte[] @event, int eventIndex = 0) =>
|
||||
(NetworkEventType)@event[eventIndex + HeaderEventTypeIndex];
|
||||
|
||||
public static float GetTimestampFromHeader(byte[] @event, int eventIndex = 0) =>
|
||||
private static float GetTimestampFromHeader(byte[] @event, int eventIndex = 0) =>
|
||||
BitConverter.ToSingle(@event, eventIndex + HeaderTimestampIndex);
|
||||
|
||||
public static byte GetEventIdFromHeader(byte[] @event, int eventIndex = 0) =>
|
||||
private static byte GetEventIdFromHeader(byte[] @event, int eventIndex = 0) =>
|
||||
@event[eventIndex + HeaderEventIdIndex];
|
||||
#endregion
|
||||
|
||||
#region VRC events
|
||||
public override void OnOwnershipTransferred(VRCPlayerApi newOwner)
|
||||
{
|
||||
if (!Ready)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
SetOwner(newOwner == Networking.LocalPlayer);
|
||||
}
|
||||
|
||||
@@ -645,7 +661,7 @@ namespace Marro.PacManUdon
|
||||
return;
|
||||
}
|
||||
|
||||
if (isOwner)
|
||||
if (IsOwner)
|
||||
{
|
||||
if (buffer == null || bufferIndex == 0)
|
||||
{
|
||||
@@ -674,7 +690,7 @@ namespace Marro.PacManUdon
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isOwner || networkedData.Length == 0)
|
||||
if (!IsOwner || networkedData.Length == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -688,7 +704,7 @@ namespace Marro.PacManUdon
|
||||
|
||||
public override void OnDeserialization()
|
||||
{
|
||||
if (!Ready || isOwner)
|
||||
if (!Ready || IsOwner)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -756,7 +772,7 @@ namespace Marro.PacManUdon
|
||||
public void WriteDebugOutput(TMP_InputField debugOutput)
|
||||
{
|
||||
debugOutput.text += $"{nameof(NetworkManager)}:\n" +
|
||||
$"IsOwner: {isOwner}\n" +
|
||||
$"IsOwner: {IsOwner}\n" +
|
||||
$"Ready: {Ready}\n" +
|
||||
$"Time.fixedTime: {Time.fixedTime}\n" +
|
||||
$"offsetTime: {offsetTime}\n" +
|
||||
|
||||
Reference in New Issue
Block a user