mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
NetworkWriterTest: use CreateNetworked
This commit is contained in:
parent
4b3061a786
commit
2052d1e7ca
@ -8,7 +8,7 @@
|
|||||||
namespace Mirror.Tests
|
namespace Mirror.Tests
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class NetworkWriterTest
|
public class NetworkWriterTest : MirrorTest
|
||||||
{
|
{
|
||||||
/* uncomment if needed. commented for faster test workflow. this takes >3s.
|
/* uncomment if needed. commented for faster test workflow. this takes >3s.
|
||||||
[Test]
|
[Test]
|
||||||
@ -1020,14 +1020,10 @@ void WriteBadArray()
|
|||||||
[Test]
|
[Test]
|
||||||
public void TestNetworkBehaviour()
|
public void TestNetworkBehaviour()
|
||||||
{
|
{
|
||||||
//setup
|
CreateNetworked(out GameObject gameObject, out NetworkIdentity identity, out RpcNetworkIdentityBehaviour behaviour);
|
||||||
GameObject gameObject = new GameObject();
|
|
||||||
NetworkIdentity identity = gameObject.AddComponent<NetworkIdentity>();
|
|
||||||
RpcNetworkIdentityBehaviour behaviour = gameObject.AddComponent<RpcNetworkIdentityBehaviour>();
|
|
||||||
|
|
||||||
const uint netId = 100;
|
const uint netId = 100;
|
||||||
identity.netId = netId;
|
identity.netId = netId;
|
||||||
|
|
||||||
NetworkIdentity.spawned[netId] = identity;
|
NetworkIdentity.spawned[netId] = identity;
|
||||||
|
|
||||||
try
|
try
|
||||||
|
Loading…
Reference in New Issue
Block a user