Skip to content

Pressing + in NetworkPrefab list on NetworkManager Component, throws NullReferenceException #549

Description

@TheP3rukas

Describe the bug
When pressing + in NetworkedPrefab list on NetworkManager Component, throws NullReferenceException

To Reproduce
Steps to reproduce the behavior:

  1. Create Empty GameObejct
  2. Add the "NetworkManager" component
  3. Press "+" in the NetworkPrefabs list
  4. Console throws Error:

NullReferenceException
UnityEngine.GameObject.GetComponent[T] () (at /Users/bokken/buildslave/unity/build/Runtime/Export/Scripting/GameObject.bindings.cs:28)
MLAPI.Configuration.NetworkPrefab.get_Hash () (at Library/PackageCache/com.unity.multiplayer.mlapi@caff1f6ba3/Runtime/Configuration/NetworkPrefab.cs:27)
MLAPI.NetworkManager.OnValidate () (at Library/PackageCache/com.unity.multiplayer.mlapi@caff1f6ba3/Runtime/Core/NetworkManager.cs:240)
UnityEditor.SerializedObject:ApplyModifiedProperties()
NetworkManagerEditor:OnInspectorGUI() (at Library/PackageCache/com.unity.multiplayer.mlapi@caff1f6ba3/Editor/NetworkManagerEditor.cs:358)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:197)

Expected behavior
No Error should be thrown

Environment:

  • OS: macOS Big Sur 11.2
  • Unity Version: 2019.4.22f1
  • MLAPI Version: v0.1.0

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions