playMaker

Author Topic: Call Method from previous scene's objects  (Read 1180 times)

tfournier

  • Playmaker Newbie
  • *
  • Posts: 1
Call Method from previous scene's objects
« on: August 19, 2015, 04:13:36 PM »
Hi, I'm new on the forums. Haven't had time to look thoroughly, but couldn't find an answer googling.

Is there a way to Find a gameobject, and call a script held by one of its component ?

Basically, I have a first scene that holds some "App-Scale" information and menus. With DontDestroyOnLoad, I can keep those around for the whole experience.

Using scripts, I can just do :

Code: [Select]
GameObject.FindObjectOfType<MyScript>().MyMethod(parameter);
But I need to be able to achieve the same using PlayMaker... But I only have access to script that are already within the scene... I know i can find a gameobject, but I can't access its scripts component from there... Am I missing something ?

EDIT : I just checked and found the Invoke method which looked like what i wanted to do, but sadly, it doesn't take parameters and doesn't allow me to store results. any other option ?
« Last Edit: August 24, 2015, 10:46:15 AM by tfournier »