playMaker

Author Topic: [SOLVED] finding all actions used in a scene via script  (Read 3010 times)

mental.breakdance

  • Playmaker Newbie
  • *
  • Posts: 8
[SOLVED] finding all actions used in a scene via script
« on: August 04, 2014, 01:11:58 AM »
Hi,

Basically I'd like to create an editor script that lists all PlayMaker actions used in a given scene. Reason being that Unity's 'select dependencies' on the scene only highlights the playmaker dll and not the action scripts themselves and I really need to know which actions are being used where!

I know this must be possible, since the action browser itself shows the number of times each action is used in the currently open scene, I just have no idea how to do it..

Note that I have tried searching the scene for all fsms and then iterating across each fsm's FsmStates and then their Actions, but this returns the error "Fsm not initialized: HighConfidence" as the editor is not playing.

Thanks in advance,

Rob
« Last Edit: August 06, 2014, 04:09:15 AM by mental.breakdance »

600

  • Moderator
  • Hero Member
  • *****
  • Posts: 715
    • Flashing Lights
Re: finding all actions used in a scene via script
« Reply #1 on: August 04, 2014, 04:01:42 AM »
Hi,
I dont know about scripts,
but to find an action in fsm's - Right-click on it in action browser > Find


mental.breakdance

  • Playmaker Newbie
  • *
  • Posts: 8
Re: finding all actions used in a scene via script
« Reply #2 on: August 04, 2014, 07:27:18 PM »
Thanks for the reply! Unfortunately I need to be able to automate it, so that won't work for my circumstances. Like I say, at least it proves that there's a way of doing it though!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: finding all actions used in a scene via script
« Reply #3 on: August 05, 2014, 07:26:13 AM »
Hi,

 I made a script for this, as I need this so many times per day....

note that it doesn't select the official set of Actions, cause of course they will be there always, so it only pick the custom actions.

http://hutonggames.com/playmakerforum/index.php?topic=5387.msg25829#msg25829

so this tools will allow you to export a PlayMaker scene very easily and as safely as possible in terms of what's required for custom actions.

If you have requests on this, let me know, I am happy to make updates and improvements on this.

 Bye,

 Jean

mental.breakdance

  • Playmaker Newbie
  • *
  • Posts: 8
Re: [SOLVED] finding all actions used in a scene via script
« Reply #4 on: August 06, 2014, 04:10:02 AM »
Thanks Jean! This is EXACTLY what I was looking for - really appreciate it :D