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 - Murcho

Pages: [1] 2
Playmaker Help / Access Global Variables via Script. [SOLVED]
« on: October 11, 2011, 04:21:52 PM »
Is there an easy way to access Global Variables through the scripting interface?  I've setup scripts before to access Variables located in specific FSMs, but haven't been able to work out how to access the Glopal Variables.

Playmaker Bug Reporting / 1.2 Reproducible bug [FIXED]
« on: October 04, 2011, 10:51:37 PM »
Have spent some time away from PlayMaker due to work, but finally getting back into it.  Got a bug straight off the bat :P.

If you add an FSM to a GameObject via the drop down menu "PlayMaker->Components->Add FSM To Selected Objects" with the PlayMaker Editor Window closed, this error occurs :

NullReferenceException: Object reference not set to an instance of an object
HutongGames.PlayMakerEditor.FsmEditor.SelectState (HutongGames.PlayMaker.FsmState state, Boolean frameState)
HutongGames.PlayMakerEditor.FsmBuilder.AddFsmToSelected ()
PlayMakerMainMenu.AddFsmToSelected () (at Assets/PlayMaker/Editor/PlayMakerMainMenu.cs:121)

This error does not appear if the editor window is open and the drop down menu is used, and does not happen if adding an FSM directly through the Editor Window.

Feature Requests / Align tools
« on: May 21, 2011, 06:39:13 PM »
Currently having to align everything by hand can be a little annoying.  It would be very handy to have some basic layout tools available to help keep FSM's clean. 
Something along the lines of being able to align vertically/horizontally, with an option to use either left/right extents of a state, or just the centre.  Possibly another tool to evenly space them, probably horizontally and vertically once again.

Playmaker Help / Performance Optimizations Help
« on: May 01, 2011, 05:54:16 AM »
So I'm at the end of my project, and on all of the iOS devices except the iPad2 I'm getting some major audio stuttering during CPU spikes, and after doing some deep profiling I can put it all down to PlayMaker unfortunately.  Obviously being at the end of the project I can't exactly go back and re-wrote all my logic in straight code, so I was wondering if anyone had any suggestions on performance tuning?

The biggest issue is the Audio, as sound effects always trigger when a whole bunch of processing has to happen:
E.G. player gets hit, physics checks, change states on multiple objects, lots of state exits and entries.

Playmaker Bug Reporting / Blend Animation bug WITH FIX!
« on: April 30, 2011, 07:20:48 PM »
So the Blend Animation action doesn't take the animation speed into consideration when firing the animation done event.  It is however a quick fix, just replace the code here :
Code: [Select]
if (finishEvent != null)
delayedFinishEvent = new DelayedEvent(Fsm, finishEvent, anim.length);


Code: [Select]
if (finishEvent != null)
delayedFinishEvent = new DelayedEvent(Fsm, finishEvent, anim.length / anim.speed);

General Discussion / Selling PlayMaker Action packs
« on: April 21, 2011, 07:41:52 PM »
I came across this package on the Unity Asset store the other day and I was wondering what the PlayMaker team's feeling were on people writing packs that add on to PlayMaker and selling them separate of the PlayMaker package?

I guess there are some cool packages I'd like to write up, and to be able to sell them would be great.  However I'm not sure where the line is between "Belongs on the wiki for sharing" and "Is so awesome it deserves some cash" is.  Also whether this is breaking any of the License agreement terms or anything like that?

Playmaker Help / Firing Events : Best Practices
« on: April 21, 2011, 07:26:57 PM »
I want to get an idea of the best way to be firing events, not only from within an FSM, but also between FSMs.

In the "Making an Animation Graph" tutorial video, the FSM uses no transitions between states, and uses Global Transitions to move between the states.  However in the "Using Trigger to Open Doors" tutorial video, the door's FSM is setup with local transitions, and uses them to transition between states.

