Obi Official Forum
IndexOutOfRangeException - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Softbody (https://obi.virtualmethodstudio.com/forum/forum-12.html)
+--- Thread: IndexOutOfRangeException (/thread-3703.html)



IndexOutOfRangeException - SimonP - 21-12-2022

Hello! I just bought the asset. When I try to add the skeleton in the blueprint it gives me this error.
If I generate it without skeleton it works fine.

Any suggestions?

P/d: Unity 2021.3.9f clean project



IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.GraphColoring.AddConstraint (System.Int32[] particles) (at Assets/Obi/Scripts/Common/Blueprints/GraphColoring.cs:44)
Obi.ObiSoftbodySurfaceBlueprint+<CreateClustersFromSkeleton>d__51.MoveNext () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbodySurfaceBlueprint.cs:618)
Obi.ObiSoftbodySurfaceBlueprint+<Initialize>d__37.MoveNext () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbodySurfaceBlueprint.cs:215)
Obi.ObiActorBlueprint+<Generate>d__59.MoveNext () (at Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs:282)
Obi.CoroutineJob+<Start>d__15.MoveNext () (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:99)
UnityEngine.Debug:LogException(Exception)
Obi.<Start>d__15:MoveNext() (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:108)
Obi.EditorCoroutine:ShowCoroutineProgressBar(String, IEnumerator&) (at Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs:21)
Obi.ObiActorBlueprintEditor:Generate() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:131)
Obi.ObiActorBlueprintEditor:OnInspectorGUI() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:163)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr, Boolean&)


RE: IndexOutOfRangeException - josemendez - 22-12-2022

(21-12-2022, 11:26 PM)SimonP Wrote:
Hello! I just bought the asset. When I try to add the skeleton in the blueprint it gives me this error.
If I generate it without skeleton it works fine.

Any suggestions?

P/d: Unity 2021.3.9f clean project



IndexOutOfRangeException: Index was outside the bounds of the array.
Obi.GraphColoring.AddConstraint (System.Int32[] particles) (at Assets/Obi/Scripts/Common/Blueprints/GraphColoring.cs:44)
Obi.ObiSoftbodySurfaceBlueprint+<CreateClustersFromSkeleton>d__51.MoveNext () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbodySurfaceBlueprint.cs:618)
Obi.ObiSoftbodySurfaceBlueprint+<Initialize>d__37.MoveNext () (at Assets/Obi/Scripts/Softbody/Actors/ObiSoftbodySurfaceBlueprint.cs:215)
Obi.ObiActorBlueprint+<Generate>d__59.MoveNext () (at Assets/Obi/Scripts/Common/Blueprints/ObiActorBlueprint.cs:282)
Obi.CoroutineJob+<Start>d__15.MoveNext () (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:99)
UnityEngine.Debug:LogException(Exception)
Obi.<Start>d__15:MoveNext() (at Assets/Obi/Scripts/Common/Utils/Coroutines/CoroutineJob.cs:108)
Obi.EditorCoroutine:ShowCoroutineProgressBar(String, IEnumerator&) (at Assets/Obi/Scripts/Common/Utils/Coroutines/EditorCoroutine.cs:21)
Obi.ObiActorBlueprintEditor:Generate() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:131)
Obi.ObiActorBlueprintEditor:OnInspectorGUI() (at Assets/Obi/Editor/Common/Blueprints/ObiActorBlueprintEditor.cs:163)
UnityEngine.GUIUtilityLenguarocessEvent(Int32, IntPtr, Boolean&)

Hi Simon,

Thanks for reporting this! we could reproduce the issue, we're now investigating the cause and will provide a patch asap.

will get back to you shortly,

kind regards.


RE: IndexOutOfRangeException - josemendez - 22-12-2022

Hi again,

Attached you'll find two patched files: ObiSoftbodySurfaceBlueprint.cs and GraphColoring.cs.

Replace the ones in your project (found at Obi/Scripts/Softbody/Blueprints/ObiSoftbodySurfaceBlueprint.cs and Obi/Scripts/Common/Blueprints/GraphColoring.cs respectively). That should fix the problem.

Let me know if you experience any other issue.

kind regards,


RE: IndexOutOfRangeException - SimonP - 22-12-2022

(22-12-2022, 09:16 AM)josemendez Wrote: Hi again,

Attached you'll find two patched files: ObiSoftbodySurfaceBlueprint.cs and GraphColoring.cs.

Replace the ones in your project (found at Obi/Scripts/Softbody/Blueprints/ObiSoftbodySurfaceBlueprint.cs and Obi/Scripts/Common/Blueprints/GraphColoring.cs respectively). That should fix the problem.

Let me know if you experience any other issue.

kind regards,


Thanks a lot! It works perfectly. I'm going to test all the functions and then I'll leave the review in the asset store. But for now it's excellent!

Thanks again.