playMaker

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Laappa

Pages: [1]
1
Hi,

I'm trying to create a smooth workflow for creating content to my game. The target is to have as automated process to add FSM 'nodes' as building blocks.

I want to:
1) Right-click on the FSM window, click "Paste Template" and paste my earlier saved template (e.g. a State, that has it's name, color and Action set ready so that the content creator doesn't need to fill those him/herself every time)

2) Then, I would want that the Action parameters would be filled automatically. And especially, auto-generating a GameObject: most of my States require an Unity GameObject reference. I want this object to be created automatically, when I "Paste Template". The script would Instantiate a copy of a Prefab that is in my Project Assets, and put it under in the Scene hierarchy

The problem is:
I have no issues, if I add my own Action - that has above functionality - manually to a State. It runs the "Reset()" code, which generates the GameObject and adds it to the Action's reference. All good. BUT then comes the tiny but annoying issue: if I "Paste Template", that has this Action, it does NOT run "OnReset". So it won't generate the GameObject. So this results with the situation that AFTER I "Paste Template", I need to manually add the Action so that it runs "Reset()". If the Action is already in the Template, it won't run "Reset()" on the Action.

My Question:
How can I automate this flow: "Paste Template", which contains my custom "Action", which calls "Reset()" method, that generates the required GameObject references, FULLY automatically?

I've been playing around this for hours now, and I'd like to seek for help...I could not find any similar posts on the Forum although I am surprised if anyone hasn't wanted to automate their workflow this far? Am I on the right track at all?

Thanks!
Lauri

Pages: [1]