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.

Messages - SamH

Pages: [1] 2 3
PlayMaker Help / Convert Array to Playmaker Array List
« on: August 17, 2021, 06:58:21 PM »
Hey there, I'm using a 3rd party plugin to detect gameobjects in view. It has playmaker support and has an action to save all detected objects to a standard unity array. Does anyone know of any playmaker actions that will convert an array into a Playmaker array list?
I know I can loop through the array and add the items 1 by 1, but anyone know of an action that will do this in a single step?


PlayMaker Help / Re: Ecosystem stop working.
« on: August 17, 2021, 06:50:27 PM »
I also noticed there was something different in the last week or so, so came here to check. As described above it is running slow and seems to have issues with finding results that don't match my search words exactly. And yes also seems to be intermittent.. I searched for "hash table" just now and got No result.
I'm on Ecosystem 0.6.11 and playmaker v 1.9.1.p4

PlayMaker Help / Re: Tracking multiple objects within a FOV
« on: April 24, 2021, 05:08:43 PM »
Just to add to this- thanks for the suggestion about Sensor Toolkit.. it's worked great in my project and I got it up and running with playmaker really quickly!

Share New Actions / Re: Android Vibrate Advance
« on: February 01, 2021, 10:52:44 AM »
Does anyone know if anything exists like this for iOS?I found one simple vibrate function, but nothing with any control over duration or length yet. Thanks

Ah I think I found the issue in my case- I didn't have any pre-filled data in my array, so I hadn't set the 'prefill type'. Once I set this to 'Int' (it was 'gameobject') the errors went away.
I didn't think this was required to be set if you aren't prefilling any data, but perhaps it specifically effects the delete duplicates action.

I'm also experiencing that same 'InvalidCastException' error when using the array list delete duplicates action.
-I created the array list on the game object (not using the 'create array list' action)
-The array list contains only ints
-Occurs whether or not i have the 'sort' box ticked
-The data inside the array is previously added by using the 'array list copy to' action,  ie it is copied in from other arrays. Then I use the delete duplicates action. This then causes that Cast Exception error and it causes other things to subsequently fail.

PlayMaker Help / Re: Optimization when dealing with high numbers of FSMs
« on: January 23, 2021, 05:28:57 PM »
Ah ok cool thats good to know thanks.
All the NPCs are in offset parts of their schedule/FSM, so they are rarely executing the same action at the same time. Probably around 70% at any given time are just in the wait state.
I have a frame rate counter and I don't notice and lag before it crashes. Definitely sounds like I need to learn more about profiling!

PlayMaker Help / Optimization when dealing with high numbers of FSMs
« on: January 23, 2021, 01:56:26 PM »
Hi there, I have some questions related to FSM performance and optimization hopefully someone can give me some guidance on!
My project involves a prefab NPC (just a single 2D sprite) which has a FSM containing around 100 states (all pretty simple actions that control a schedule the characters moves through- eg navigate to bar, wait, navigate to roof, wait, etc). As the game progresses the amount of these NPCs increases into the hundreds, sometimes over 1000 simultaneously. Everything is working great (playmaker has been incredible), but it does get to a point where it starts crashing on iPhone- I'm guessing its just running out of memory.
I have been through all the actions and optimized heavily based on tips in other threads:
-No 'find object' or other expensive actions
-No 'every frame' style actions.  etc

So... a question specifically about the FSM component itself, as I realize there might be some opportunity for broader optimization. The NPCs go into a waiting state for 5 minutes at each location they visit. This is just a single state with only a 'wait' action inside it. But of course the entire FSM component is still 'active' (containing the 100 states and 20 or so variables).. is the rest of this FSM taking up a 'cost'? Or is the current state it is in the only relevant thing here?

Optimization ideas:

1. I thought maybe instead, when the NPC enters their wait state, they could send an event to a new FSM which only has 2 states in it, a wait state and a 'return to active' state. This wait state could deactivate the original larger FSM component for those 5 minutes, then when complete, it would reactivate the main FSM component and return it to previous state. Thus the majority of NPCs on screen would have inactivate FSMs at any given moment -Would having the FSM component deactivate actually help though?? Or is activating a small FSM when deactivating the original large FSM having a 0 net change.

2. Does deactivating array/hash list proxy components when not being used help at all? Each NPC has a few of these that they use only at certain parts of their schedule.

3. Instead of deactivating the FSM component, would deactivating the whole object be a bigger saver? I could replace my NPCs with a static sprite when they are in their 5min wait state.

Any small optimizations multiply out massively as the NPCs increase. So any guidance here would be amazing!

