mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Scope sample classes
This commit is contained in:
parent
d0df3e8b90
commit
2ad16332f3
@ -86,7 +86,7 @@ public void SyncVarsSyncList()
|
|||||||
{
|
{
|
||||||
Assert.That(CompilationFinishedHook.WeaveFailed, Is.False);
|
Assert.That(CompilationFinishedHook.WeaveFailed, Is.False);
|
||||||
Assert.That(weaverErrors, Is.Empty);
|
Assert.That(weaverErrors, Is.Empty);
|
||||||
Assert.That(weaverWarnings, Contains.Item("Mirror.Weaver warning: MirrorTest.SyncObjImplementer MirrorTest.SyncVarsSyncList::syncobj has [SyncVar] attribute. SyncLists should not be marked with SyncVar"));
|
Assert.That(weaverWarnings, Contains.Item("Mirror.Weaver warning: MirrorTest.SyncVarsSyncList/SyncObjImplementer MirrorTest.SyncVarsSyncList::syncobj has [SyncVar] attribute. SyncLists should not be marked with SyncVar"));
|
||||||
Assert.That(weaverWarnings, Contains.Item("Mirror.Weaver warning: Mirror.SyncListInt MirrorTest.SyncVarsSyncList::syncints has [SyncVar] attribute. SyncLists should not be marked with SyncVar"));
|
Assert.That(weaverWarnings, Contains.Item("Mirror.Weaver warning: Mirror.SyncListInt MirrorTest.SyncVarsSyncList::syncints has [SyncVar] attribute. SyncLists should not be marked with SyncVar"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
using Mirror;
|
using Mirror;
|
||||||
|
|
||||||
namespace MirrorTest
|
namespace MirrorTest
|
||||||
|
{
|
||||||
|
|
||||||
|
class SyncVarsSyncList : NetworkBehaviour
|
||||||
{
|
{
|
||||||
public class SyncObjImplementer : SyncObject
|
public class SyncObjImplementer : SyncObject
|
||||||
{
|
{
|
||||||
@ -14,8 +17,6 @@ public void OnDeserializeDelta(NetworkReader reader) {}
|
|||||||
public void Reset() { }
|
public void Reset() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
class SyncVarsSyncList : NetworkBehaviour
|
|
||||||
{
|
|
||||||
[SyncVar(hook = nameof(OnChangeHealth))]
|
[SyncVar(hook = nameof(OnChangeHealth))]
|
||||||
int health;
|
int health;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user