* WIP first draft
* Much closer now
* Whoop! There it is!
* Added comment
* Restore Player
* Moved WeaveFailed back where it was
* Restore delegate wireup
* Moved the delegate wireup and added comments
* Formatted comment and error message
* Added comment
* Use a separate session bool
* Code formatting
* Delete Mirror.Editor.asmdef
* Add Debug
* No WeaveExistingAssemblies
* Revert "No WeaveExistingAssemblies"
This reverts commit 50d4790ee4.
* Revert "Add Debug"
This reverts commit 185b403361.
* Revert "Delete Mirror.Editor.asmdef"
This reverts commit f7647cce3f.
* Update Assets/Mirror/Editor/Mirror.Editor.asmdef
* Update Assets/Mirror/Editor/Mirror.Editor.asmdef
* reverted changes to Mirror.Editor.asmdef
* Re-applied change to Mirror.Editor.asmdef
* commented Debug line
* feat: supports scriptable objects
Now you can pass scriptable objects in commands, rpcs and syncvars
For example:
```cs
class Weapon: ScriptableObject
{
public string name;
public string description;
public int damage;
...
}
class Player : NetworkBehaviour
{
[SyncVar]
Weapon equipped;
...
}
```
Scriptable objects will be created in the client using
ScriptableObject.CreateInstance. If users want something else
they can provide a custom serializer (that has not changed)
* fix: remove scriptableobject error Tests
The test that checks that scrscriptableobjects give error is no
longer valid
* fix#1475: isClient is true in OnDestroy on host/client mode again. Reverts commit d00c95bb55
* add comment
* ClientScene.InternalAddPlayer doesn't need to set isClient anymore
When the callback for SyncDictionary is called in the server
for set or add
it is getting called before the syncdictionary is updated.
In the client this happens after.
Example:
```cs
public void OnScoreUpdatedCallback(ScoreSyncDict.Operation op, uint ident, int score)
{
if (op == ScoreSyncDict.Operation.OP_SET)
Debug.Log($"The value in the dictionary is {scoreDict[ident]}");
}
```
In host mode this prints the previous value. In client mode this prints the current value. This PR fixes this problem and makes both print the current value