My initial understand of how to use Global Events was to fire events from external sources, from another FSM or from a script, but they can obviously be fired locally as well.  Also with the local transitions, they can be triggered by events fired externally as show in the opening doors tutorial.  So what I thought was the way to do things is probably wrong right now.

So I guess my question is, when is it right to use Global Transitions over Local Transitions, and is there any best practices advice available, or should this become a Community Wiki page?

Feature Requests / Vector3 Variable Handles
« on: April 21, 2011, 06:49:19 PM »
I find myself using the Vector3 variables inside an FSM to setup "way points" for various things, eg. next place for a camera to animate to, next Euler rotation for said camera, etc. 

Rather than trying to copy out the individual values from objects as I place them around the scene, or drop a whole bunch of empty GameObjects in the scene to use as markers, it would be really handy to be able to just have a toggle on the Vector3 variable rollout (like the Inspector Toggle) that placed a movement handle into the scene.  That would allow us to position these Vector3 variables with a lot less hassle.  Possibly also the ability to toggle it to a rotation handle as well would be handy.

Forum Suggestions / Action Updates Section
« on: April 19, 2011, 05:10:52 PM »
I know it's still early days however I can see the Action Updates section getting very messy very quickly.  Could you include the following information with each action update post?

 - Version that is broken
 - Version this script will be included in

That way any posts that get dug up way past their usefulness will not be an issue.

I've come across an odd bug that has had me stumped for a week because I couldn't work out what was actually triggering it.  I finally tracked it down and can reproduce it, but it only triggers when the editor window is open, and it doesn't trigger at all when the window is closed.

I'm pretty sure it could be related to the Broadcast Event action, as it is triggering after one of these.  The stack trace takes it back to one anyway.

The code it crashes on is here :
Code: [Select]
if (float1.Value < float2.Value)
        // Crashes on the next line with null ref
And that is inside the DoCompare() function of the FloatCompare Action.  I've tried attaching the debugger and working through it in MonoDevelop, but everything seems to be fine there, so I'm wondering if there is something strange going on internally inside the editor, eg. the broadcast message is possibly going to un-instantiated prefabs inside the editor?  This is about that only behavior that makes sense to me right now.

Feature Requests / Inspector Buttons for Events.
« on: April 08, 2011, 11:24:19 PM »
So now that I have discovered you can Alt + Click on a state to set an FSM to that state, I was thinking it would be useful to have a toggle available on a state, kind of like the Inspector Toggle on variables, that would place a button to set the FSM to that state when the option is toggled on. 

Feature Requests / Better way to re-order Actions
« on: April 06, 2011, 07:37:53 PM »
I'd really like a better way to re-order actions.  The current way of either using the cog, or the buttons that appear when you select an action are a bit clunky.

Ultimately if you could drag and drop that would be perfect, however I'm not sure how easy/feasible that would be.

Any other ideas on how to make this process easier?

Action Requests / Get/Set Actions and an "If Null" boolean
« on: April 05, 2011, 08:04:12 PM »
I quite often find myself re-populating a variable with the same reference when looping through states.  While this isn't a major issue, it is a bit of a waste of processing time.  I use an Object Pool system, so these really don't need to be constantly updated.

I wanted to suggest a boolean be added to all the Get/Set variables actions, that reads something like "If Variable Is Null".  That way the action only gets called if the variable hasn't been populated with anything yet.

User Showcase / Sydney iFest
« on: April 05, 2011, 08:00:27 PM »
I'll be doing a one hour workshop at the Sydney iFest event this weekend (10th April) titled "Rapid Prototyping with Unity and PlayMaker".

Basically I'm going to get gameplay mechanics suggested by the crowd and see how fast we can get something playable together.  Should be fun!

I'll post the results of the session up.

Anyone in Sydney this weekend should check it out.

