Scope sample classes

This commit is contained in:
Paul Pacheco 2020-04-22 20:54:08 -05:00
parent d0df3e8b90
commit 2ad16332f3
2 changed files with 12 additions and 11 deletions

View File

@ -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"));
} }

View File

@ -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;