mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Print a more informative error than NPE (#31)
* Print a more informative error than NPE * Improve error message
This commit is contained in:
parent
dfbde9902d
commit
37ce0ae72d
@ -342,6 +342,12 @@ internal void OnStartClient()
|
||||
|
||||
internal void OnStartAuthority()
|
||||
{
|
||||
if (m_NetworkBehaviours == null && LogFilter.logError)
|
||||
{
|
||||
Debug.LogError("Network object " + name + " not initialized properly. Do you have more than one NetworkIdentity in the same object? Did you forget to spawn this object with NetworkServer?", this);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_NetworkBehaviours.Length; i++)
|
||||
{
|
||||
NetworkBehaviour comp = m_NetworkBehaviours[i];
|
||||
|
Loading…
Reference in New Issue
Block a user