Commit Graph

3992 Commits

Author SHA1 Message Date
James Frowen
8e545ac468
fix: fixing cloud scripts not pinging api (#2097)
* adding logs to api updater

* fixing cloud api
2020-07-15 16:07:39 +01:00
uwee
e4cc85c413
fix: Misc code smells (#2094)
* fix: code smell - condensed if statement

* fix: code smell - dont throw generic Exception
2020-07-14 18:44:52 +02:00
uwee
12827f65a9
fix: add NetworkManager.StartClientUri test (#2095) 2020-07-14 18:44:28 +02:00
James Frowen
984eb73ea4
fix: register prefab error with same guid (#2092)
* tests for when newassetId is same as current

* stopping error if ids are the same

* invert if and adding comment
2020-07-13 19:40:11 +01:00
Paul Pacheco
a219ff2059
encapsulate method substitute naming (#2091)
* encapsulate method substitute naming

* This const is not used anywhere else,  make it private

Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
2020-07-13 13:25:54 +01:00
James Frowen
18d695744f
fix: renaming call/invoke prefix for SyncEvent (#2089)
* renaming sync event

same reason as #2088

* removing un-used const
2020-07-13 06:29:24 -05:00
James Frowen
64f663fb5e
adding prefix to call command and rpc (#2088)
now that Cmd is not required "Call..." might collide with user functions
2020-07-13 05:49:27 -05:00
James Frowen
f1698e658c
removing code that isnt needed (#2090)
we use the original method name so we do not need to remove the prefix
2020-07-13 04:44:51 -05:00
James Frowen
ef47ee7a57
feat: Rigidbody example (#2076)
* adding example for NetworkRigidbody

* adding hud

* adding empty player so that scene objects spawn

* turning off debug logs
2020-07-13 01:04:51 +01:00
Paul Pacheco
ed40c2d210
feat: Sync Events no longer need Event prefix (#2087)
Instead of doing
```cs
[SyncEvent]
public event MySyncEventDelegate EventOnly;
```

You can now do
```cs
[SyncEvent]
public event MySyncEventDelegate Only;
```

We actually tried to remove them a while ago. The way the weaver worked
back then caused an infinite recursion.

Since the Command rewrite that allows virtuals, this is no longer
a problem.  So we can drop this requirement.

Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
2020-07-12 17:27:44 -05:00
Paul Pacheco
eb93c34b33
feat: ClientRpc no longer need Rpc prefix (#2086)
Instead of doing
```cs
[ClientRpc]
public void RpcPepe() {}
```

You can now do
```cs
[ClientRpc]
public void Pepe() {}
```

We actually tried to remove them a while ago. The way the weaver worked
back then caused an infinite recursion.

Since the Command rewrite that allows virtuals, this is no longer
a problem.  So we can drop this requirement.

Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
2020-07-12 16:50:01 -05:00
Paul Pacheco
d89ac9fb05
feat: TargetRpc no longer need Target prefix (#2085)
Instead of doing
```cs
[TargetRpc]
public void TargetPepe() {}
```

You can now do
```cs
[TargetRpc]
public void Pepe() {}
```

We actually tried to remove them a while ago. The way the weaver worked
back then caused an infinite recursion.

Since the Command rewrite that allows virtuals, this is no longer
a problem.  So we can drop this requirement.

Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
2020-07-12 16:49:45 -05:00
Paul Pacheco
b6d1d09f84
feat: Commands no longer need Cmd prefix (#2084)
Instead of doing
```cs
[Command]
public void CmdPepe() {}
```

You can now do
```cs
[Command]
public void Pepe() {}
```

We actually tried to remove them a while ago. The way the weaver worked
back then caused an infinite recursion.

Since the Command rewrite that allows virtuals, this is no longer
a problem.  So we can drop this requirement.

Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
2020-07-12 16:49:35 -05:00
James Frowen
110e8f162a
increasing max fails to 15, and ping interval to 20 (#2081)
ping will only stop if can not get success from cloud for 5 mins
2020-07-09 23:30:58 +01:00
James Frowen
f717945525
fix: not removing server if id is empty (#2078)
* logging error message

* not removing server if ID is empty
2020-07-07 21:20:08 +01:00
Walter Geisler
47740f0a46
Refactor TimeoutAuthenticator to pass through client/server start callbacks (#2074)
* Update TimeoutAuthenticator.cs

* Moved listener passthrough back to Awake()

* Remove white space above Awake()

* Remove all white space above awake
2020-07-06 16:06:37 +01:00
James Frowen
0506ad5ea1
fixing cloud tank example (#2069) 2020-07-06 09:37:30 +01:00
James Frowen
e7ca6eb7ef
tests for struct message with empty function (#2067) 2020-07-05 01:04:33 +01:00
James Frowen
3418fa2106
fix: Message base class not being Serialized if processed in the wrong order (#2023)
* finding all fields

* adding test for message with base

* undoing FindAllPublicFields

* adding tests for Inheritance with define order

* making sure that messages are processed in order

do not need to check if message has already been processed becuase
OnSerialize is only added/changed if it is missing or empty

* removing un-needed comments

* using recursion instead of loops

* remove white space
2020-07-05 01:04:14 +01:00
Paul Pacheco
264f9b8f94
perf: Use invokeRepeating instead of Update (#2066)
* perf: Use invokeRepeating instead of Update

If you have low frequency calls, InvokeRepeating is a lot faster than
Update().  Use InvokeRepeating for NetworkProximityChecker

* Fix indentation

Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
2020-07-04 13:41:16 -05:00
Paul Pacheco
d9442911ff
ci: if docs have errors, fail the PR (#2065)
Co-authored-by: Paul Pacheco <paul.pacheco@aa.com>
2020-07-04 13:49:02 +02:00
James Frowen
a69880a65b
Update LiteNetLib4Mirror.md 2020-07-04 00:39:14 +01:00
James Frowen
ed366c53a7
Update toc.yml 2020-07-04 00:31:01 +01:00
James Frowen
3c100740ab
Update ChangeLog.md 2020-07-03 23:59:18 +01:00
James Frowen
ebe4d2c5c8
Update NetworkDiscovery.md 2020-07-03 23:56:37 +01:00
James Frowen
99d1b6d860
Update index.md 2020-07-03 23:19:06 +01:00
James Frowen
3e54a970c3
Update index.md 2020-07-03 23:18:24 +01:00
James Frowen
dabea79699
Update index.md 2020-07-03 23:17:04 +01:00
James Frowen
c4f071336a
Update index.md
Updating transport list
2020-07-03 23:15:45 +01:00
James Frowen
076203e967
Update NetworkDiscovery.md 2020-07-03 23:09:40 +01:00
James Frowen
de2882cb97
Update ChangeLog.md
Discord transport was removed, removing link to old page
2020-07-03 23:08:31 +01:00
James Frowen
7bab3b9d7c
Update Deprecations.md 2020-07-03 23:02:20 +01:00
James Frowen
999c8b1c32
fixing doc comment 2020-07-03 22:53:30 +01:00
James Frowen
57bc80c9cd
adding clientAuthority to commands (#2064) 2020-07-03 16:31:42 +01:00
James Frowen
c278c004f6
updating readme for cloud list server (#2058) 2020-07-01 16:20:24 +01:00
James Frowen
b316b35d46
fix: weaver now processes multiple SyncEvent per class (#2055)
* weaver test for mutlitple events

* tests for multiple sync events in 1 class

* removing break so that multiple events will be proccessed

It seems like this break was here because unet used foreach CustomAttributes
but mirror uses GetCustomAttribute
2020-06-30 09:59:18 +02:00
James Frowen
c91308fb04
fix: sync events can not have the same name if they are in different classes (#2054)
* test for sync event with same name

* using full name instead of name

* fix test
2020-06-30 09:58:50 +02:00
James Frowen
d0bb9d57b0
sending if syncInterval is greater or equal to 0 (#2053) 2020-06-30 09:56:13 +02:00
James Frowen
af230ce988
docs: fixing order and table of contents (#2052)
* fixing order

* adding to table of contents
2020-06-29 00:52:23 +01:00
MaZy
4ffff192a6
fix: If socket is undefined it will return false. See #1486 (#2017) 2020-06-28 18:10:17 -05:00
James Frowen
61d44b2d80
fix: Fallback and Multiplex now disable their transports when they are disabled (#2048)
* test to check if fallbacks disables other transport

* using ondisable to disable other transport

* fixing teardown

* adding test for Multiplex

* using ondisable to disable other transport

* fixing NSubstitute for 2019
2020-06-28 23:49:36 +01:00
James Frowen
ab1b92f74b
fix: addingNetwork rigidbody icon and AddComponentMenu attribute (#2051)
* adding icon

* adding attributes

* adding docs

* adding disclaimer at top of doc
2020-06-28 23:47:50 +01:00
James Frowen
0c30d3398a
fix: Network rigidbody fixes (#2050)
* using syncInterval for client auth

* only set sync var if change is greater than Sensitivity

* fixing client auth sync

* using currentVelocity
2020-06-28 23:46:43 +01:00
James Frowen
25285b1574
feat: Experimental NetworkRigidbody (#1822)
* NetworkRigidBody
2020-06-27 00:38:50 +01:00
Kyle
ba29119aa1
Missed one internal call that the NetworkManager uses (#2044) 2020-06-27 00:35:58 +01:00
Eunseop Shim
350ce47db3
Implement IReadOnlyDictionary for SyncDictionaries (#2032) 2020-06-26 13:21:54 +02:00
Kyle
d06ee6a21d
Kr/issue 2039 (#2040)
* Update NetworkClient.cs

* Update NetworkServer.cs

* Missed a call
2020-06-26 13:18:56 +02:00
James Frowen
78bd284b6f
fixing null ref (#2043) 2020-06-26 09:47:49 +01:00
James Frowen
9468278c73
adding cloud to api docs (#2038) 2020-06-26 01:00:08 +01:00
James Frowen
e36449cb22
fix: changing namespace to match folder name (#2037)
* updating namespace

* updating example name spaces
2020-06-25 16:13:47 +01:00