Thanks to Jean's help I could solve the problem.
I've kind of expected PlayMaker to automatically do the "Find Game Object" and "Get Component" actions in the background when I drop a component onto a "Get Property" action in a prefab object. Seems like I still have to use my head and do some work of my own, even with PlayMaker
For those that have the same problem. When you have an FSM attached to an asset in the scene hierarchy and want to get a property from another asset in the scene hierarchy, simply drag the component onto the Target Object field of a "Get Property" action. The problem happens, if you have an FSM attached to a prefab and want to access a property of an asset in the scene hierarchy. To do this you have to:
- Create two variables. One of the type GameObject, to store a reference to the game object you are trying to access in the scene hierarchy and one of the type Object to store a reference to the component that has the property you want to get. Important: For the variable of type Object you have to set the Object Type to the type of the component you want to access.
- Create a "Find Game Object" action and find the object you want to access via its name or tag. Store it in the variable of type GameObject created earlier.
- Create a "Get Component" action, select "Specify Game Object" and select the variable where we stored the game object from "Find Game Object", then store the result in the Object variable.
- Finally create the "Get property" action and use this Object variable as the Target Object.
Done!