Skip to content

Commit 6ff2461

Browse files
committed
Add serialize attributes to NetworkedVar<T>
1 parent 69aaac6 commit 6ff2461

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

MLAPI/Data/NetworkedVar.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
using MLAPI.NetworkingManagerComponents.Binary;
22
using MLAPI.MonoBehaviours.Core;
33
using System.Collections.Generic;
4+
using UnityEngine;
45

56
namespace MLAPI.Data
67
{
78
/// <summary>
89
/// A variable that can be synchronized over the network.
910
/// </summary>
11+
[System.Serializable]
1012
public class NetworkedVar<T> : INetworkedVar
1113
{
1214
/// <summary>
@@ -54,6 +56,7 @@ public NetworkedVar(T value)
5456
this.InternalValue = value;
5557
}
5658

59+
[SerializeField]
5760
private T InternalValue = default(T);
5861
/// <summary>
5962
/// The value of the NetworkedVar container

0 commit comments

Comments
 (0)