diff --git a/MLAPI/Data/NetworkedPrefab.cs b/MLAPI/Data/NetworkedPrefab.cs
index e42b548..9354827 100644
--- a/MLAPI/Data/NetworkedPrefab.cs
+++ b/MLAPI/Data/NetworkedPrefab.cs
@@ -3,10 +3,19 @@ using UnityEngine;
namespace MLAPI.Data
{
+ ///
+ /// A class that represents a NetworkedPrefab
+ ///
[Serializable]
public class NetworkedPrefab
{
+ ///
+ /// The name of the networked prefab
+ ///
public string name;
+ ///
+ /// The gameobject of the prefab
+ ///
public GameObject prefab;
}
}
diff --git a/MLAPI/MLAPI.csproj b/MLAPI/MLAPI.csproj
index d9d439f..f0b660f 100644
--- a/MLAPI/MLAPI.csproj
+++ b/MLAPI/MLAPI.csproj
@@ -36,13 +36,13 @@
true
- ..\..\MLAPI-Examples\Assets\
+ ..\..\MLAPI-Examples\Assets\MLAPI\
DEBUG;TRACE
full
AnyCPU
prompt
MinimumRecommendedRules.ruleset
- Auto
+ Off
false
diff --git a/MLAPI/MonoBehaviours/Core/NetworkingManager.cs b/MLAPI/MonoBehaviours/Core/NetworkingManager.cs
index 7b2f67b..021640c 100644
--- a/MLAPI/MonoBehaviours/Core/NetworkingManager.cs
+++ b/MLAPI/MonoBehaviours/Core/NetworkingManager.cs
@@ -153,15 +153,20 @@ namespace MLAPI.MonoBehaviours.Core
private void OnValidate()
{
+ if (NetworkConfig == null)
+ return; //May occur when the component is added
+
if(NetworkConfig.EnableSceneSwitching && !NetworkConfig.RegisteredScenes.Contains(SceneManager.GetActiveScene().name))
{
Debug.LogWarning("MLAPI: The active scene is not registered as a networked scene. The MLAPI has added it");
NetworkConfig.RegisteredScenes.Add(SceneManager.GetActiveScene().name);
}
+
if(!NetworkConfig.EnableSceneSwitching && NetworkConfig.HandleObjectSpawning)
{
Debug.LogWarning("MLAPI: Please be aware that Scene objects are NOT supported if SceneManagement is turned on, even if HandleObjectSpawning is turned on");
}
+
if(NetworkConfig.HandleObjectSpawning)
{
for (int i = 0; i < NetworkConfig.NetworkedPrefabs.Count; i++)
@@ -173,6 +178,7 @@ namespace MLAPI.MonoBehaviours.Core
}
}
}
+
if (NetworkConfig.HandleObjectSpawning)
{
if(!string.IsNullOrEmpty(NetworkConfig.PlayerPrefabName))
@@ -198,7 +204,9 @@ namespace MLAPI.MonoBehaviours.Core
}
if (!NetworkConfig.EnableEncryption)
+ {
RegenerateRSAKeys = false;
+ }
else
{
if(RegenerateRSAKeys)