Search Unity

3d game kit lite-out of scene transportation

Discussion in 'Getting Started' started by sixdux8, Jan 2, 2020.

  1. sixdux8

    sixdux8

    Joined:
    Nov 13, 2019
    Posts:
    15
    Hi,

    Im finishing the begginer learn project 3D game kit lite, i have to make a teleporter to go to the next scene.
    I make the next scene I add in the hierarchi, the prefab exit teleporter (Transition Destination) and set it up as instructed.

    I go back to my original scene and set my transporter start (rename it as I already made a an in scene transporter and it works fine).
    Here is where I get into the problem. Transcript Point (script) with out of scene teleport has only one option: Transition Game Option. Ellen(the player character) should go in there but when I drag her i get error :

    IndexOutOfRangeException: Index was outside the bounds of the array.
    Gamekit3D.SceneNameDrawer.Setup (UnityEditor.SerializedProperty property) (at Assets/3DGamekitLite/Packages/SceneManagement/Editor/SceneNameDrawer.cs:36)
    Gamekit3D.SceneNameDrawer.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at Assets/3DGamekitLite/Packages/SceneManagement/Editor/SceneNameDrawer.cs:18)
    UnityEditor.PropertyDrawer.OnGUISafe (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyDrawer.cs:23)
    UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.Rect visibleArea) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:139)
    UnityEditor.PropertyHandler.OnGUI (UnityEngine.Rect position, UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:106)
    UnityEditor.PropertyHandler.OnGUILayout (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/ScriptAttributeGUI/PropertyHandler.cs:208)
    UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUIContent label, System.Boolean includeChildren, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9362)
    UnityEditor.EditorGUILayout.PropertyField (UnityEditor.SerializedProperty property, UnityEngine.GUILayoutOption[] options) (at C:/buildslave/unity/build/Editor/Mono/EditorGUI.cs:9346)
    Gamekit3D.TransitionStartEditor.OnInspectorGUI () (at Assets/3DGamekitLite/Packages/SceneManagement/Editor/TransitionStartEditor.cs:57)
    UnityEditor.UIElements.InspectorElement+<CreateIMGUIInspectorFromEditor>c__AnonStorey1.<>m__0 () (at C:/buildslave/unity/build/Editor/Mono/Inspector/InspectorElement.cs:501)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr) (at C:/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

    It wont let me do like the instructions say I should

    IndexOutOfRangeException: ... yes I get that ...Index was outside the bounds of the array. But I dont understand what that means.

    Anyone know how i could rectify this?
     
  2. Bill_Martini

    Bill_Martini

    Joined:
    Apr 19, 2016
    Posts:
    445
    An array has a fixed number of fields and the index is the field that is trying to be accessed within the array. The error is telling you that an index is greater than the size of the array or is a negative number.

    Reading through the error dump it is obvious that the offending code is part of 3D gamekit package and not your code. You probably do not have the skills to trouble shoot this problem(s). The cause is most likely you are using the wrong Unity version for this tutorial. Using the proper Unity version should solve this.
     
  3. sixdux8

    sixdux8

    Joined:
    Nov 13, 2019
    Posts:
    15
    So when I load w/ suggested version I get compiler error :)

    Failed to load 'C:/Users/BRBS/exploree/New Unity Project/Assets/switch coppy/NavMesh-Plane.asset' because it was serialized with a newer version of Unity. (Has a higher SerializedFile version)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
  4. Bill_Martini

    Bill_Martini

    Joined:
    Apr 19, 2016
    Posts:
    445
    Is this all in the same project? Are you combining assets? Have you made sure you are using the EXACT same Unity version as required by the project? I do know many of the tutorials have a very rigid mandate to use the proper Unity version. Maybe clear out everything to an empty project and reimport. I've really got nothing else to help with this.
     
  5. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Unity does not actually support opening a project created with a newer version of Unity in an older version of Unity. Unity does a conversion process on parts of your projects which have been changed between Unity versions when doing an upgrade, but does not have support for reversing the process to do a downgrade.

    You'd either manually repair anything Unity didn't understand, or create a new project.
     
  6. laurusnobilis

    laurusnobilis

    Joined:
    Apr 3, 2020
    Posts:
    2
    I had the same error. A working solution is:
    From File>Build Settings remove all other scenes that you won't built.
     
    e_bermude likes this.
  7. e_bermude

    e_bermude

    Joined:
    Apr 4, 2020
    Posts:
    1
    I send a lot of thanks to laurusnobilis, i apply his solution and it works fine. In my case i remove the "ExampleScene" from File>Build Settings and the project runs fine!
     
  8. Magendanz

    Magendanz

    Joined:
    Sep 8, 2015
    Posts:
    7
    This only worked for me if I right-clicked the scene in Build Settings and chose Remove Selection on the scenes I didn't need. Unchecking them didn't work.

    A couple of entries were marked as deleted. I'm guessing those were what was throwing the SceneNameDrawer script.