Improved MLAPI Inspector UI
This commit is contained in:
parent
0593de44a5
commit
614a3a4f19
@ -159,7 +159,7 @@ namespace MLAPI
|
|||||||
private List<object> syncedFieldValues = new List<object>();
|
private List<object> syncedFieldValues = new List<object>();
|
||||||
private List<MethodInfo> syncedVarHooks = new List<MethodInfo>();
|
private List<MethodInfo> syncedVarHooks = new List<MethodInfo>();
|
||||||
//A dirty field is a field that's not synced.
|
//A dirty field is a field that's not synced.
|
||||||
public bool[] dirtyFields;
|
private bool[] dirtyFields;
|
||||||
internal void SyncVarInit()
|
internal void SyncVarInit()
|
||||||
{
|
{
|
||||||
FieldInfo[] sortedFields = GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy | BindingFlags.Instance).OrderBy(x => x.Name).ToArray();
|
FieldInfo[] sortedFields = GetType().GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.FlattenHierarchy | BindingFlags.Instance).OrderBy(x => x.Name).ToArray();
|
||||||
|
@ -5,6 +5,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace MLAPI
|
namespace MLAPI
|
||||||
{
|
{
|
||||||
|
[AddComponentMenu("MLAPI/NetworkedObject", -99)]
|
||||||
public class NetworkedObject : MonoBehaviour
|
public class NetworkedObject : MonoBehaviour
|
||||||
{
|
{
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
|
@ -10,6 +10,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace MLAPI
|
namespace MLAPI
|
||||||
{
|
{
|
||||||
|
[AddComponentMenu("MLAPI/NetworkingManager", -100)]
|
||||||
public class NetworkingManager : MonoBehaviour
|
public class NetworkingManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static float NetworkTime;
|
public static float NetworkTime;
|
||||||
@ -19,6 +20,7 @@ namespace MLAPI
|
|||||||
public GameObject DefaultPlayerPrefab;
|
public GameObject DefaultPlayerPrefab;
|
||||||
public static NetworkingManager singleton;
|
public static NetworkingManager singleton;
|
||||||
//Client only, what my connectionId is on the server
|
//Client only, what my connectionId is on the server
|
||||||
|
[HideInInspector]
|
||||||
public int MyClientId;
|
public int MyClientId;
|
||||||
internal Dictionary<int, NetworkedClient> connectedClients;
|
internal Dictionary<int, NetworkedClient> connectedClients;
|
||||||
public Dictionary<int, NetworkedClient> ConnectedClients
|
public Dictionary<int, NetworkedClient> ConnectedClients
|
||||||
@ -41,7 +43,7 @@ namespace MLAPI
|
|||||||
private bool isListening;
|
private bool isListening;
|
||||||
private byte[] messageBuffer;
|
private byte[] messageBuffer;
|
||||||
internal int serverClientId;
|
internal int serverClientId;
|
||||||
|
[HideInInspector]
|
||||||
public bool IsClientConnected;
|
public bool IsClientConnected;
|
||||||
public Action<int> OnClientConnectedCallback = null;
|
public Action<int> OnClientConnectedCallback = null;
|
||||||
public Action<int> OnClientDisconnectCallback = null;
|
public Action<int> OnClientDisconnectCallback = null;
|
||||||
|
@ -7,6 +7,7 @@ namespace MLAPI.MonoBehaviours.Core
|
|||||||
{
|
{
|
||||||
//Based on: https://twotenpvp.github.io/lag-compensation-in-unity.html
|
//Based on: https://twotenpvp.github.io/lag-compensation-in-unity.html
|
||||||
//Modified to be used with latency rather than fixed frames and subframes. Thus it will be less accrurate but more modular.
|
//Modified to be used with latency rather than fixed frames and subframes. Thus it will be less accrurate but more modular.
|
||||||
|
[AddComponentMenu("MLAPI/TrackedObject", -98)]
|
||||||
public class TrackedObject : MonoBehaviour
|
public class TrackedObject : MonoBehaviour
|
||||||
{
|
{
|
||||||
internal Dictionary<float, TrackedPointData> FrameData = new Dictionary<float, TrackedPointData>();
|
internal Dictionary<float, TrackedPointData> FrameData = new Dictionary<float, TrackedPointData>();
|
||||||
|
@ -4,6 +4,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace MLAPI.MonoBehaviours.Prototyping
|
namespace MLAPI.MonoBehaviours.Prototyping
|
||||||
{
|
{
|
||||||
|
[AddComponentMenu("MLAPI/NetworkedAnimator")]
|
||||||
public class NetworkedAnimator : NetworkedBehaviour
|
public class NetworkedAnimator : NetworkedBehaviour
|
||||||
{
|
{
|
||||||
public bool EnableProximity = false;
|
public bool EnableProximity = false;
|
||||||
|
@ -5,6 +5,7 @@ using UnityEngine.AI;
|
|||||||
|
|
||||||
namespace MLAPI.MonoBehaviours.Prototyping
|
namespace MLAPI.MonoBehaviours.Prototyping
|
||||||
{
|
{
|
||||||
|
[AddComponentMenu("MLAPI/NetworkedNavMeshAgent")]
|
||||||
public class NetworkedNavMeshAgent : NetworkedBehaviour
|
public class NetworkedNavMeshAgent : NetworkedBehaviour
|
||||||
{
|
{
|
||||||
private NavMeshAgent agent;
|
private NavMeshAgent agent;
|
||||||
|
@ -3,6 +3,7 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace MLAPI.MonoBehaviours.Prototyping
|
namespace MLAPI.MonoBehaviours.Prototyping
|
||||||
{
|
{
|
||||||
|
[AddComponentMenu("MLAPI/NetworkedTransform")]
|
||||||
public class NetworkedTransform : NetworkedBehaviour
|
public class NetworkedTransform : NetworkedBehaviour
|
||||||
{
|
{
|
||||||
[Range(0f, 120f)]
|
[Range(0f, 120f)]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user