Commit Graph

2061 Commits

Author SHA1 Message Date
James Frowen
1614c68629
Tests for sync dictionary and sync set (#1753)
* sync dictionary tests

* rename

* changing error message

* sync set tests
2020-04-22 18:54:09 +02:00
Chris Langsenkamp
cf6823acb5 fix: Removed NetworkServer.Listen because HostSetup does that 2020-04-22 06:39:46 -04:00
Chris Langsenkamp
984945e482 fix: Removed NetworkClient.Update because NetworkManager does it in LateUpdate 2020-04-22 06:34:34 -04:00
Chris Langsenkamp
bdec276282 fix: Add the transport first so NetworkManager doesn't add Telepathy in OnValidate 2020-04-22 06:32:26 -04:00
James Frowen
9bf816a014
feat: Allowing extra base types to be used for SyncLists and other SyncObjects (#1729)
* Tests for most uses of sync list

renaming classes for existing test files

* improving error message for Paramless constructor

* More tests for SyncLists

* updating error message

* ignore abstract classes

we dont need to process abstract classes because classes that
inherit from them will be processed instead

* check and error for syncList item being genric

* allowing extra base types for synclist

* checking for nested types in abstract classes

* test for nested types inside structs
2020-04-22 09:40:40 +02:00
uwee
ddd4b0b1fc
use HostSetup in tests (#1761) 2020-04-22 09:38:07 +02:00
uwee
262c1129dc
add test for NS Reset (#1758)
* add test for NS Reset

this code is depreciated but it should have a test as long as its in the code base

* typo
2020-04-21 23:49:46 +02:00
uwee
d996079042
remove empty if statement (#1757)
the current state is an untestable if statement. the if (!dont) is not pretty but the same logic is used later in the same file under Listen()
2020-04-21 23:49:11 +02:00
uwee
2f7053c6be
return bool to allow testing (#1756) 2020-04-21 23:48:42 +02:00
uwee
c2c1f86fe8
add HostSetup for tests (#1755) 2020-04-21 23:48:06 +02:00
uwee
c4bfb9d037
remove unused using (#1754) 2020-04-21 23:47:20 +02:00
James Frowen
2cf0fc71a7
Clean up sync object tests (#1750)
* cleaning up tests

* clearing dirty before test
2020-04-21 08:29:46 -05:00
uwee
3cf686f3b8
add base OnSetHostVisibility test (#1749)
* add base OnSetHostVisibility test

* fix code smells
2020-04-21 09:58:14 +02:00
MrGadget
2d006fe730
fix: Remove leftover AddPlayer methods now that extraData is gone (#1751) 2020-04-21 09:56:14 +02:00
James Frowen
58c89a3d32
fix: Allow sync objects to be re-used (#1744)
fixes #1714
2020-04-20 19:20:25 -05:00
Chris Langsenkamp
8798cd18ce Updated NetworkManage template 2020-04-20 18:49:21 -04:00
Paul Pacheco
3dd709ac35
Remove MarkForReset (#1747)
* Remove MarkForReset

* Update Assets/Mirror/Runtime/NetworkIdentity.cs

* Update Assets/Mirror/Tests/Editor/NetworkServerTest.cs
2020-04-20 20:07:22 +02:00
Chris Langsenkamp
5d4bc47d46 fix: Use path instead of name in Room Example 2020-04-20 11:04:18 -04:00
Chris Langsenkamp
2a2f76c263 fix: Remove RoomPlayer from roomSlots on Disconnect 2020-04-20 11:02:45 -04:00
James Frowen
055a264660
adding return so that exception isnt throw after error (#1746) 2020-04-20 08:51:40 -05:00
Chris Langsenkamp
8e7bb44c3a Updated docs, comments, template pursuant to renaming of OnNetworkDestroy 2020-04-20 09:42:16 -04:00
Paul Pacheco
d1695dd16f
feat: new virtual OnStopServer called when object is unspawned (#1743) 2020-04-20 10:36:03 +02:00
Paul Pacheco
86ac5ad40b
Rename OnNetworkDestroy to OnStopClient (#1742)
OnNetworkDestroy is not a good name,  is it server? is it client?
you can't tell by the name.

Moreover,  we have OnStartClient,  API should be symetric so we should
have a corresponding OnStopClient.

Note this keeps backwards compatibility with an Obsolete for now
2020-04-20 10:35:34 +02:00
Chris Langsenkamp
e03c2a0ee1 restored 1bitpack_kenny metas 2020-04-19 17:32:51 -04:00
James Frowen
f17cea771e
using IsDerivedFrom instead of while loop (#1739) 2020-04-19 14:12:37 -05:00
James Frowen
a86d1cdfff
Adding error to network behaviour when generic sync object is used (#1741)
* test for using Generic SyncList

* adding error to network behaviour when generic sync object is used

* ignore generic classes

we can not process generic classes
we give error if a generic syncObject is used in NetworkBehaviour
2020-04-19 19:34:05 +02:00
James Frowen
a523d5f521
using if instead of try catch (#1740) 2020-04-19 19:33:30 +02:00
James Frowen
c25b1c6043
removing old test files (#1738) 2020-04-19 12:57:58 +01:00
James Frowen
f83093893e
Weaver error messages and tests for using interfaces (#1737)
* more tests for readwriters

* updating error message

* fixing error messages
2020-04-18 22:55:17 -05:00
Chris Langsenkamp
a6258d2d70 Remove and Ignore 1bitpack_kenney png.meta files. 2020-04-18 23:33:13 -04:00
James Frowen
f6e4068ebe
removing ignored test (#1736) 2020-04-19 00:53:39 +01:00
James Frowen
24469859e5
adding error to reader (#1726)
these checks are already in writer
2020-04-18 10:52:22 +02:00
James Frowen
5c56adc1dc
feat: default log level option (#1728)
Each class can specify default log levels when requesting the logger.
2020-04-17 18:11:44 -05:00
MrGadget
21acf66190
feat: NetworkMatchChecker Component (#1688)
* feat: NetworkMatchChecker Component

* Added docs

* feat: Use logger framework for NetworkClient (#1685)

* Use logger framework for NetworkClient

* Update Assets/Mirror/Runtime/NetworkClient.cs

Co-authored-by: vis2k <info@noobtuts.com>

* breaking: NetworkVisbility component (#1681)

* backup

* breaking: NetworkProximityCheck abstract class. Simplifies code, reduces complexity, improves performance because if 10k identities have 10 components each, we don't have to iterate 100k components each time we rebuild observers.

* update tests and checkers

* DisallowMultipleComponents

* fix tests

* split OnCheckObserver check

* fix tests

* syntax

* update comment

* renamed to NetworkVisibility

* forgot to remove comment

* breaking: Network Visibility Component

* changing namespaces of performance tests (#1689)

* Updated to use NetworkVisibility

* Updated comments

* Updated OnCheckObserver and removed OnSetHostVisibility

* tests for OnCheckObserver

* adding check for empty guid

* tests for changing matchId

* RebuildObservers if player left a match

* Refactored to make it simpler

Co-authored-by: Paul Pacheco <paulpach@gmail.com>
Co-authored-by: vis2k <info@noobtuts.com>
Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
2020-04-17 10:35:08 +02:00
MrGadget
cbc2a47729
fix: Don't destroy the player twice (#1709)
* fix: Don't destroy the player twice

* adding test

Co-authored-by: James Frowen <jamesfrowendev@gmail.com>
2020-04-17 10:34:17 +02:00
MrGadget
e5b728fed5
fix: Eliminate NetworkAnimator SetTrigger double firing on Host (#1723) 2020-04-17 00:53:46 +02:00
James Frowen
df7c671604
using MemoryTransport for ULocalConnectionPerformance (#1720) 2020-04-16 19:33:13 +02:00
James Frowen
db87c961b0
fixing TearDown and removing extra calls to shutdown (#1722) 2020-04-16 19:32:51 +02:00
James Frowen
3368026b2c
adding extra performance test for NetworkIdentity (#1721) 2020-04-16 10:52:24 +02:00
James Frowen
b1644ae481
feat: Weaver can now automatically create Reader/Writer for types in a different assembly (#1708)
* fix: serialize structs in other assemblies

fixes #1570

* removing check for type in another assembly

* fixing call to default constructor

* removing old tests that not longer apply

* fixing typo

* adding error when creating writer for unity base classes

* Test for Generating Reader and Writer functions

* removing old function

Co-authored-by: Paul Pacheco <paulpach@gmail.com>
2020-04-16 10:50:49 +02:00
James Frowen
58219c8f72
perf: Adding dirty check before update sync var (#1702)
* adding dirty check before update sync var

* Moving creating spawn payload to its own function

* updating tests

* adding tests for behaviour mask

* adding comment

* removing un-needed cast
2020-04-16 10:49:33 +02:00
James Frowen
17f8e9721a
re adding caching for OutputDirectory (#1719) 2020-04-15 14:06:18 -05:00
Paul Pacheco
93f7028e0d split weaver test files by test class 2020-04-15 12:14:25 -05:00
Paul Pacheco
2b1aefab39 use logger framework instead of preprocessor 2020-04-15 11:33:48 -05:00
Paul Pacheco
e109ce3e87 paths should be combined, not added 2020-04-15 09:57:45 -05:00
Paul Pacheco
c483047486 Remove unused option 2020-04-15 09:14:44 -05:00
Devon Merner
d8c121695c
networkSceneName sets to empty on StopClient and StopServer. (#1715) 2020-04-15 11:31:27 +02:00
Devon Merner
0fe6328800
feat: Added SyncList.Find and SyncList.FindAll (#1716)
fixes #1710
2020-04-14 20:51:14 -05:00
James Frowen
6383e9884f
Moving weaver tests 2 (#1706)
* adding WeaverTestsBuildFromTestName

* removing event handlers on TearDown
2020-04-14 20:04:07 -05:00
James-Frowen Laptop2
239b7b762a removing extra lines 2020-04-14 19:54:09 -05:00