Share New Actions / Re: FSM Communication actions V2
« on: January 20, 2021, 07:35:40 PM »
Thanks for these actions!
If I could add one bit of feedback- the 'fsm int switch' can be a little confusing because it doesn't quite act like the regular 'int switch'.
Instead of providing set int values to trigger an event, it will only compare if an int is 'less than' a given value.   I couldn't work out why my switch was firing off the wrong events until I realized this slight difference in behaviour.
Also its a little weird for an int, given it has to be whole numbers.
eg To check for value '1', I have to test for 'less than 2'. I also have to put in a null 'less than 1' if I don't want an int of value of 0 to fire this event.
But thanks again for all of these!

PlayMaker Help / Re: ArrayMaker Remove Empty Data[SOLVED]
« on: November 04, 2020, 07:27:23 PM »
Just to +1 the last comment, I tried this on my string array list but I couldn't get it to remove null entries. I double checked they were actually null values (and not something like a space).  Thanks!

@nFighter  For me the prefab itself is always intact and contains all the correct info. Its just the instances that get mixed up

@djaydino The quickest fix I found is to just create a blank state in the prefab, save, then delete the state and save. Something about doing this reliably refreshes all the information and completely resolves the issue on all the instances.

I wasn't able to find any other reports of this issue, so let me post it and see if anyone else has experienced this.

Occasionally when I have worked on a prefab object FSM (by double clicking on the asset and opening it up in its own scene), I will save and return to my main scene file to find that some of the variables in the instance of the prefab have been jumbled up.  ie 'Int_Variable_A' inside an action has been switched out for 'Int_Variable_B'.   If I return back into my prefab scene, all the variables there are correct. Jumping back into my main scene file again, they are still jumbled.

Note this is not an issue with me overriding values on an instance of a prefab in my main scene file. This happens even if the prefab doesn't exist at all in the main scene hierarchy (and is created freshly by a playmaker 'create object' action after hitting play).

Some additional info:
-When the issue occurs it will soemtimes jumble up lots of different variables in a few states and actions.
-As the variables are switched randomly, 'luckily' it breaks my scene so catastrophically that its usually very apparent that the issue has occurred so I know to look for it.
-Its pretty infrequent that I get this issue.. but does pop up every few days
-The mix up does persist into a build of the game. Its not just an issue in my unity scene.
-Weirdly, if I change the problematic variable in my action (in the prefab file) to something else, save, then change it back to the correct variable and click save it does NOT correct/refresh the problem in my scene file.
-Luckily though I do have a very easy fix. If I create an empty state in my prefab FSM, click save, then delete the empty state and click save again, when I return to the main scene file this completely resolves the issue.

In my screenshot 'Prefab' You see the correct variable 'FloorManager_go'.
In the screenshot 'SceneInstance' you see what this same action looks like on the instance of the prefab- 'Current_Money_go' is in its place. Which is another random variable which was in use somewhere else in the prefab.

Sorry I don't have any exact repro steps to reliably reproduce it.. but I did make a video of the issue last time I saw that which I can provide if it helps.  Thanks!

PlayMaker Help / Re: Set FSM Int Add?
« on: October 12, 2020, 07:26:02 PM »
Thanks Jean! 10 years later but that 'AddToFsmInt' action (which is now on the ecosystem for anyone looking at this) is very helpful.   So important when I need to instantly & reliably adjust an int on another FSM.
I was previously doing a 'get' int, doing the add locally and then sending back the int- but i was finding the math was unreliable if multiple sources did the same thing simultaneously.  Much appreciated

PlayMaker Announcements / Re: [Released] IOS Native Plugin
« on: October 08, 2020, 06:24:20 PM »
Hi there, I just purchased and installed IOS Native pro. I've been unable to find any playmaker integration inside it though. And I'm not able to see this file to unzip to add playmaker actions:

Does anyone know if there are additional steps now to add playmaker functionality?

PlayMaker Help / Re: Curve Float not generating correct results?!?!
« on: September 04, 2020, 03:57:01 PM »
I'm also having very unreliable results with curve float.
1. It always animates my float in a very linear way, ignoring my curve entirely (even a simple ease in east out with only 2 keys, start and end).

2. It never ends on the value I specify in my 'To' field. Each time it runs my float ends on a different value. I'm not using any variables- I'm directly specifying the start and To values just to keep it simple. This happens no matter the 'Calculation' Method I use,  'none' or 'add to value'. 

Not sure if there are some bugs with it, or if I'm just misunderstanding how to use it.

Pages: [1] 2 3