Author Topic: error: GetSceneName : Scene index "1" is out of range.  (Read 337 times)


  • Full Member
  • ***
  • Posts: 217
    • View Profile
    • My Oculus Rift + Touch VR Game Using Playmaker
error: GetSceneName : Scene index "1" is out of range.
« on: June 12, 2018, 05:02:50 PM »
There are 65 scenes in my build, and I have a state that even gets that number to check against, and it works fine. But I get this error when I try to use Get Scene Name, using Scene at Index as Scene Reference:

create scene list : from build settings : get and stamp scene name : GetSceneName : Scene index "1" is out of range.
HutongGames.PlayMaker.FsmLog:AddEntry(FsmLogEntry, Boolean) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmLog.cs:171)
HutongGames.PlayMaker.FsmLog:LogAction(FsmLogType, String, Boolean) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmLog.cs:392)
HutongGames.PlayMaker.FsmStateAction:LogError(String) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmStateAction.cs:207)
HutongGames.PlayMaker.Actions.GetSceneActionBase:OnEnter() (at Assets/PlayMaker/Actions/SceneManager/Internal/GetSceneActionBase.cs:92)
HutongGames.PlayMaker.Actions.GetSceneName:OnEnter() (at Assets/PlayMaker/Actions/SceneManager/GetSceneName.cs:32)
HutongGames.PlayMaker.FsmState:ActivateActions(Int32) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:199)
HutongGames.PlayMaker.FsmState:OnEnter() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:169)
HutongGames.PlayMaker.Fsm:EnterState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2670)
HutongGames.PlayMaker.Fsm:SwitchState(FsmState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2628)
HutongGames.PlayMaker.Fsm:UpdateStateChanges() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2556)
HutongGames.PlayMaker.Fsm:Start() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1851)
PlayMakerFSM:Start() (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:501)

and i get more of the same error, counting from 1 to 65 (the max number of levels in my build.)


  • Administrator
  • Hero Member
  • *****
  • Posts: 3913
    • View Profile
    • jinxtergames
Re: error: GetSceneName : Scene index "1" is out of range.
« Reply #1 on: June 13, 2018, 05:51:38 AM »
I can confirm the issue, but it seems that the action only gets scenes that are in the hierarchy and not in the build.

I did some research on the unity forums and it works differently that in-scene so i made a new action.

you can get it from the attachment below.


  • Full Member
  • ***
  • Posts: 119
    • View Profile
Re: error: GetSceneName : Scene index "1" is out of range.
« Reply #2 on: September 23, 2018, 08:42:57 AM »
This was exactly what I needed, thanks djaydino!