playMaker

Author Topic: Error IL2CPP System.ArgumentOutOfRangeException: Index was out of range.  (Read 888 times)

eotiti

  • Junior Playmaker
  • **
  • Posts: 65
I got this error when i try to build game to .exe use Backend IL2CPP

Code: [Select]
Error Loading Action: Result Slot 8 : HutongGames.PlayMaker.Actions.SetProperty : targetProperty
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <fb001e01371b4adca20013e0ac763896>:0
  at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <fb001e01371b4adca20013e0ac763896>:0
  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <fb001e01371b4adca20013e0ac763896>:0
  at HutongGames.PlayMaker.ActionData.GetFsmProperty (HutongGames.PlayMaker.Fsm fsm, System.Int32 paramIndex) [0x00000] in C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1851
  at HutongGames.PlayMaker.ActionData.LoadActionField (HutongGames.PlayMaker.Fsm fsm, System.Object obj, System.Reflection.FieldInfo field, System.Int32 paramIndex) [0x00279] in C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:1075
  at HutongGames.PlayMaker.ActionData.CreateAction (HutongGames.PlayMaker.ActionData+Context context, System.Int32 actionIndex) [0x0024f] in C:\Projects\Playmaker_1.9.0\Projects\Playmaker.source.unity\Assets\PlayMaker\Classes\ActionData.cs:942
UnityEngine.Debug:LogError(Object)
HutongGames.PlayMaker.ActionData:CreateAction(Context, Int32) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:947)
HutongGames.PlayMaker.ActionData:LoadActions(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/ActionData.cs:776)
HutongGames.PlayMaker.FsmState:LoadActions() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:123)
HutongGames.PlayMaker.Fsm:InitData() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1746)
PlayMakerFSM:OnAfterDeserialize() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:903)
UnityEditor.AssetDatabase:StopAssetEditing()
HutongGames.PlayMakerEditor.ProjectTools:DoPreprocessPrefabFSMsInBuild() (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:123)
HutongGames.PlayMakerEditor.ProjectTools:PreprocessPrefabFSMs() (at Assets/PlayMaker/Editor/PlayMakerProjectTools.cs:66)
HutongGames.PlayMakerEditor.PlayMakerPreProcessBuild:OnPreprocessBuild(BuildReport) (at Assets/PlayMaker/Editor/PlayMakerBuildCallbacks.cs:27)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
What is this error and how i can fix this ?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Error IL2CPP System.ArgumentOutOfRangeException: Index was out of range.
« Reply #1 on: September 28, 2020, 06:23:37 AM »
Hi.
You probably used some Get/Set Properties actions.

You should try to minimize using these actions and use dedicated actions.
Get/Set Properties actions uses mirroring and are slower than dedicated actions.

You can find many custom actions on the [img=https://hutonggames.fogbugz.com/default.asp?W1181]http://Ecosystem[/img]

If you still need to use then, then you need to use Linker Wizard.