Zac North
c78120eca2
Don't delete the PDB, what were they thinking?
2019-04-02 14:28:56 -04:00
vis2k
8dc0c73d77
Merge pull request #695 from MrGadget1024/Additive-Scene-Example
...
Additive Scenes Example
2019-04-02 17:08:28 +02:00
vis2k
e1b4b181c4
NetworkIdentity.RebuildObservers: change "Observer is not ready for: ..." warning to debug log, because it would constantly be spammed if a connection disconnects and we keep the player in the game for a while before disconnecting. E.g. if NetworkManager.OnServerDestroy delays the disconnect to avoid a player from fleeing combat.
2019-04-02 12:24:36 +02:00
vis2k
9c8211e573
NetworkServer.OnDisconnected: remove "Player not destroyed when connection disconnected." warning. This warning would be shown if a NetworkManager's OnServerDisconnect function wouldn't remove the player immediately, which is completely normal in most online games where the server delays a disconnect if the player was recently in combat - which would then show this warning every single time. OnServerDisconnect removes the player controller anyway, so there is no need for this warning at all.
2019-04-02 12:11:26 +02:00
Paul Pacheco
c58cf884d4
test: Test that setting syncvar sets dirty bits
2019-04-02 03:45:29 -05:00
Paul Pacheco
2ca80e1a90
refactor: move property site processor into a separate class
2019-04-02 03:16:50 -05:00
Paul Pacheco
ac697a454b
style: C#7 syntax
2019-04-02 02:32:29 -05:00
Paul Pacheco
312c0fcf5d
style: C# 7 code style
2019-04-02 02:27:11 -05:00
Paul Pacheco
9d54bf7bb1
style: naming convention
2019-04-02 02:26:01 -05:00
Chris Langsenkamp
297b671766
Renamed script to AdditiveNetworkManager
2019-04-01 19:18:15 -04:00
Chris Langsenkamp
2c0fa42568
Made Lobby player controller more similar to Additive player controller, per request.
2019-04-01 13:55:34 -04:00
Chris Langsenkamp
dc8f9b462a
Code changes as requested
2019-04-01 13:54:15 -04:00
vis2k
ab44ac8f8b
fix : #692 by always adding connectionToClient when rebuilding observers
2019-04-01 17:19:47 +02:00
vis2k
8f3c8edd86
RebuildObservers: add comments
2019-04-01 17:09:11 +02:00
vis2k
512e904ec0
RebuildObservers: order hashset syntax more logically
2019-04-01 17:01:44 +02:00
Chris Langsenkamp
32d6c19e5f
Initial Publish
2019-03-31 22:07:37 -04:00
Paul Pacheco
ee9c737bda
feat: allow users to detect mirror version 3
2019-03-31 13:27:03 -05:00
Paul Pacheco
e75d4b29dd
style: remove redundant methods
2019-03-31 11:30:30 -05:00
vis2k
b876e256eb
Merge pull request #689 from paulpach/zigzag
...
perf: Implement zigzag algorithm so negatives pack efficiently
2019-03-31 14:25:35 +02:00
Paul Pacheco
5f1ef4ab1f
perf: Pack small 64 bit negatives efficiently
2019-03-31 07:16:57 -05:00
Paul Pacheco
480af1aa6c
perf: Pack small 32 bit negatives efficiently
2019-03-31 07:16:51 -05:00
rodolphito
f5d80175fe
Fixed a typo in NetworkServer ( #691 )
2019-03-30 16:01:12 -05:00
rodolphito
2db7576bbc
perf: Use WritePackedUInt32 in SyncList ( #688 )
2019-03-30 12:33:16 -05:00
Paul Pacheco
3ec7f6c1d0
style: remove redundant field initialization
2019-03-30 12:21:37 -05:00
Paul Pacheco
d12c4b80ca
style: constructor of abstract class should be protected
2019-03-30 12:20:02 -05:00
rodolphito
594e8c9d89
Syncdict style ( #687 )
...
* Renamed m_Objects to objects
* Renamed Changes to changes
2019-03-30 12:16:35 -05:00
rodolphito
f61b757b8a
Synclist style ( #686 )
...
* Rename m_Objects to objects
* Rename Changes to changes
* Empty braces
* use default shorthand
* Use expression body getter
2019-03-30 12:09:37 -05:00
Paul Pacheco
bd304ab90b
style: follow C# code style conventions
2019-03-30 12:06:39 -05:00
Paul Pacheco
695979e914
feat: Add SyncHashSet and SyncSortedSet ( #685 )
...
* feat: Add SyncHashSet and SyncSorted set
2019-03-30 11:51:06 -05:00
Paul Pacheco
a8599c1af2
feat: Show compile time error if overriding unused OnServerAddPlayer ( #682 )
...
* remove obsolete OnServerAddPlayer
BREAKING CHANGE: Remove obsolete OnServerAddPlayer
Any person that overrides this method has a broken game. These methods are never called anywhere.
The user gets a warning because they are overriding an obsolete method, which might get ignored if they have lots of other warnings. They would run their game and their game would not work at all. No errors.
By removing these methods, users that override these methods will get a compile time error instead. So they cannot ignore this error and they will fix it.
* Method is no longer available in NetworkLobbyManager
2019-03-28 11:36:13 +01:00
Paul Pacheco
8dea50ed18
fix: call Obsoleted OnStartClient ( #681 )
2019-03-27 18:13:59 -05:00
MichalPetryka
468ec80dbb
Remove useless method ( #680 )
2019-03-27 17:23:37 -05:00
rodolphito
375303297c
Removed internal access modifier. ( #675 )
...
good catch, this should be private
2019-03-27 17:22:21 -05:00
rodolphito
40d2ec54e5
This method seems pretty redundant, could just be called directly. ( #677 )
2019-03-27 13:06:42 -05:00
MrGadget
49f39f9c09
Updated Obsolete comment and code to remove singleton ( #661 )
...
* Updated Obsolete comment and code to remove singleton
* Update NetworkClient.cs
* Update NetworkClient.cs
* Update NetworkClient.cs
2019-03-27 15:13:25 +01:00
rodolphito
1feff9d749
Removed useless comment. ( #676 )
2019-03-27 13:56:59 +01:00
rodolphito
6edfd3ddf1
Removed more internals. ( #673 )
2019-03-27 13:37:12 +01:00
rodolphito
ba298c74b0
Style guidelines say these are bad. ( #672 )
2019-03-27 13:20:36 +01:00
rodolphito
57066a6003
These can be private. ( #669 )
2019-03-27 13:13:27 +01:00
rodolphito
4897edd76a
More internal access modifier removals ( #671 )
2019-03-27 13:13:11 +01:00
rodolphito
9be7426efa
Remove s_ prefix because the entire class is static, the prefix doesnt actually specify anything. ( #668 )
2019-03-27 12:04:07 +01:00
rodolphito
86c1942310
Remove s_ prefix because the entire class is static, the prefix doesnt actually specify anything. ( #667 )
2019-03-27 12:03:37 +01:00
rodolphito
595039865f
Removed duplicated address storage. ( #664 )
...
* Removed duplicated address storage.
* Removed the obsoletion as per vis' request.
2019-03-27 10:27:41 +01:00
rodolphito
c289ffb440
Remove proxy methods for setting playerController. ( #665 )
...
* Deprecate proxy methods for setting playerController.
* shortened obsoleted methods.
* This isnt actually public facing, its internal. Obsoletion is unnecessary, plain removal is ok.
2019-03-27 10:26:45 +01:00
uwee
f4cdfbf952
Remove IsClientConnected ( #663 )
...
* remove IsClientConnected
no longer needed now that NetworkClient is static
* removed in other scripts also
* marked as obsolete
2019-03-27 09:15:03 +01:00
MrGadget
d7306986b6
Updated Lobby Example Scenes Lighting ( #662 )
2019-03-26 17:49:56 +01:00
MrGadget
d2868646fa
SyncVar Updates ( #660 )
...
* Change SyncVar hooks to use `nameof`
I intentionally left the test for missing hook as a literal string because it won't compile otherwise.
* Removed unnecessary property value set from hook
2019-03-26 15:40:28 +01:00
uwee
68f63b5f69
bool InActiveScene not referenced in any script? ( #656 )
...
* code is not referenced in any script?
* fully remove code
2019-03-26 13:58:05 +01:00
Paul Pacheco
2d63ee1318
fix: Set syncvar variables after calling the hook ( #659 )
...
Previously, during deserialize, Mirror either called the hook for a syncvar or it set the variable, but never both. So users had to set the variable inside the hook.
```cs
class Player : NetworkBehaviour {
[SyncVar(hook=nameof(OnVarChanged))]
public int myvar;
public void OnVarChanged(int newvalue) {
Debug.Log("Got new value " + newvalue);
Debug.Log("Old value is " + myvar);
// with this pull request the following line is no longer needed
// the weaver will do this after the hook finishes
// this.myvar = newvalue;
}
}
```
fix: Hook not working with NetworkIdentity or GameObjects
Deserializing NetworkIdentity or GameObjects was broken, it called the hook only if there was no hook, and it saved the variable only if there was a hook.
2019-03-26 07:15:25 -05:00
Paul Pacheco
4d74f555b1
Update Assets/Mirror/Runtime/NetworkClient.cs
...
Co-Authored-By: vis2k <info@noobtuts.com>
2019-03-26 12:16:57 +01:00
vis2k
1879f5ecdc
Add [Obsolete] for compatibility
2019-03-26 12:16:57 +01:00
vis2k
9bc1dc1e85
NetworkClient class made static
2019-03-26 12:16:57 +01:00
vis2k
912572d6fe
NetworkClient.ConnectLocalServer: use the same order as Connect
2019-03-26 12:16:57 +01:00
vis2k
7bc320d098
LocalClient class moved into NetworkClient
2019-03-26 12:16:57 +01:00
vis2k
31836c16d1
NetworkClient.RemoveTransportHandlers made static
2019-03-26 12:16:57 +01:00
vis2k
4dbaff8ac1
NetworkManager.StartClient/StartHost don't return NetworkClient anymore
2019-03-26 12:16:57 +01:00
vis2k
d1d006e6d7
NetworkClient.Connect made static
2019-03-26 12:16:57 +01:00
vis2k
080bf2eaf0
NetworkClient.InitializeTransportHandlers made static
2019-03-26 12:16:57 +01:00
vis2k
32ed62f82b
NetworkClient.OnError made static
2019-03-26 12:16:57 +01:00
vis2k
461ba0b036
NetworkClient.OnDisconnected made static
2019-03-26 12:16:57 +01:00
vis2k
60083ff72d
NetworkClient.OnDataReceived made static
2019-03-26 12:16:57 +01:00
vis2k
42bceb25d9
NetworkClient.OnConnected made static
2019-03-26 12:16:57 +01:00
vis2k
493bf7fa5f
NetworkClient.RegisterSystemHandlers made static
2019-03-26 12:16:57 +01:00
vis2k
bc6c2542f6
NetworkClient.UnregisterHandler made static
2019-03-26 12:16:57 +01:00
vis2k
9eac983872
. NetworkManager.RegisterClientMessages doesn't require NetworkClient parameter anymore
2019-03-26 12:16:57 +01:00
vis2k
712aecb452
NetworkClient.REgisterHandle made static
2019-03-26 12:16:57 +01:00
vis2k
ba00554e0c
NetworkClient.GetRTT made static
2019-03-26 12:16:57 +01:00
vis2k
4abc58b136
NetworkClient.Send(msgId, msg) made static
2019-03-26 12:16:57 +01:00
vis2k
cd56c6a6f7
NetworkTime.UpdateClient doesn't require NetworkClient anymore
2019-03-26 12:16:57 +01:00
vis2k
8c125d2fd3
NetworkClient.Send made static
2019-03-26 12:16:57 +01:00
vis2k
558e1d8754
NetworkClient.SetHandlers made static
2019-03-26 12:16:57 +01:00
vis2k
180d3f8cf4
NetworkClient.isConnected made static
2019-03-26 12:16:57 +01:00
vis2k
604c205025
NetworkClient.serverIp made static
2019-03-26 12:16:57 +01:00
vis2k
882a7d5ba8
NetworkClient.connection made static
2019-03-26 12:16:57 +01:00
vis2k
f351a8a6d4
NetworkClient.connectState made static
2019-03-26 12:16:57 +01:00
vis2k
006d5d3bc8
NetworkClient.handlers made static
2019-03-26 12:16:57 +01:00
rodolphito
3a8fa3f571
Remove internal access modifier. ( #658 )
2019-03-26 12:09:43 +01:00
rodolphito
a96417112d
Use ulong instead of uint to support up to 64 animator parameters. ( #655 )
...
* Use ulong instead of uint to support up to 64 animator parameters.
* Split onto new line as Paul asked
2019-03-26 07:57:51 +01:00
uwee
65eaba1fe0
fix : #651 GetSceneAt assumes default scene ( #654 )
...
Changed to GetActiveScene
2019-03-26 07:57:31 +01:00
Paul Pacheco
8c93f31b80
refactor: Load parameters right before function call
2019-03-25 23:13:52 -05:00
vis2k
ff909bf830
Telepathy license file included
2019-03-25 20:03:27 +01:00
vis2k
14807f6ef7
add comment
2019-03-25 16:20:17 +01:00
vis2k
13bb748603
fix: Revert "NetworkClient.Shutdown: call ClientScene.Shutdown, otherwise it's never called" - caused client's player to not be removed from scene after disconnecting
...
This reverts commit e1e7b3132e
.
2019-03-25 16:19:22 +01:00
rodolphito
d483901432
Use PackedUInt for dirty bits for bandwidth ( #649 )
2019-03-25 13:13:14 +01:00
uwee
4c7c97bf70
reset netId counter to 1 on NetworkServer.Shutdown ( #645 )
2019-03-25 05:37:28 -05:00
rodolphito
6120a8e082
Removed unused parameter from NetworkAnimator. ( #648 )
2019-03-25 08:07:45 +01:00
Paul Pacheco
e2a6ce9811
feat: Add weaver support for Vector2Int and Vector3Int ( #646 )
2019-03-24 16:04:13 -05:00
vis2k
7836433b4f
Local Connection's connectionId is now set to 0 inside of their constructors, instead of doing it in LocalClient
2019-03-24 21:16:55 +01:00
vis2k
5f7c4d48b4
NetworkServer.AddLocalClient renamed to SetLocalConnection because that's what it does. The connection is created in LocalClient now too, this way NetworkServer doesn't need to depend on LocalClient(!)
2019-03-24 21:15:05 +01:00
vis2k
829da79288
LocalClient.InternalConnectLocalServer sets connectionId to 0 directly instead of getting it from NetworkServer.AddLocalClient (which shows an error message if failed anyway)
2019-03-24 21:07:41 +01:00
vis2k
56c163d9cd
NetworkServer.RemoveLocalClient renamed to RemoveLocalConnection because NetworkServer only keeps a local connection, not a local client
2019-03-24 21:07:41 +01:00
uwee
6db11b298b
Add the name of the Message back to the debug
...
The random int representing the Message is less human readable.
2019-03-24 14:50:13 -05:00
vis2k
ca2c72aee8
NetworkServer.s_LocalConnection replaced with .localConnection private setter
2019-03-24 20:46:34 +01:00
Paul Pacheco
48674151f0
perf: don't varint bytes and shorts
2019-03-24 14:45:03 -05:00
vis2k
bdf12c85d0
fix : #640 InternalReplacePlayerForConnection calls SpawnObserversForConnection now too
2019-03-24 19:41:41 +01:00
vis2k
a2d6317642
fix : #573 NullReferenceException because destroyed NetworkIdentities were never removed from sceneIds dict
2019-03-24 19:28:25 +01:00
rodolphito
1e5fc3cde5
Made dirty bits not rely on NetworkWriter position manipulation hackery. ( #636 )
...
* Made dirty bits not rely on NetworkWriter position manipulation hackery.
* Renamed GetDirtyBits to NextDirtyBits, as discussed with Paul.
* Expanded one line ifs.
2019-03-24 12:43:39 -05:00
Paul Pacheco
a495f66fc1
refactor: configure frame rate in a virtual method ( #638 )
...
Moved frame rate configuration into a virtual method so that people can override it and we reduce StartServer complexity
Fixes #567
2019-03-24 08:58:11 -05:00
vis2k
2d492607c8
pong example: ball is only simulated on server now
2019-03-24 14:38:22 +01:00
vis2k
e521a20052
fix : #573 (part 2) NetworkManager detects additive scene loads and respawns objects on server/client again
2019-03-24 13:24:29 +01:00
vis2k
c1af84e6bf
fix : #573 (part 1) NetworkScenePostProcess handles NetworkIdentities of all scenes except DontDestroyOnLoad. this way it works for additively loaded scenes too.
2019-03-24 13:24:29 +01:00
vis2k
603dfa1fe9
don't use continue and improve comments
2019-03-24 13:24:29 +01:00
vis2k
051cd7cf66
add comment
2019-03-24 13:24:29 +01:00
vis2k
bce7c54fa1
NetworkScenePostProcess: only set inactive if this was actually a valid scene object
2019-03-24 13:24:29 +01:00
rodolphito
b3595d3f5d
Code simplification and optimization. ( #635 )
2019-03-24 10:47:14 +01:00
Zac North
7d21bded9a
feat(syncvar): Add SyncDictionary ( #602 )
...
* Added basic SyncDictionary support, no support for structs yet
* Fixed TryGetValue usage
* Removed extraneous hardcoded SyncDictionary type
* Added a couple basic tests, more coming
* Added 4 more tests
* Added two tests and SyncDictionary now bubbles item to Callback on Remove (both Remove cases)
* Added the remainder of tests
* Added basic documentation about SyncDictionaries on StateSync.md page
* Simplify test syntax
Co-Authored-By: Katori <znorth@gmail.com>
* Simplify test syntax
Co-Authored-By: Katori <znorth@gmail.com>
* Simplify test syntax
Co-Authored-By: Katori <znorth@gmail.com>
* Simplify test syntax
Co-Authored-By: Katori <znorth@gmail.com>
* Remove null-check when setting value directly (and updated expected test behaviour)
* fix: Provide default implementation for SyncDictionary serializers
* feat: Add Weaver support for syncdictionary
* Fix minor issue with Set code and made test use Weaved serialization instead of manual
* Added a new test for bare set (non-overwrite)
* Added another test for BareSetNull and cleaned up some tests
* Updated SyncDictionary documentation on StateSync.md
* Update docs with SyncDictionary info
* Update SyncDictionary docs wording
* docs: document the types and better example
* Add two SyncDictionary constructors
* Removed unnecessary initialization
* Style fixes
* - Merged many operation cases
- Fixed Contains method
- Added new test to test contains (and flag its earlier improper usage)
- Use PackedUInt32 instead of int for Changes and Counts
* - Simplify "default" syntax
- Use Rodol's remove method (faster)
- Don't use var
* Removed unnecessary newline, renamed <B, T> to <K, V> per vis2k, corrected wording of InvalidOperationException on ReadOnly AddOp
* Code simplification, style fixes, docs example style fixes, newly improved implementation for CopyTo that fails gracefully
2019-03-24 10:18:31 +01:00
rodolphito
fea46b801d
Remove NetworkAnimatorEditor and animator parameter mask. ( #633 )
2019-03-24 09:39:51 +01:00
vis2k
67d715fe74
fix: Telepathy updated to latest version: protect against allocation attacks via MaxMessageSize. Can be configured in the TelepathyTransport component now.
2019-03-23 20:34:48 +01:00
Zac North
b0af876221
fix(tests): Added missing SyncListByteValid test file ( #634 )
...
* Added missing SyncListByteValid test file (passing)
* Added a missing newline
2019-03-23 18:40:38 +01:00
MichalPetryka
1595fb07b1
PreprocessorDefine rework ( #626 )
...
perf: speed up preprocessor define
2019-03-23 06:59:35 -05:00
vis2k
1bf2f9ee56
Update List Server demo text
2019-03-23 12:51:39 +01:00
vis2k
4eb01da0c1
update welcome message
2019-03-22 17:19:05 +01:00
vis2k
fa04185fa8
remove empty line
2019-03-22 14:08:59 +01:00
vis2k
c194771084
ClientScene.DestroyAllClientObjects simplified: use .Values
2019-03-22 14:05:47 +01:00
vis2k
6e11429699
NetworkClient.Shutdown made static too. ShutdownAll made obsolete.
2019-03-22 13:56:43 +01:00
vis2k
1d94464023
NetworkClient.ShutdownAll calls .Shutdown
2019-03-22 13:54:20 +01:00
vis2k
e1e7b3132e
NetworkClient.Shutdown: call ClientScene.Shutdown, otherwise it's never called
2019-03-22 13:53:28 +01:00
vis2k
227b0a71d1
tanks example namespaces updated
2019-03-22 13:29:24 +01:00
vis2k
c5b4211ac7
list server examples namespace changed
2019-03-22 13:28:08 +01:00
vis2k
5c00577746
fix : #609 by spawning observers in NetworkServer.AddPlayerForConnection after setting the controller. There is no point in trying to spawn with a null controller in SetReady, because by definition no one can observer something that is null. ( #623 )
2019-03-22 12:50:35 +01:00
Paul Pacheco
b7e977a7a3
synclist code generator is now reusable ( #624 )
...
* refactor: Made serializer generation reusable
* refactor: SyncList code generator is reusable for other structs
2019-03-22 06:44:57 -05:00
vis2k
1d166c699a
add comment
2019-03-22 12:24:22 +01:00
vis2k
694185b756
NetworkServer.SpawnObserversForConnection helper function instead of doing it all in SetClientReady
2019-03-22 12:23:33 +01:00
vis2k
009943f368
remove outdated comment
2019-03-22 12:10:13 +01:00
vis2k
c3bd7d6e07
NetworkServer.SetClientReady: get rid of 'continue'
2019-03-22 12:09:22 +01:00
vis2k
400bb91821
NetworkServer.SetClientReady: remove unnecessary null check because we don't have one in the above foreach either, and we don't have them anywhere else for NetworkIdentity.spawned because OnDestroy removes objects from it before they become null. The only way to cause this would be by calling Destroy(GetComponent<NetworkIdentity>()) - which no one does, and if someone does it then it's fine to get an exception here.
2019-03-22 12:08:47 +01:00
vis2k
9567daedba
add comments
2019-03-22 12:06:13 +01:00
vis2k
b869e3af99
improve comment
2019-03-22 12:04:25 +01:00
vis2k
c176da7bc3
NetworkServer.SetClientReady: use if+else instead of if + early return
2019-03-22 12:00:16 +01:00
vis2k
0e8b442cad
add some ocmments
2019-03-22 11:59:12 +01:00
vis2k
f6a6440294
NetworkServer.SetClientReady: move isReady=true upwards
2019-03-22 11:57:27 +01:00
vis2k
47d5ee976e
remove unused variable
2019-03-22 11:53:42 +01:00
Paul Pacheco
6f19489721
feature(synclist): allow SyncList of primitive types ( #622 )
...
* feature(synclist): allow SyncList of primitive types
As it turns out this never really worked:
```cs
class SyncListByte : SyncList<byte> {};
```
You had to write your own serializeItem / deserialize item for native types.
This change lifts the restriction, now you can use a synclist of anything that mirror can serialize/deserialize
* fix: fix unit tests error messages
2019-03-22 05:51:20 -05:00
vis2k
aa5e5a104f
ClientScene.s_PendingOwnerNetIds converted to HashSet
2019-03-22 10:10:53 +01:00
vis2k
0d6b03989a
NetworkServer.InternalAddPlayerForConnection moved into AddPlayerForConnection because there is no reason to keep it in an internal method anymore, since NetworkServer is static now
2019-03-22 10:04:14 +01:00
vis2k
fb2131207c
NetworkServer.InternalAddPlayerForConnection: reuse 'identity' for log message
2019-03-22 10:03:00 +01:00
vis2k
4f53f37dc8
NetworkServer.InternalAddPlayerForConnection: rename playerGameObject parameter for consistency
2019-03-22 10:02:30 +01:00
vis2k
75e51513db
added the log message again too
2019-03-22 09:58:04 +01:00
vis2k
1a55c3d52d
NetworkManager: move OnServerAddPlayerInternal code into OnServerAddPlayer because it was really just the implementation for OnServerAddPlayer moved into another function
2019-03-22 09:53:21 +01:00
vis2k
4b4dd179cc
sort regular and obsolete OnServerAddPlayer functions
2019-03-22 09:51:27 +01:00
vis2k
a39954003a
NetworkManager.RegisterServerMessages for AddPlayerMessage uses OnServerAddPlayer directly instead of wrapping it with a OnServerAddPlayerMessageInternal function
2019-03-22 09:46:14 +01:00
vis2k
fa4efa6683
syntax
2019-03-21 18:12:34 +01:00
vis2k
155764cea8
simplify NetworkIdentity.RebuildObservers
2019-03-21 17:58:15 +01:00
vis2k
f90cdae3c6
fix #384 : duplicating scene objects at runtime is now detected and and error is shown. otherwise the user could instantiate scene objects at runtime, which would then send the sceneId to the client, then the client wouldn't know which of the multiple objects to use for the sceneId, resulting in things getting out of sync.
2019-03-21 11:46:55 +01:00
Zac North
c9eac57ce8
fix: OnClientReady is called and passed the appropriate ready state value in NetworkLobbyPlayer ( #618 )
2019-03-21 02:27:25 -05:00
Martin Evans
28b067d3cd
refactor: Generic IMessageBase
to allow struct message types ( #619 )
...
* - Added a `IMessageBase` as an interface to `MessageBase`. Existing messages which inherit `MessageBase` (including ones which do not implement Serialize/Deserialize and rely on the weaver) will continue to work in exactly the same way as before!
- Modified any methods which were generic `T where T : MessageBase` to be `T where T : IMessageBase`. this does not change things at all for all existing usages of the method.
These two changes allow end users to implement IMessageBase as a `struct` instead of `MessageBase` as a `class`, so they are no longer forced to allocate message objects in their own code.
* Update .gitignore
* Update Messages.cs
* Update MessageBaseTests.cs
* Update MessageBaseTests.cs
* Update MessageBaseTests.cs
2019-03-20 19:44:42 -05:00
Paul Pacheco
9d043182bf
feature: SyncList now support structs ( #614 )
...
Previously, if you wanted a synclist of structures, you would do: SyncListSTRUCT<MyStruct>
Now you can use SyncList<MyStruct>
SyncListSTRUCT is left there, but obsolete
2019-03-20 12:45:46 +01:00
vis2k
22640b5e62
Mirror List Server example ( #611 )
...
feature: Mirror List Server example
2019-03-20 09:38:53 +01:00
Anthony Eckert
00961ccc9c
feature: Add NoRotation to NetworkTransform ( #616 )
...
This allows you to leave rotation out of the NetworkTransform if you only need position.
Right now if you don't need sync rotation and set compression to Lots, it can move your object in ways not expected. This forces you to use no compression as a fix. Using more bandwidth for something you don't need. I think this is all that is needed, tested it in my game and it works.
2019-03-19 23:46:33 -05:00
Paul Pacheco
80bce0a626
refactor: rename SyncObjectProcessor -> SyncObjectInitializer
...
The name SyncObjectProcessor is confusing because it does not process syncobjects. Instead it initializes syncobjects in a NetworkBehaviour.
this avoids the confusion with SyncListStructProcessor, that does process synclists to add serialization methods
2019-03-19 08:26:03 -05:00