* Fixed OnStopClient not being called on Client Side
* Moved identity.OnStopClient() two scopes above
Co-authored-by: Emre Bugday <47198270+EmreB99@users.noreply.github.com>
* feat: Use SyncLists directly
Previously, you had to write an intermediary class to use synclists, syncsets and syncdictionaries.
The weaver would populate that intermediary class with a serialization and deserialization method
This PR gets rid of 90% of the weaver code for synclists.
There is no need to generate these methods anymore.
Instead the lists use `writer.Write<T>` and `read.read<T>` to serialize their Data.
Since there is no code generate in synclists, you can now use the synclists directly instead
of subclassing them.
BEFORE:
```cs
public class MyComponent : NetworkBehaviour {
// nonsense class to make the weaver happy
class SyncListData : Synclist<Data> {}
SyncListData mySyncList;
}
```
AFTER:
```cs
public class MyComponent : NetworkBehaviour {
Synclist<Data> mySyncList;
}
```
* linting
* feat: Use SyncLists directly (no overrides)
Previously, you had to write an intermediary class to use synclists and syncdictionaries.
The weaver would populate that intermediary class with a serialization and deserialization method
This PR gets rid of 90% of the weaver code for synclists.
There is no need to generate these methods anymore.
Instead the lists use `writer.Write<T>` and `read.read<T>` to serialize their Data.
Since there is no code generate in synclists, you can now use the synclists directly instead
of subclassing them.
Same as #2305 ,but it removes the deprecated Serialize and Deserialize methods from syncobjects,
This way you get a nice compiler error for the code that no longer works, instead of a warning you might accidentally ignore.
BEFORE:
```cs
public class MyComponent : NetworkBehaviour {
// nonsense class to make the weaver happy
class SyncListData : Synclist<Data> {}
SyncListData mySyncList;
}
```
AFTER:
```cs
public class MyComponent : NetworkBehaviour {
Synclist<Data> mySyncList;
}
```
BREAKING CHANGE: Serialize and Deserialize methods in synclists don't do anything anymore
* Remove old comment
* Fix compilatio error
Currently in mirror, there is no way for Mirror itself to invoke
readers and writers for types it does not know about.
This causes us to have to generate code for lists, dictionaries and messages.
This PR makes it so that if there is a reader and writer anywhere in the
code for type X, then the writer can be invoked like this:
```cs
X x = ...;
writer.Write<X>(x);
```
and the reader can be invoked like this:
```cs
X x = reader.Read<X>();
```