docs: sync event obsolete (#2216)

* adding note to guides about removed SyncEvent

* updating Obsolete

making Obsolete error whe used
updating text to say it has been removed
linking to issue

* adding Obsolete note to other references to SyncEvent
This commit is contained in:
James Frowen 2020-09-04 16:29:46 +01:00 committed by GitHub
parent e67cef6666
commit eac69ab5f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 7 deletions

View File

@ -48,8 +48,11 @@ public class TargetRpcAttribute : Attribute
/// <summary>
/// SyncEvents are networked events like ClientRpc's, but instead of calling a function on the game object, they trigger Events instead.
/// <para>
/// **IMPORTANT** SyncEvents have been removed in version 18.0.0, see this [Issue](https://github.com/vis2k/Mirror/pull/2178) for more information
/// </para>
/// </summary>
[Obsolete("[SyncEvent] will be removed soon. Use ClientRpc/TargetRpc instead. SyncEvent was a leftover from the UNET days, nobody ever uses or understands it. We will remove it because it requires significant Weaver overhead to maintain.")]
[Obsolete("[SyncEvent] has been removed. Use ClientRpc/TargetRpc instead. See https://github.com/vis2k/Mirror/pull/2178", true)]
[AttributeUsage(AttributeTargets.Event)]
public class SyncEventAttribute : Attribute
{

View File

@ -37,5 +37,6 @@ These attributes can be used for Unity game loop methods like Start or Update, a
- Game object with a NetworkIdentity component attached.
- **SyncVar**
[SyncVars](Sync/SyncVars.md) are used to synchronize a variable from the server to all clients automatically. Don't assign them from a client, it's pointless. Don't let them be null, you will get errors. You can use int, long, float, string, Vector3 etc. (all simple types) and NetworkIdentity and game object if the game object has a NetworkIdentity attached to it. You can use [hooks](Sync/SyncVarHook.md).
- **SyncEvent**
- **SyncEvent (Obsolete)**
[SyncEvent](Sync/SyncEvent.md) are networked events like ClientRpc's, but instead of calling a function on the game object, they trigger Events instead.
**IMPORTANT:** removed in version 18.0.0, see this [Issue](https://github.com/vis2k/Mirror/pull/2178) for more information.

View File

@ -106,7 +106,9 @@ To define a Client RPC call in your code, you must write a function which:
See [Communications](Communications/index.md) and related sections for more information.
## Networked Events
## Networked Events (Obsolete)
> **IMPORTANT** SyncEvents have been removed in version 18.0.0, see this [Issue](https://github.com/vis2k/Mirror/pull/2178) for more information
Networked events are like Client RPC calls, but instead of calling a function on the game object, they trigger Events instead.

View File

@ -1,4 +1,6 @@
# SyncEvent
# SyncEvent (Obsolete)
> **IMPORTANT** SyncEvents have been removed in version 18.0.0, see this [Issue](https://github.com/vis2k/Mirror/pull/2178) for more information
This is an attribute that can be put on events in NetworkBehaviour classes to allow them to be invoked on client when the event is called on the server.

View File

@ -7,8 +7,9 @@ State synchronization is done from the Server to remote clients. The local clien
Data is not synchronized in the opposite direction - from remote clients to the server. To do this, you need to use Commands.
- [SyncVars](SyncVars.md)
SyncVars are variables of scripts that inherit from NetworkBehaviour, which are synchronized from the server to clients.
- [SyncEvents](SyncEvent.md)
SyncEvents are networked events like ClientRpcs, but instead of calling a function on the game object, they trigger Events instead.
- [SyncEvents (Obsolete)](SyncEvent.md)
SyncEvents are networked events like ClientRpcs, but instead of calling a function on the game object, they trigger Events instead.
**IMPORTANT:** removed in version 18.0.0, see this [Issue](https://github.com/vis2k/Mirror/pull/2178) for more information.
- [SyncLists](SyncLists.md)
SyncLists contain lists of values and synchronize data from servers to clients.
- [SyncDictionary](SyncDictionary.md)

View File

@ -39,7 +39,7 @@ We've developed a [List Server](https://mirror-networking.com/list-server/) wher
- Network [Proximity Checker](Components/NetworkProximityChecker.md) to help with Area of Interest
- Network [Scene Checker](Components/NetworkSceneChecker.md) to islolate players and networked objects to Additive scene instances
- Network [Match Checker](Components/NetworkMatchChecker.md) to islolate players and networked objects by [Network Visibility](Guides/Visibility.md)
- [SyncVar](Guides/Sync/SyncVars.md), [SyncList](Guides/Sync/SyncLists.md), [SyncEvent](Guides/Sync/SyncEvent.md), [SyncDictionary](Guides/Sync/SyncDictionary.md), and [SyncHashSet](Guides/Sync/SyncHashSet.md)
- [SyncVar](Guides/Sync/SyncVars.md), [SyncList](Guides/Sync/SyncLists.md), [SyncDictionary](Guides/Sync/SyncDictionary.md), and [SyncHashSet](Guides/Sync/SyncHashSet.md)
**Integrations**
- [Dissonance Voice Chat](https://assetstore.unity.com/packages/tools/audio/dissonance-voice-chat-70078)