Playmaker Bug Reporting / PlayMaker 1.1 and iOS [FIXED]
« on: April 05, 2011, 01:25:28 AM »
Having some issues since upgrading to 1.1 and trying to play on the device.  Basically I can't get my app to launch properly.  I've tried several different configurations with no luck at all.

I'm getting a crash on launch, before anything gets rendered.  

Here's the log entry
Code: [Select]
* Assertion at object.c:1710, condition `class' not met

Program received signal:  “SIGABRT”.
warning: Unable to read symbols for /Developer/Platforms/iPhoneOS.platform/DeviceSupport/4.3 (8F190)/Symbols/Developer/usr/lib/libXcodeDebuggerSupport.dylib (file not found).
Previous frame inner to this frame (gdb could not unwind past this frame)
Previous frame inner to this frame (gdb could not unwind past this frame)

then the stacktrace from the main thread
Code: [Select]
Thread 1 (thread 11779):
#0  0x33d7ca1c in __pthread_kill ()
#1  0x36cb33ba in pthread_kill ()
#2  0x36cabbfe in abort ()
#3  0x00c088b8 in g_logv () at RakNetTypes.h:320
#4  0x00c088f8 in g_log () at RakNetTypes.h:320
#5  0x00bb4f1c in mono_class_vtable_full () at RakNetTypes.h:320
#6  0x00bb6be4 in mono_object_new () at RakNetTypes.h:320
#7  0x00b655bc in mono_exception_from_name_domain () at RakNetTypes.h:320
#8  0x00b65968 in mono_exception_from_name_msg () at RakNetTypes.h:320
#9  0x00b1fd38 in mono_jit_compile_method_with_opt () at RakNetTypes.h:320
#10 0x00b20658 in mono_jit_compile_method () at RakNetTypes.h:320
#11 0x00b1fcf4 in mono_jit_compile_method_with_opt () at RakNetTypes.h:320
#12 0x00b20658 in mono_jit_compile_method () at RakNetTypes.h:320
#13 0x00b30d98 in mono_magic_trampoline () at RakNetTypes.h:320
#14 0x006d89c8 in method_order_end () at RakNetTypes.h:320
#15 0x001b0efc in HutongGames.PlayMaker.FsmState:OnEnter (this=@0x1b0efc)
#16 0x001c5370 in HutongGames.PlayMaker.Fsm:EnterState (this=@0x1aa5d0, state=@0x2f95348)
#17 0x017c2000 in ?? ()
#18 0x001c50b4 in HutongGames.PlayMaker.Fsm:SwitchState (this=@0x6df854, toState=@0x0)
#19 0x001c369c in HutongGames.PlayMaker.Fsm:EnterStartState (this=@0x4db5a40)
#20 0x017c2000 in ?? ()
#21 0x001c3984 in HutongGames.PlayMaker.Fsm:Update (this=@0x4dafd10)
Cannot access memory at address 0x8
#22 0x001ceab0 in PlayMakerFSM:Update (this=)
#23 0x017c2000 in ?? ()
#24 0x00669d8c in (wrapper runtime-invoke) object:runtime_invoke_dynamic (param0=0, param1=0, param2=1, param3=803199908)
#25 0x00b20fd4 in mono_jit_runtime_invoke () at RakNetTypes.h:320
#26 0x00b20ea0 in mono_jit_runtime_invoke () at RakNetTypes.h:320
Previous frame inner to this frame (gdb could not unwind past this frame)

Something else worth noting is that if build stripping is turned off, it doesn't even compile, it provides two compile errors, both the same error, one for arm6 and one for arm7:
Code: [Select]
ld: ldr 12-bit displacement out of range (5780 max +/-4096) in _AudioComponentFindNext$stub in _AudioComponentFindNext$stub from /Users/DevA/Documents/Unity_3_Projects/NinjaSushiSVN/svn/Ninja Sushi Proto Jan2011 SVN/XCode2/build/
This compile error I tracked down to this thread in the forums

Going to roll back now... :(

Pages: [1] 2