Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Dijon on November 22, 2018, 08:35:26 AM

Title: Edit Prefab Question[SOLVED]
Post by: Dijon on November 22, 2018, 08:35:26 AM
Hi everyone. I'm brand new to PlayMaker (just bought it this morning) and after watching some tutorials, wanted to try some examples myself (so far, so good). I added an FSM (two actually) to a tank prefab that I have. When I want to edit an FSM, I have to select each time whether to edit the prefab, or this instance. I'm assuming that this is by design, but I'd like to confirm that it's not one of my settings.

Second question: I have an FSM on my tank and I want to add another to the turret and the gun. I started with the gun and I'm getting an error that "Owner needs a Collider", even though there is already a Box Collider on the barrel. Does anyone know why this is happening? Thanks.
Title: Re: Edit Prefab Question
Post by: djaydino on November 22, 2018, 02:14:14 PM
Hi,
Yes its by design, when you edit the prefab, and you also use the prefab (for example on a different scene) the changes will change directly.
if you change on the instance, it will only change the prefab when you "Apply" the changes.

On what actions you get this error?
Can you show some images?
Title: Re: Edit Prefab Question
Post by: Dijon on November 22, 2018, 06:45:28 PM
Thank you for your reply, it makes sense.

Regarding the error, I didn't realize that once I had fixed the problem (added a collider), I could clear the errors. Thanks again.
Title: Re: Edit Prefab Question
Post by: Thore on November 23, 2018, 07:57:34 PM
Thank you for your reply, it makes sense.

Regarding the error, I didn't realize that once I had fixed the problem (added a collider), I could clear the errors. Thanks again.

If an action wants a collider or any other component, it might also be the wrong place for the FSM. Maybe the FSM should be attached to some other object. However, in some cases you want the FSM on one object but still use components that are on another object: in that case, you need to store the other object (with the component) in a variable (with get by tag, get by name, get parent, etc.) and then use this on the action as the game object.