playMaker

Author Topic: Send Message Array Parameter Missing  (Read 1424 times)

Metsudo

  • Playmaker Newbie
  • *
  • Posts: 10
Send Message Array Parameter Missing
« on: June 15, 2016, 09:08:25 AM »
Hi all,

I'm using Playmaker 1.8.0.f43 on Unity 5.3.4f1 and have a question about Send Message.

I bought Runtime Mesh Batcher from the asset store and you can use it a number of ways; I can trigger it fine using Send Message & method "CombineMeshes" and it uses the default values from the inspector. Alternatively I should be able to trigger it the same way but whilst passing on a GameObject array to have it only process those specific objects. The manual suggests eg. "RuntimeMeshBatcherController.instance.CombineMeshes(GameObject[] gameobjects)".

The problem I'm having then is that whilst I can see Array as a parameter option in the Send Message code it does not appear in the parameter drop down list within Playmaker. Is there a prerequisite for using arrays within send message that I've overlooked ? Any help would be greatly appreciated.

Thanks,

Glen

joduffy

  • Full Member
  • ***
  • Posts: 121
  • Here to help
    • Online Playmaker Courses
Re: Send Message Array Parameter Missing
« Reply #1 on: June 16, 2016, 12:21:46 AM »
Hi Dude,

I had a look over it.
I had the same problem.

I was debugging what could the problem be and I narrowed it down.

The problem is not the Switch statement:
Code: [Select]
switch (functionCall.ParameterType)
{
case "None":
break;

.....

                                case "Array":
                                        parameter = functionCall.ArrayParameter.Values;
                                        break;
}

The problem has to do with the parameter variable.

Code: [Select]
public FunctionCall functionCall;

If you have a background in coding, you can test this by create a playmaker custom action and using the above variable. You will see that the array is not listed at all.

It looks like its a playmaker bug. I would send the playmaker guys (Jean or Alex) a message or do a bug report.

A possible worked around would be to create a custom send message action but only for arrays. So you would use the FsmArray variable over the FunctionCall one. This in theory should work (but won't know till its tried).

If you need a hand writing the custom action let me know and I will try to help.
- Jonathan

Online Playmaker Courses available at:
http://courses.jonathanoduffy.com

“I want the world to be a better place because I was here.”  -  Will Smith