Skip to content

Commit ea3caed

Browse files
committed
big push read changes
- message recieving bug fixes - NetTools events added such as onLeaveServer. - AnimationNetworkers aren't added on singleplayer game - Warnings/Errors when NetworkFields/RPCs don't exisrt - A bunch of other small features/bug fixes Highly recommend you move to this version.
1 parent fb7e66d commit ea3caed

27 files changed

+186
-365
lines changed
271 KB
Binary file not shown.

.vs/EntityNetworkingSystems/v15/Server/sqlite3/db.lock

Whitespace-only changes.
4 KB
Binary file not shown.
Binary file not shown.
3.58 MB
Binary file not shown.

Assembly-CSharp.csproj

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
<Compile Include="Assets\EntityNetworkingSystems\Examples\Scripts\ExampleHost.cs" />
6868
<Compile Include="Assets\EntityNetworkingSystems\Examples\Scripts\ExampleMoving.cs" />
6969
<Compile Include="Assets\EntityNetworkingSystems\Examples\Scripts\ExamplePlayerController.cs" />
70-
<Compile Include="Assets\EntityNetworkingSystems\Scripts\AnimationNetworker.cs" />
71-
<Compile Include="Assets\EntityNetworkingSystems\Scripts\ENSUtils.cs" />
7270
<Compile Include="Assets\EntityNetworkingSystems\Scripts\NetBackbone\NetClient.cs" />
7371
<Compile Include="Assets\EntityNetworkingSystems\Scripts\NetBackbone\NetServer.cs" />
7472
<Compile Include="Assets\EntityNetworkingSystems\Scripts\NetBackbone\NetTools.cs" />
@@ -78,41 +76,43 @@
7876
<Compile Include="Assets\EntityNetworkingSystems\Scripts\NetworkData.cs" />
7977
<Compile Include="Assets\EntityNetworkingSystems\Scripts\Steam\SteamInteraction.cs" />
8078
<Compile Include="Assets\EntityNetworkingSystems\Scripts\UnityPacketHandler.cs" />
79+
<Compile Include="Assets\EntityNetworkingSystems\Scripts\Utilities\Animation\AnimationNetworker.cs" />
80+
<Compile Include="Assets\EntityNetworkingSystems\Scripts\Utilities\ENSUtils.cs" />
8181
<None Include="Assets\EntityNetworkingSystems\Plugins\Facepunch.Steamworks\Facepunch.Steamworks.Posix.xml" />
8282
<None Include="Assets\EntityNetworkingSystems\Plugins\Facepunch.Steamworks\Facepunch.Steamworks.Win64.xml" />
8383
<None Include="Assets\EntityNetworkingSystems\Plugins\Facepunch.Steamworks\Facepunch.Steamworks.Win32.xml" />
8484
<Reference Include="Unity.Timeline.Editor">
85-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath>
85+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath>
8686
</Reference>
8787
<Reference Include="Unity.VSCode.Editor">
88-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.VSCode.Editor.dll</HintPath>
88+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.VSCode.Editor.dll</HintPath>
8989
</Reference>
9090
<Reference Include="Unity.TextMeshPro.Editor">
91-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath>
91+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.TextMeshPro.Editor.dll</HintPath>
9292
</Reference>
9393
<Reference Include="UnityEngine.UI">
94-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
94+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/UnityEngine.UI.dll</HintPath>
9595
</Reference>
9696
<Reference Include="Unity.Timeline">
97-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath>
97+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath>
9898
</Reference>
9999
<Reference Include="Unity.CollabProxy.Editor">
100-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll</HintPath>
100+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.CollabProxy.Editor.dll</HintPath>
101101
</Reference>
102102
<Reference Include="Unity.Rider.Editor">
103-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.Rider.Editor.dll</HintPath>
103+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.Rider.Editor.dll</HintPath>
104104
</Reference>
105105
<Reference Include="Unity.2D.Sprite.Editor">
106-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll</HintPath>
106+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.2D.Sprite.Editor.dll</HintPath>
107107
</Reference>
108108
<Reference Include="Unity.2D.Tilemap.Editor">
109-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll</HintPath>
109+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.2D.Tilemap.Editor.dll</HintPath>
110110
</Reference>
111111
<Reference Include="Unity.TextMeshPro">
112-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath>
112+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/Unity.TextMeshPro.dll</HintPath>
113113
</Reference>
114114
<Reference Include="UnityEditor.UI">
115-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath>
115+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Library/ScriptAssemblies/UnityEditor.UI.dll</HintPath>
116116
</Reference>
117117
<Reference Include="UnityEngine.AIModule">
118118
<HintPath>C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll</HintPath>
@@ -292,13 +292,7 @@
292292
<HintPath>C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/Managed/UnityEngine/UnityEngine.XRModule.dll</HintPath>
293293
</Reference>
294294
<Reference Include="Facepunch.Steamworks.Win64">
295-
<HintPath>G:/EntityNetworkingSystems/EntityNetworkingSystems/Assets/EntityNetworkingSystems/Plugins/Facepunch.Steamworks/Facepunch.Steamworks.Win64.dll</HintPath>
296-
</Reference>
297-
<Reference Include="UnityEditor.iOS.Extensions.Xcode">
298-
<HintPath>C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Xcode.dll</HintPath>
299-
</Reference>
300-
<Reference Include="UnityEditor.iOS.Extensions.Common">
301-
<HintPath>C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/PlaybackEngines/iOSSupport/UnityEditor.iOS.Extensions.Common.dll</HintPath>
295+
<HintPath>C:/Users/Ryan/Desktop/EntityNetworkingSystems/Assets/EntityNetworkingSystems/Plugins/Facepunch.Steamworks/Facepunch.Steamworks.Win64.dll</HintPath>
302296
</Reference>
303297
<Reference Include="netstandard">
304298
<HintPath>C:/Program Files/Unity/Hub/Editor/2019.3.8f1/Editor/Data/NetStandard/ref/2.0.0/netstandard.dll</HintPath>

Assets/EntityNetworkingSystems/Examples/Prefabs/Player.prefab

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,18 @@ MonoBehaviour:
9999
networkID: -1
100100
ownerID: -1
101101
sharedObject: 0
102+
trackPlayerProxPos: 0
103+
detectNetworkStarts: 0
104+
updateFieldsThroughServer: 0
102105
fields:
103-
- fieldName: position
104-
defaultValue: 9
106+
- fieldName: ENS_Position
107+
defaultValue: 6
105108
onValueChange:
106109
m_PersistentCalls:
107-
m_Calls:
108-
- m_Target: {fileID: -3667445291438537542}
109-
m_MethodName: OnValueChangeTestExample
110-
m_Mode: 0
111-
m_Arguments:
112-
m_ObjectArgument: {fileID: 0}
113-
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
114-
m_IntArgument: 0
115-
m_FloatArgument: 0
116-
m_StringArgument:
117-
m_BoolArgument: 0
118-
m_CallState: 2
110+
m_Calls: []
111+
onValueChangeMethods: []
112+
shouldBeProximity: 0
113+
netObj: {fileID: 0}
119114
rpcs:
120115
- rpcName: RandomColor
121116
serverAuthorityRequired: 0
@@ -133,6 +128,7 @@ MonoBehaviour:
133128
m_StringArgument:
134129
m_BoolArgument: 0
135130
m_CallState: 2
131+
onValueChangeMethods: []
136132
onNetworkStart:
137133
m_PersistentCalls:
138134
m_Calls: []

Assets/EntityNetworkingSystems/Examples/Prefabs/TestPrefab.prefab

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,18 @@ MonoBehaviour:
100100
networkID: -1
101101
ownerID: -1
102102
sharedObject: 0
103+
trackPlayerProxPos: 0
104+
detectNetworkStarts: 0
105+
updateFieldsThroughServer: 0
103106
fields:
104-
- fieldName: position
107+
- fieldName: ENS_Position
105108
defaultValue: 6
106109
onValueChange:
107110
m_PersistentCalls:
108111
m_Calls: []
112+
onValueChangeMethods: []
113+
shouldBeProximity: 0
114+
netObj: {fileID: 0}
109115
rpcs: []
110116
onNetworkStart:
111117
m_PersistentCalls:

Assets/EntityNetworkingSystems/Examples/Scripts/ExampleMoving.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ public class ExampleMoving : MonoBehaviour
1111
void Start()
1212
{
1313
net = GetComponent<NetworkObject>();
14-
net.onNetworkStart.AddListener(OnNetStart);
15-
}
16-
17-
void OnNetStart()
18-
{
19-
net.fields[0].UpdateField<SerializableVector>(new SerializableVector(transform.position.x, transform.position.y, transform.position.z), net.networkID,immediateOnSelf:true);
2014
}
2115

2216
// Update is called once per frame
@@ -26,10 +20,5 @@ void Update()
2620
{
2721
return;
2822
}
29-
if (net.fields[0].IsInitialized())
30-
{
31-
SerializableVector sV = (SerializableVector)net.GetField<SerializableVector>("position");
32-
transform.position = sV.ToVec3();
33-
}
3423
}
3524
}

Assets/EntityNetworkingSystems/Examples/Scripts/ExamplePlayerController.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void SetRandomColor()
3838

3939
void OnNetStart()
4040
{
41-
net.UpdateField("position", new SerializableVector(transform.position),immediateOnSelf:true);
41+
net.UpdateField("ENS_Position", new SerializableVector(transform.position),immediateOnSelf:true);
4242
}
4343

4444
void FixedUpdate()
@@ -50,31 +50,27 @@ void FixedUpdate()
5050

5151
if(!net.IsOwner())
5252
{
53-
if (net.fields[0].IsInitialized())
54-
{
55-
transform.position = net.GetField<SerializableVector>("position").ToVec3();
56-
}
5753
return;
5854
}
5955
if (Input.GetKey(KeyCode.W))
6056
{
6157
transform.Translate(new Vector3(0f, 0.4f, 0f));
62-
net.UpdateField("position", new SerializableVector(transform.position));
58+
net.UpdateField("ENS_Position", new SerializableVector(transform.position));
6359
}
6460
else if (Input.GetKey(KeyCode.S))
6561
{
6662
transform.Translate(new Vector3(0f, -0.4f, 0f));
67-
net.UpdateField("position", new SerializableVector(transform.position));
63+
net.UpdateField("ENS_Position", new SerializableVector(transform.position));
6864
}
6965
if (Input.GetKey(KeyCode.D))
7066
{
7167
transform.Translate(new Vector3(0.4f, 0.0f, 0f));
72-
net.UpdateField("position", new SerializableVector(transform.position));
68+
net.UpdateField("ENS_Position", new SerializableVector(transform.position));
7369
}
7470
else if (Input.GetKey(KeyCode.A))
7571
{
7672
transform.Translate(new Vector3(-0.4f, 0.0f, 0f));
77-
net.UpdateField("position", new SerializableVector(transform.position));
73+
net.UpdateField("ENS_Position", new SerializableVector(transform.position));
7874
}
7975
}
8076
}

0 commit comments

Comments
 (0)