James Frowen
c4d373984d
Moving weaver tests into their own classes
2020-04-14 19:53:45 -05:00
uwee
af2e732adb
docs: remove mention of networkPort from NetworkManager ( #1712 )
...
fixes #1711
2020-04-14 17:37:49 +02:00
James Frowen
6e081f3d40
NetworkIdentity ServerUpdate Performance test ( #1703 )
2020-04-14 11:13:21 +02:00
James Frowen
c66c5a6dcc
fix: Fixing SyncVars not serializing when OnSerialize is overridden ( #1671 )
...
* Adding SyncVar methods
this will allow SyncVars to still work if user overrides
OnSerialize as long as they call base.OnSerialize
* Adding tests for NetworkBehaviour OnSerialize
These tests make sure that weaver correctly create code for syncvar
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* Update Assets/Mirror/Runtime/NetworkBehaviour.cs
* adding extra test
Co-authored-by: Paul Pacheco <paulpach@gmail.com>
Co-authored-by: vis2k <info@noobtuts.com>
2020-04-14 11:11:15 +02:00
Chris Langsenkamp
0e1aa1b305
Updated Netowork Observer template
2020-04-13 21:08:14 -04:00
MrGadget
4994193668
Make OnSetHostVisibility virtual with default functionality ( #1707 )
2020-04-13 20:05:08 -05:00
Chris Langsenkamp
cbe499e052
NetworkVisibility: Put methods in correct order
2020-04-13 20:17:07 -04:00
Chris Langsenkamp
6fec901a80
Updated Network Observer Template
2020-04-13 20:05:00 -04:00
James Frowen
eec45ff8fe
Adding changed check to PreprocessorDefine ( #1698 )
...
* Adding changed check to PreprocessorDefine
this stops ProjectSettings being marked as dirty each time the editor is opened
* Update PreprocessorDefine.cs
Co-authored-by: vis2k <info@noobtuts.com>
2020-04-13 10:14:04 +02:00
Chris Langsenkamp
8aabb54929
Don't rename spawned objects
2020-04-12 21:48:41 -04:00
Paul Pacheco
003597bc11
Remove commented out code
2020-04-12 11:06:13 -05:00
Paul Pacheco
b7cef180d4
Rename local variable for clarity
2020-04-12 11:06:13 -05:00
Paul Pacheco
61cf445395
Rename method for clarity
2020-04-12 11:06:13 -05:00
Paul Pacheco
78ff826684
Fix smells
2020-04-12 11:06:13 -05:00
Paul Pacheco
2a456a0161
Reduce cognitive complexity of Weave
2020-04-12 11:06:13 -05:00
Paul Pacheco
1a2af279ca
Remove unused method
2020-04-12 11:06:13 -05:00
Paul Pacheco
91920e0a6e
fix code smells
2020-04-12 11:06:13 -05:00
uwee
0e84e9dd4e
smell: reduce OnGUI complexity ( #1696 )
2020-04-12 16:48:25 +02:00
James Frowen
f8f939fd9c
Making ULocalConnectionPerformance test clean up new objects ( #1700 )
...
stops testPlayerPrefab was causing problems with OnPostProcessScene in other runtime tests
2020-04-12 13:44:45 +01:00
James Frowen
83d1648913
changing test namespace ( #1699 )
2020-04-12 13:18:05 +01:00
Chris Langsenkamp
9c3f5710eb
Updated docs and comments re: Network Visibility
2020-04-12 07:54:28 -04:00
James Frowen
18bd792a0b
Improving Performance Benchmark ( #1695 )
...
Taking measurements for frames and LateUpdate at same time.
2020-04-12 00:52:48 +01:00
James Frowen
9d24d45987
Adding defines to performance tests ( #1690 )
...
* adding defines
* adding versionDefines
2020-04-11 20:59:42 +02:00
James Frowen
24e2af098f
changing namespaces of performance tests ( #1689 )
2020-04-11 17:30:18 +01:00
Chris Langsenkamp
25ee8540f9
breaking: Network Visibility Component
2020-04-11 11:56:21 -04:00
vis2k
70ddf92a5c
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
2020-04-11 15:37:35 +02:00
Paul Pacheco
6e92bf5616
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>
2020-04-11 13:21:14 +02:00
James Frowen
c0a82a86ea
Logger editor ( #1613 )
...
* window for mirror log levels
* applying suggestions
2020-04-10 13:20:05 -05:00
MrGadget
e7cfd5a498
fix: Check SceneManager GetSceneByName and GetSceneByPath ( #1684 )
...
* fix: Check SceneManager GetSceneByName and GetSceneByPath
* Fix example too.
2020-04-10 11:26:37 -05:00
Paul Pacheco
55e075c872
fix: stack overflow getting logger
2020-04-10 11:14:20 -05:00
Paul Pacheco
de87634ec5
Some extension methods for convenient migration
2020-04-10 11:11:51 -05:00
Paul Pacheco
f9328c771c
feat: logger factory works for static classes by passing the type
2020-04-10 10:51:42 -05:00
MrGadget
bc37497ac9
fix: Re-enable transport if aborting additive load/unload ( #1683 )
...
* fix: Re-enable transports if aborting additive load/unload
* Restore debug if's
2020-04-10 11:42:38 -04:00
James Frowen
95705a1545
Moving error check to when cache is created ( #1682 )
...
* Moving error check to when cache is created
* updating tests for new code behaviour
* Update Assets/Mirror/Runtime/NetworkIdentity.cs
Co-authored-by: vis2k <info@noobtuts.com>
2020-04-10 17:15:24 +02:00
vis2k
0b44ccee99
syntax
2020-04-10 10:06:37 +02:00
James Frowen
f0579835ca
perf: Increasing Network Writer performance ( #1674 )
...
* Increasing performance of network writer
* Using Array.Clear
renaming value to newLength
* Update Assets/Mirror/Tests/Editor/NetworkWriterTest.cs
Co-Authored-By: Paul Pacheco <paulpach@gmail.com>
* adding braces
* extracting EnsureCapacity method
* Update NetworkWriter.cs
Co-authored-by: Paul Pacheco <paulpach@gmail.com>
Co-authored-by: vis2k <info@noobtuts.com>
2020-04-10 09:45:09 +02:00
Chris Langsenkamp
c1fe2124d8
Removed SpawnWithClientAuthority from comments and docs
2020-04-09 16:51:41 -04:00
James Frowen
8ce65045c8
Benchmark performance test 2 - Idle benchmark ( #1662 )
...
* adding bool to stop health updating
* idle benchmark
* using FindObjectsOfType instead of static field
2020-04-09 09:40:37 +02:00
James Frowen
7e7ffcd892
Adding report to performance test readme
2020-04-08 16:24:39 +01:00
James Frowen
7a06815d75
adding static check before adding this arg ( #1668 )
2020-04-07 19:50:48 +02:00
James Frowen
60678d9bc7
adding readme ( #1672 )
2020-04-07 12:30:57 -05:00
James Frowen
4fc58be148
making network behaviour abstract ( #1669 )
2020-04-07 10:23:09 +02:00
James Frowen
17885a0da2
Adding comments to NetworkBehaviour ( #1670 )
2020-04-07 00:33:15 +01:00
James Frowen
f8dee1f1a1
removing unnecessary using ( #1667 )
2020-04-06 09:56:26 -05:00
James Frowen
75dc0af65f
Pipeline fix for performance tests ( #1666 )
...
* updating coverage manifest
* removing version tag
2020-04-06 09:42:47 -05:00
James Frowen
52e91e7d1e
Benchmark performance test ( #1661 )
...
* benchmark performance test
* adding hooks for performance test
* using hooks to measure time of Lateupdate
moving code to setup and teardown
2020-04-06 09:49:46 +02:00
Chris Langsenkamp
532555bbea
Put methods in call order
2020-04-04 12:03:08 -04:00
James Frowen
34415fe876
performance test for ULocalConnection ( #1655 )
2020-04-04 15:03:05 +02:00
James Frowen
3219fd4b51
performance test for NetworkWriter ( #1654 )
2020-04-04 15:02:48 +02:00
James Frowen
0157f9d909
adding performance test asmdef ( #1653 )
...
* adding performance test asmdef
* adding performance tests to packages
* fixing asmdef to work with 2018 and 2019
2020-04-04 14:21:53 +02:00
Paul Pacheco
84b2c8cf26
perf: Use continuewith to queue up ssl messages ( #1640 )
...
get rid of the complicated queue. Use Task.continuewith
also, apparently we have to flush or latency is really bad.
2020-04-03 07:24:07 -05:00
James Frowen
2ef8404f82
adding Category to weaver and Telepathy tests ( #1643 )
2020-04-02 18:50:42 +02:00
James Frowen
456fde07bc
removing cahced field ( #1641 )
2020-04-02 18:49:38 +02:00
James Frowen
4d5cee893d
perf: Adding buffer for local connection ( #1621 )
...
* Using writer for local connection
LocalConnectionBuffer
* removing assert
* fixing error and cleaning up code
* removing old queue
* tests for LocalConnectionBuffer
* removing field
* removing extra lines
* Update LocalConnections.cs
removing empty line
* adding comment for packet count
2020-04-02 18:49:09 +02:00
Chris Langsenkamp
caccebaa17
Updated example prefabs
2020-04-02 01:11:11 -04:00
Chris Langsenkamp
a6f98b09cf
Updated NetworkManager Script Template
2020-04-01 23:49:47 -04:00
Paul Pacheco
6591539c31
Remove unused local variable
2020-04-01 12:02:44 -05:00
Chris Langsenkamp
e420dcb6b6
Fixed comment in template
2020-04-01 05:33:16 -04:00
MrGadget
d2a58a4c25
fix: Destroyed NetMan due to singleton collision must not continue. ( #1636 )
...
* fix: Destroyed NetMan due to singleton collision must not continue.
* Added comment
* Added Comment
2020-04-01 11:29:35 +02:00
Paul Pacheco
f2ccb59ae6
feat: logging api ( #1611 )
...
* feat: logging api
Provide a ILogger (from unity framework) per class
it can track loggers per class and use Debug.unityLogger by default
* Logger field should never change
* Support loggers for static classes
Unfortunately we can't have generics with static classes.
Thus we can keep the loggers in a Dictionary instead indexed by name
if you need a logger for a static class, you can just do:
private static readonly ILogger logger = LogFactory.GetLogger(nameof(MyClass));
* Remove unused using
* Better tests by providing a mock handler
2020-04-01 11:27:51 +02:00
James Frowen
4fea1ee9b3
making singleton private set ( #1635 )
2020-04-01 01:11:45 +02:00
James Frowen
8087d3da7d
explicit type preference ( #1634 )
2020-03-31 22:57:47 +02:00
James Frowen
2617d65ad1
removing unnecessary this ( #1633 )
2020-03-31 22:57:27 +02:00
James Frowen
1e326ce6fe
removing unnecessary casts ( #1632 )
2020-03-31 22:56:54 +02:00
James Frowen
7dde2f80fe
removing and sort using ( #1631 )
2020-03-31 22:56:30 +02:00
James Frowen
f19e2d3aac
more formatting ( #1630 )
2020-03-31 22:55:58 +02:00
James Frowen
c6501aab06
formatting ( #1629 )
2020-03-31 12:15:30 -05:00
Chris Langsenkamp
7f208ffba9
Updated Comments
2020-03-30 22:28:59 -04:00
James Frowen
1ae038172a
perf: faster NetworkReader pooling ( #1623 )
...
* replacing stack with array for NetworkReaderPool
* Reader tests
2020-03-30 17:08:21 +02:00
James Frowen
f9335bb5f3
Finding WeaverAssembler path before running tests ( #1608 )
...
* Finding WeaverAssembler path before running tests
* using nameof
2020-03-30 14:45:36 +02:00
James Frowen
dcb618bfd6
fixing MissingReferenceException ( #1624 )
2020-03-29 21:39:18 -04:00
Paul Pacheco
deb286f0c2
refactor: simplify getting hook method
2020-03-29 14:25:07 -05:00
Paul Pacheco
518233cd7e
This is always true
2020-03-29 14:11:54 -05:00
Paul Pacheco
69fdbea892
Unused using
2020-03-29 14:11:54 -05:00
James Frowen
da2e61b30a
doc comments ( #1622 )
2020-03-29 11:41:21 -05:00
vis2k
254a49496f
NetworkWriterPool: add performance comment
2020-03-29 17:33:03 +02:00
vis2k
d865dddb4e
10k demo: deterministic health updates
2020-03-29 17:29:11 +02:00
James Frowen
4fa43a9471
perf: faster NetworkWriter pooling ( #1620 )
...
* using array in NetworkWriterPool instead of stack
* Using property
adding debug warning if pool is full
* adding tests for NetworkWriterPool
* Update NetworkWriterPool.cs
* Update NetworkWriterPoolTest.cs
Co-authored-by: vis2k <info@noobtuts.com>
2020-03-29 17:16:16 +02:00
Paul Pacheco
e96b687563
Revert "perf: faster NetworkWriter pooling ( #1616 )"
...
This reverts commit 5128b122fe
.
2020-03-28 19:04:06 -05:00
Paul Pacheco
96e690ef9c
Revert "Explain why 10"
...
This reverts commit e8cdb7569d
.
2020-03-28 19:03:53 -05:00
Paul Pacheco
e8cdb7569d
Explain why 10
2020-03-28 18:14:48 -05:00
James Frowen
e12f33d306
fixing MissingReferenceException ( #1619 )
2020-03-28 15:00:48 -04:00
James Frowen
5128b122fe
perf: faster NetworkWriter pooling ( #1616 )
...
Stack turned out to be slow way to pool NetworkWriters.
Replace them with an array
see #1614
2020-03-28 12:58:00 -05:00
Paul Pacheco
61163cacb4
perf: replace isValueType with faster alternative ( #1617 )
...
According to vis benchmark here https://github.com/vis2k/Mirror/issues/1614#issuecomment-605443808
isValueType is an expensive operation.
This microoptimization replaces isValueType for a faster (not so readable) alternative
2020-03-28 12:27:42 -05:00
Paul Pacheco
166b8c9467
perf: use byte[] directly instead of MemoryStream ( #1618 )
...
* perf: use byte[] directly instead of MemoryStream
* Optimize writing int32 and int64
* Update Assets/Mirror/Runtime/NetworkWriter.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Update Assets/Mirror/Runtime/NetworkWriter.cs
Co-Authored-By: vis2k <info@noobtuts.com>
* Update Assets/Mirror/Runtime/NetworkWriter.cs
* Start with bigger buffer
* Woops, should have double checked suggestion
* Removed invalid Test
We should not require NetworkWriter to behave in certain way when Position
is set to out of bounds.
That is an invalid use of NetworkWriter, so NW should be free to do any behavior
* smells
* Update NetworkWriter.cs
Co-authored-by: vis2k <info@noobtuts.com>
2020-03-28 18:17:53 +01:00
vis2k
a4bd6e7e66
Examples: added 10k monsters benchmark ( #1615 )
...
* scene and 1bit from kenney
* tilemap
* slice sprites
* name some
* create empty tile
* 2d cam
* monster prefab
* 100 monsters
* monster netid
* rename
* zoom cam, 10k monsters
* resave scene for sceneids
* Monster script
* add transparent textures for monsters
* replace monster sprite with transparent
* scripts
* mvoed into benchmarks folder
* player sprite
* tilemap background
* player prefab
* health update
2020-03-28 13:03:19 +01:00
Paul Pacheco
3fb7559561
remove redundant code block
2020-03-27 17:25:33 -05:00
Paul Pacheco
f56471085f
Fix typos in tests
2020-03-27 17:21:24 -05:00
Paul Pacheco
10813cb9eb
Reduce cognitive complexity of GenerateClassOrStructReadFunction
2020-03-27 17:14:39 -05:00
Paul Pacheco
ef80575787
Remove redundant code block
2020-03-27 17:06:59 -05:00
Paul Pacheco
6587c1f7b9
Better comment
2020-03-27 17:03:40 -05:00
Paul Pacheco
1f8b27e927
Remove unused using
2020-03-27 17:02:59 -05:00
Lymdun
5d76afbe29
perf: Remove redundant mask ( #1604 )
2020-03-27 11:34:56 +01:00
Paul Pacheco
dbe1365329
fix naming convention
2020-03-26 23:15:09 -05:00
Paul Pacheco
1d4eed77ed
Simplify getting methods
2020-03-26 19:28:17 -05:00
James Frowen
c6023c8275
unit test for IsActiveScene ( #1597 )
2020-03-27 00:22:46 +01:00
Paul Pacheco
c1cfc42181
perf: simplify and speed up getting methods in weaver
2020-03-26 17:35:15 -05:00
Paul Pacheco
ebc817028b
reduce cognitive complexity of CheckForHookFunction
2020-03-26 17:35:15 -05:00
Paul Pacheco
c6e8717909
simplify getting attribute fields
2020-03-26 17:35:15 -05:00
Chris Langsenkamp
5146e95fe0
Udpated scene file
2020-03-26 18:15:44 -04:00