Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

[Solved] Playmaker Actions Updated Along with STM?

A topic by RonDMC created Oct 02, 2017 Views: 441 Replies: 3
Viewing posts 1 to 3
(1 edit)

Hi there,

I was curious if the Playmaker Actions are updated along STM when a new version is pushed out. Sometimes you post that you make some extreme changes to the STM code and I just got an "Argument out of range" error pointing to Playmaker (full error below). The Playmaker support package says I already have everything from it; are they updated along with STM? Or is this something completely unrelated? Thank you!

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[STMTextInfo].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
SuperTextMesh.RebuildTextInfo () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:1907)
SuperTextMesh.Rebuild (Single startTime, Boolean readAutomatically) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:993)
SuperTextMesh.Rebuild () (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:953)
SuperTextMesh.set_text (System.String value) (at Assets/Clavian/SuperTextMesh/Scripts/SuperTextMesh.cs:564)
HutongGames.PlayMaker.Actions.SetSuperTextMesh.OnExit () (at Assets/Clavian/SuperTextMesh/Playmaker/SetSuperTextMesh.cs:75)
HutongGames.PlayMaker.FsmState.OnExit () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:585)
HutongGames.PlayMaker.Fsm.ExitState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2711)
HutongGames.PlayMaker.Fsm.SwitchState (HutongGames.PlayMaker.FsmState toState) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2615)
HutongGames.PlayMaker.Fsm.UpdateStateChanges () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2556)
HutongGames.PlayMaker.Fsm.UpdateState (HutongGames.PlayMaker.FsmState state) (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2686)
HutongGames.PlayMaker.Fsm.Update () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:1920)
PlayMakerFSM.Update () (at c:/Users/Alex/Documents/Unity/Playmaker/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFSM.cs:532)

Developer

Hey! The playmaker actions haven't been updated in a long time, and were written by a pal, since I don't use playmaker myself. I'll get them to take a look at it!

Developer

actually nvm this one's my fault, this is being caused by some code related to indents

It's effecting empty strings, since the code is trying to get the indent of the first character in a string, which doesn't exist.


Replace line 1907 with this:

Vector3 pos = new Vector3(info.Count > 0 ? info[0].indent : 0f, 0f, 0f); //keep track of where to place this text

and line 1921 with this:

 float lineWidth = info.Count > 0 ? info[0].indent : 0f;

I'll publish a hotfix right now!

Awesome, that seems to have fixed everything.  Did a play through and some editing and didn't see any errors pop up. Thanks again!