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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,19 +3,20 @@
|
|||||||
|
|
||||||
namespace MirrorTest
|
namespace MirrorTest
|
||||||
{
|
{
|
||||||
public class SyncObjImplementer : SyncObject
|
|
||||||
{
|
|
||||||
public bool IsDirty { get; }
|
|
||||||
public void Flush() {}
|
|
||||||
public void OnSerializeAll(NetworkWriter writer) {}
|
|
||||||
public void OnSerializeDelta(NetworkWriter writer) {}
|
|
||||||
public void OnDeserializeAll(NetworkReader reader) {}
|
|
||||||
public void OnDeserializeDelta(NetworkReader reader) {}
|
|
||||||
public void Reset() {}
|
|
||||||
}
|
|
||||||
|
|
||||||
class SyncVarsSyncList : NetworkBehaviour
|
class SyncVarsSyncList : NetworkBehaviour
|
||||||
{
|
{
|
||||||
|
public class SyncObjImplementer : SyncObject
|
||||||
|
{
|
||||||
|
public bool IsDirty { get; }
|
||||||
|
public void Flush() { }
|
||||||
|
public void OnSerializeAll(NetworkWriter writer) { }
|
||||||
|
public void OnSerializeDelta(NetworkWriter writer) { }
|
||||||
|
public void OnDeserializeAll(NetworkReader reader) { }
|
||||||
|
public void OnDeserializeDelta(NetworkReader reader) { }
|
||||||
|
public void Reset() { }
|
||||||
|
}
|
||||||
|
|
||||||
[SyncVar(hook = nameof(OnChangeHealth))]
|
[SyncVar(hook = nameof(OnChangeHealth))]
|
||||||
int health;
|
int health;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user