Hallo,
I upgraded to Unity 5.1.2f1 Personal and since then my project is not working anymore.
There is a Prefab called “Entity” that is throwing error messages in the concole.
IndexOutOfRangeException: Array index is out of range.
UnityEditor.NetworkBehaviourInspector.OnInspectorGUI () (at C:/buildslave/unity/build/Extensions/Networking/Editor/NetworkBehaviourInspector.cs:122)
UnityEditor.InspectorWindow.DrawEditor (UnityEditor.Editor editor, Int32 editorIndex, Boolean forceDirty, System.Boolean& showImportedObjectBarNext, UnityEngine.Rect& importedObjectBarRect, Boolean eyeDropperDirty) (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs:1162)
UnityEditor.DockArea:OnGUI()
This error is thrown at start of Unity Editor and everytime when I scroll the inspector for Entity.
In 5.1.1 it worked fine.
At start there is lonely error message, that is thrown when I select the Entity prefab in Editor:
NullReferenceException: Object reference not set to an instance of an object
EntityScript…ctor ()
UnityEditor.DockArea:OnGUI()
IndexOutOfRangeException is written to console multipletimes. So when scrolling the inspector I end up with lots of IndexOutOfRangeException entries.
GameObject Entity has following components:
-Transform
-NetworkIdentity
-EntityScript (which is a NetworkBehaviour)
In order to fix this, I tried followign things:
-Removed all SyncVars from EntityScript
-Removed NetworkTeransform component
-Set the HideInEditor tag to several public variables in EntityScript
-Changed the base class of EntityScript from EntityBaseClass (baseclass network behaviour) to NetworkBehaviour
-Removed all components except the Transform from Entity and put them back in again
I am running out of ideas and any help is welcome.
Thanks