Skip to content

Commit da76481

Browse files
author
FirstGearGames
committed
4.6.9
- Added ForceInstallPreventor -- stops playeveryware EOS plugin from force installing NGO when imported. - Improved whole number packing. - Fixed potential for ObjectIds being cached twice for re-use when exceeding 65,000 total spawns. - Fixed rare BandwidthDisplay NaN conversion error. - Fixed DefaultObjectPool cacheCount being set to incorrect values (#909).
1 parent 2c5b0c5 commit da76481

File tree

45 files changed

+568
-360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+568
-360
lines changed

Assets/FishNet/Demos/Benchmarks/NetworkTransform/Prefabs/NetworkTransform Benchmark 2D.prefab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ MonoBehaviour:
133133
m_Name:
134134
m_EditorClassIdentifier:
135135
<IsNested>k__BackingField: 0
136-
WasActiveDuringEdit: 1
137-
WasActiveDuringEdit_Set: 1
136+
WasActiveDuringEdit: 0
137+
WasActiveDuringEdit_Set1: 1
138138
<ComponentIndex>k__BackingField: 0
139139
<PredictedSpawn>k__BackingField: {fileID: 0}
140140
<PredictedOwner>k__BackingField: {fileID: 0}
@@ -165,7 +165,7 @@ MonoBehaviour:
165165
_spectatorInterpolation: 2
166166
_enableTeleport: 0
167167
_teleportThreshold: 1
168-
<PrefabId>k__BackingField: 9
168+
<PrefabId>k__BackingField: 12
169169
<SpawnableCollectionId>k__BackingField: 0
170170
<AssetPathHash>k__BackingField: 5448584063611559504
171171
<SceneId>k__BackingField: 0

Assets/FishNet/Demos/Benchmarks/NetworkTransform/Prefabs/NetworkTransform Benchmark 3D Normal.prefab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ MonoBehaviour:
4848
m_Name:
4949
m_EditorClassIdentifier:
5050
<IsNested>k__BackingField: 0
51-
WasActiveDuringEdit: 1
52-
WasActiveDuringEdit_Set: 1
51+
WasActiveDuringEdit: 0
52+
WasActiveDuringEdit_Set1: 1
5353
<ComponentIndex>k__BackingField: 0
5454
<PredictedSpawn>k__BackingField: {fileID: 0}
5555
<PredictedOwner>k__BackingField: {fileID: 0}
@@ -80,7 +80,7 @@ MonoBehaviour:
8080
_spectatorInterpolation: 2
8181
_enableTeleport: 0
8282
_teleportThreshold: 1
83-
<PrefabId>k__BackingField: 23
83+
<PrefabId>k__BackingField: 31
8484
<SpawnableCollectionId>k__BackingField: 0
8585
<AssetPathHash>k__BackingField: 12758516177287752350
8686
<SceneId>k__BackingField: 0

Assets/FishNet/Demos/Benchmarks/NetworkTransform/Prefabs/NetworkTransform Benchmark 3D Rigidbodies.prefab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ MonoBehaviour:
218218
m_Name:
219219
m_EditorClassIdentifier:
220220
<IsNested>k__BackingField: 0
221-
WasActiveDuringEdit: 1
222-
WasActiveDuringEdit_Set: 1
221+
WasActiveDuringEdit: 0
222+
WasActiveDuringEdit_Set1: 1
223223
<ComponentIndex>k__BackingField: 0
224224
<PredictedSpawn>k__BackingField: {fileID: 0}
225225
<PredictedOwner>k__BackingField: {fileID: 0}
@@ -250,7 +250,7 @@ MonoBehaviour:
250250
_spectatorInterpolation: 2
251251
_enableTeleport: 0
252252
_teleportThreshold: 1
253-
<PrefabId>k__BackingField: 13
253+
<PrefabId>k__BackingField: 17
254254
<SpawnableCollectionId>k__BackingField: 0
255255
<AssetPathHash>k__BackingField: 6471616483407953140
256256
<SceneId>k__BackingField: 0

Assets/FishNet/Demos/Benchmarks/NetworkTransform/Prefabs/NetworkTransform Benchmark Cubes.prefab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ MonoBehaviour:
4848
m_Name:
4949
m_EditorClassIdentifier:
5050
<IsNested>k__BackingField: 0
51-
WasActiveDuringEdit: 1
52-
WasActiveDuringEdit_Set: 1
51+
WasActiveDuringEdit: 0
52+
WasActiveDuringEdit_Set1: 1
5353
<ComponentIndex>k__BackingField: 0
5454
<PredictedSpawn>k__BackingField: {fileID: 0}
5555
<PredictedOwner>k__BackingField: {fileID: 0}
@@ -80,7 +80,7 @@ MonoBehaviour:
8080
_spectatorInterpolation: 2
8181
_enableTeleport: 0
8282
_teleportThreshold: 1
83-
<PrefabId>k__BackingField: 27
83+
<PrefabId>k__BackingField: 36
8484
<SpawnableCollectionId>k__BackingField: 0
8585
<AssetPathHash>k__BackingField: 15845183709739124870
8686
<SceneId>k__BackingField: 0

Assets/FishNet/Demos/Benchmarks/NetworkTransform/Prefabs/NetworkTransform Benchmark Rigidbodies.prefab

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ MonoBehaviour:
4949
m_Name:
5050
m_EditorClassIdentifier:
5151
<IsNested>k__BackingField: 0
52-
WasActiveDuringEdit: 1
53-
WasActiveDuringEdit_Set: 1
52+
WasActiveDuringEdit: 0
53+
WasActiveDuringEdit_Set1: 1
5454
<ComponentIndex>k__BackingField: 0
5555
<PredictedSpawn>k__BackingField: {fileID: 0}
5656
<PredictedOwner>k__BackingField: {fileID: 0}
@@ -81,7 +81,7 @@ MonoBehaviour:
8181
_spectatorInterpolation: 2
8282
_enableTeleport: 0
8383
_teleportThreshold: 1
84-
<PrefabId>k__BackingField: 26
84+
<PrefabId>k__BackingField: 35
8585
<SpawnableCollectionId>k__BackingField: 0
8686
<AssetPathHash>k__BackingField: 15013615375196309252
8787
<SceneId>k__BackingField: 0

Assets/FishNet/Demos/Benchmarks/NetworkTransform/Scenes/NetworkTransform Benchmark.unity

Lines changed: 86 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,74 @@ MonoBehaviour:
141141
_tickRate: 50
142142
_pingInterval: 15
143143
_physicsMode: 1
144+
--- !u!1 &391166852
145+
GameObject:
146+
m_ObjectHideFlags: 0
147+
m_CorrespondingSourceObject: {fileID: 0}
148+
m_PrefabInstance: {fileID: 0}
149+
m_PrefabAsset: {fileID: 0}
150+
serializedVersion: 6
151+
m_Component:
152+
- component: {fileID: 391166855}
153+
- component: {fileID: 391166854}
154+
- component: {fileID: 391166853}
155+
m_Layer: 0
156+
m_Name: EventSystem
157+
m_TagString: Untagged
158+
m_Icon: {fileID: 0}
159+
m_NavMeshLayer: 0
160+
m_StaticEditorFlags: 0
161+
m_IsActive: 1
162+
--- !u!114 &391166853
163+
MonoBehaviour:
164+
m_ObjectHideFlags: 0
165+
m_CorrespondingSourceObject: {fileID: 0}
166+
m_PrefabInstance: {fileID: 0}
167+
m_PrefabAsset: {fileID: 0}
168+
m_GameObject: {fileID: 391166852}
169+
m_Enabled: 1
170+
m_EditorHideFlags: 0
171+
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
172+
m_Name:
173+
m_EditorClassIdentifier:
174+
m_SendPointerHoverToParent: 1
175+
m_HorizontalAxis: Horizontal
176+
m_VerticalAxis: Vertical
177+
m_SubmitButton: Submit
178+
m_CancelButton: Cancel
179+
m_InputActionsPerSecond: 10
180+
m_RepeatDelay: 0.5
181+
m_ForceModuleActive: 0
182+
--- !u!114 &391166854
183+
MonoBehaviour:
184+
m_ObjectHideFlags: 0
185+
m_CorrespondingSourceObject: {fileID: 0}
186+
m_PrefabInstance: {fileID: 0}
187+
m_PrefabAsset: {fileID: 0}
188+
m_GameObject: {fileID: 391166852}
189+
m_Enabled: 1
190+
m_EditorHideFlags: 0
191+
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
192+
m_Name:
193+
m_EditorClassIdentifier:
194+
m_FirstSelected: {fileID: 0}
195+
m_sendNavigationEvents: 1
196+
m_DragThreshold: 10
197+
--- !u!4 &391166855
198+
Transform:
199+
m_ObjectHideFlags: 0
200+
m_CorrespondingSourceObject: {fileID: 0}
201+
m_PrefabInstance: {fileID: 0}
202+
m_PrefabAsset: {fileID: 0}
203+
m_GameObject: {fileID: 391166852}
204+
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
205+
m_LocalPosition: {x: 0, y: 0, z: 0}
206+
m_LocalScale: {x: 1, y: 1, z: 1}
207+
m_ConstrainProportionsScale: 0
208+
m_Children: []
209+
m_Father: {fileID: 0}
210+
m_RootOrder: 3
211+
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
144212
--- !u!1 &442045874
145213
GameObject:
146214
m_ObjectHideFlags: 0
@@ -226,7 +294,7 @@ MonoBehaviour:
226294
<PrefabId>k__BackingField: 0
227295
<SpawnableCollectionId>k__BackingField: 0
228296
<AssetPathHash>k__BackingField: 0
229-
<SceneId>k__BackingField: 4202162490
297+
<SceneId>k__BackingField: 3675717101
230298
SerializedTransformProperties:
231299
Position: {x: 0, y: 0, z: 0}
232300
Rotation: {x: 0, y: 0, z: 0, w: 1}
@@ -249,6 +317,7 @@ MonoBehaviour:
249317
_networkObjectCache: {fileID: 0}
250318
_prefab: {fileID: 4512293259955182956, guid: b8017cef39731ba439c70fecc09488e3, type: 3}
251319
_count: 50
320+
_displayText: {fileID: 0}
252321
--- !u!1 &584355000
253322
GameObject:
254323
m_ObjectHideFlags: 0
@@ -532,6 +601,22 @@ PrefabInstance:
532601
m_Modification:
533602
m_TransformParent: {fileID: 7443408886575219561}
534603
m_Modifications:
604+
- target: {fileID: 818862022, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
605+
propertyPath: m_AnchoredPosition.x
606+
value: 155.1001
607+
objectReference: {fileID: 0}
608+
- target: {fileID: 818862022, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
609+
propertyPath: m_AnchoredPosition.y
610+
value: -52.69995
611+
objectReference: {fileID: 0}
612+
- target: {fileID: 3414662637240338350, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
613+
propertyPath: m_AnchoredPosition.x
614+
value: 78.1001
615+
objectReference: {fileID: 0}
616+
- target: {fileID: 3414662637240338350, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
617+
propertyPath: m_AnchoredPosition.y
618+
value: -121.400024
619+
objectReference: {fileID: 0}
535620
- target: {fileID: 4393252310969058990, guid: 0570b6f7f713dc44a90463654bbcd8d0, type: 3}
536621
propertyPath: m_Pivot.x
537622
value: 0

Assets/FishNet/Demos/Benchmarks/NetworkTransform/Scripts/MoveRandomlyNonPhysics.cs

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private struct GoalData
2020

2121
[SerializeField]
2222
private bool _is2d;
23-
23+
2424
[Header("Changes")]
2525
[SerializeField]
2626
[Range(0, 3)]
@@ -33,6 +33,11 @@ private struct GoalData
3333
private float _rotationChance = 0.33f;
3434

3535
[Header("Movement")]
36+
[Range(0f, 5f)]
37+
[SerializeField]
38+
private float _delayBetweenMovements = 1.5f;
39+
[SerializeField]
40+
private float _yOffsetPerInstance = 0f;
3641
[SerializeField]
3742
private bool _randomMovement = true;
3843
[SerializeField]
@@ -50,6 +55,7 @@ private struct GoalData
5055
[SerializeField]
5156
private float _range = 6f;
5257

58+
5359
//Position to move towards.
5460
private Vector3 _goalPosition;
5561
//Rotation to move towards.
@@ -58,8 +64,11 @@ private struct GoalData
5864
private Quaternion _lastRot;
5965
private int _nextGoalDataIndex = 0;
6066

67+
private float _nextMoveTime = float.MinValue;
68+
6169
public override void OnStartNetwork()
6270
{
71+
6372
if (!base.IsServerStarted && !base.Owner.IsLocalClient)
6473
{
6574
base.SetTickCallbacks(TickCallback.None);
@@ -76,13 +85,17 @@ public override void OnStartNetwork()
7685

7786
protected override void TimeManager_OnUpdate()
7887
{
79-
Move(Time.deltaTime);
88+
if (_moveInUpdate)
89+
Move(Time.deltaTime);
8090
}
8191

8292
protected override void TimeManager_OnTick()
8393
{
84-
float delta = (float)base.TimeManager.TickDelta;
85-
Move(delta);
94+
if (!_moveInUpdate)
95+
{
96+
float delta = (float)base.TimeManager.TickDelta;
97+
Move(delta);
98+
}
8699
}
87100

88101
private void Move(float delta)
@@ -91,6 +104,8 @@ private void Move(float delta)
91104
return;
92105
if (!base.IsController)
93106
return;
107+
if (Time.time < _nextMoveTime)
108+
return;
94109

95110
transform.position = Vector3.MoveTowards(transform.position, _goalPosition, _moveRate * delta);
96111
if (!_is2d)
@@ -104,7 +119,25 @@ private void Move(float delta)
104119

105120
public override void OnStartServer()
106121
{
122+
TrySetFirstGoal();
123+
}
124+
125+
public override void OnStartClient()
126+
{
127+
TrySetFirstGoal();
128+
}
129+
130+
private void TrySetFirstGoal()
131+
{
132+
if (!base.IsController)
133+
return;
134+
107135
SetNextGoal();
136+
137+
transform.position = _goalPosition;
138+
transform.rotation = _goalRotation;
139+
140+
_nextMoveTime = float.MinValue;
108141
}
109142

110143
private void SetNextGoal()
@@ -114,6 +147,8 @@ private void SetNextGoal()
114147
else
115148
SetSpecifiedGoal();
116149

150+
_nextMoveTime = Time.time + _delayBetweenMovements;
151+
117152
void SetSpecifiedGoal()
118153
{
119154
if (_goalDatas.Count == 0) return;
@@ -123,7 +158,7 @@ void SetSpecifiedGoal()
123158

124159
int index = _nextGoalDataIndex;
125160
_nextGoalDataIndex++;
126-
161+
127162
_goalPosition = _goalDatas[index].Position;
128163
_goalRotation = Quaternion.Euler(_goalDatas[index].Eulers);
129164
}
@@ -141,11 +176,11 @@ void SetRandomGoal()
141176
next.y = rnd.y;
142177
if (_axes >= 3 && RandomizeAxes())
143178
next.z = rnd.z;
144-
179+
145180
//Make sure at least one axes is set.
146181
if (next == transform.position)
147182
next.x = rnd.x;
148-
183+
149184
bool RandomizeAxes() => (Random.Range(0f, 1f) <= _chancePerAxes);
150185

151186
_goalPosition = next;

0 commit comments

Comments
 (0)