playMaker

Author Topic: [Solved] Call Method but specify gameobject at runtime?  (Read 2474 times)

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
[Solved] Call Method but specify gameobject at runtime?
« on: January 25, 2018, 10:11:49 AM »
Howdy folks.

Just wondering if there is anything i can do to the call method action script to allow me to specify this gameobject at runtime, i tested dragging over the object at runtime and then activating the call method and it worked the way i had hoped but because my environment is getting generated at runtime i need to be able to specify that value automatically somehow.

Myself i am currently trying to look into the code to see if i can create a public gameobject var then change it to run off that object upon activation. (on the meshcombine code)

In the picture i have highlighted the bit i mean, if that was the specify var box i would have no problem :(
« Last Edit: January 26, 2018, 03:43:08 AM by shinodan »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Call Method but specify gameobject at runtime?
« Reply #1 on: January 26, 2018, 02:08:44 AM »
Hi,

 I think you have an old version of PLayMaker, it's there on my version:



Bye,

 Jean

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: Call Method but specify gameobject at runtime?
« Reply #2 on: January 26, 2018, 02:13:57 AM »
Comment deleted, i see what you mean your screenshot was cut off for me haha :( hmmm, how recent an update? i started a couple of months ago?

Thanks
Dan
« Last Edit: January 26, 2018, 02:19:34 AM by shinodan »

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: Call Method but specify gameobject at runtime?
« Reply #3 on: January 26, 2018, 03:32:55 AM »
I am on Version 1.8.5 and Unity Version 5.6.3 :| :(

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: Call Method but specify gameobject at runtime?
« Reply #4 on: January 26, 2018, 03:42:43 AM »
I think i have solved it by setting the gameobject array first instead of the gameobject itself. I was then able to set the array at runtime with the object as its perimeter :)



Thanks for help!

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: [Solved] Call Method but specify gameobject at runtime?
« Reply #5 on: January 26, 2018, 05:04:41 AM »
Hi,
Could you show part of the script code, how you got the parameters working?

shinodan

  • Full Member
  • ***
  • Posts: 180
    • Shinozone
Re: [Solved] Call Method but specify gameobject at runtime?
« Reply #6 on: January 26, 2018, 06:37:52 AM »
Hi Djay,

In the end i didn't need to touch any script, it is an asset script called "Runtime Mesh Batcher" - https://www.assetstore.unity3d.com/en/#!/content/26200 for $5 or so.

I have then just attached the script to an object and passed the perimeters through with the call method action like the screenshot :|

Hope that helps!