Recent Posts

Pages: [1] 2 3 ... 10
PlayMaker Help / Best way to combine custom C# & Animations with Playmaker
« Last post by PET on Today at 06:17:46 PM »
Hey guys, long time no see!

I'm implementing (for fun) a board game in Unity.
This is a way for me to learn C#, re-learn Unity, etc.

Since board games are very State based I decided to use Playmaker to track states. Each state will call a Method that I wrote. I'm still at the beginning where I'm setting up the "Game Board".

Things generally work, but I'm getting stuck with some "best practices".

For example I have a method that will "randomly pick a game object and move it to another game object". When that happens I want to have an animation. I'm using DOTweenPro for that.

If I am to just call this Method using Playmaker, he will just do the call and then he will move on, he will not wait for the animations to complete.

So basically my core problem is now to combine Code + Animations + Playmaker Waiting before continuing.

I used ChatGPT to get some suggestions and basically I have something like this:

- Coroutine DrawClone (this will call another Coroutine DrawClonesCoroutine)
- DrawClonesCoroutine
- Playmaker Action that calls "DrawClone". I also have another Coroutine here.

This way my Playmaker Action will wait for his Coroutine to finish.
I am a bit confused about this whole thing... but the thing is that it works. The initial DrawClone wasn't a Coroutine, but ChatGPT made me make that one a Coroutine probably so the Playmaker Action knows when things finish. I think :))

So my main problem now is...

What is the best way to optimize everything?

I'm thinking that there will be a lot of things I want to animate and I would really like Playmaker to just WAIT for things to complete, or wait for some kind of Event.

I used a Coroutine here and not a "Event" because I can't be sure what FSM is active to receive the Event. This FSM is the GameSetup fsm, but I will use the same DrawClone Action with another FSM for example.

Any suggestions?

Thanks <3

PlayMaker Help / Custom Drawer in Variables Tab
« Last post by 3rdGood on Today at 11:26:49 AM »
I'm using ObjectPropetyDrawer to customize the way I'm referencing objects for some specific types. Long-story-short, I created a drawer that displays a standard object picker where the user can select a relevant asset but the actual serialized data is a string representing the GUID. This, combined with some build-steps, is allowing me to create weak references to assets (kinda of like how AddressableReference works but without Addressables involved) that I manually resolve later so I can load and release the assets when I want to instead of whenever the FSM is loaded.

I'd like to also make such an object picker available in some capacity in the "Variables" tab of any given FSM but I can't find a way to customize anything about that. Is there a way for me to do so or is the "Variables" tab not customizable? I cannot find anything in the API Reference for what I'd like to do.
General Discussion / Re: Please develop Playmaker’s own game engine.
« Last post by mrminico on September 24, 2023, 06:25:40 PM »
it is! I've been using Godot now in my spare time and geez once you get the hang of it you'll start having so much fun. If I had Playmaker on Godot I would've ported most of my projects from Unity ASAP!
PlayMaker Help / Re: fsm only loads when selected in Inspector
« Last post by Luceid on September 24, 2023, 09:50:21 AM »
Actually now it's happening in a fresh project, but only on objects that contain a custom action script I made, so I guess the problem lies there. Still though, it's weird that the games behavior would wildly change depending upon whether I have the FSM in question selected in editor or not. If anyone wants to take a look at my custom action and see if they spot anything weird I'd appreciate it!

Quick update, I have solved the problem by completely stripping my code of FsmVars. I thought they were working before, but the slight convenience they bring by not having to declare types is not worth the trouble.

I'm sure it was just me attempting to use a tool in a way that it wasn't intended, but for anyone thinking of interfacing with third party scripts, just declare FsmFloats, FsmInts, FsmStrings etc in a compound array. It's slightly more work but far more stable and easy to work with.
General Discussion / Playmaker Ports for Flax Engine/Godot?
« Last post by EpicMcDude on September 24, 2023, 09:06:46 AM »
So Unity has pretty much marked the downfall of their business with Sept. 12th's announcement.
Even with the recent announcement (and their shitty response to deleting their TOS page) it showed they can't trusted and will still make up an arbitrary model to charge you money. It burned too many bridges, mine included.

With that said, would it be something the Playmaker team is up to, to port Playmaker to Flax Engine and/or Godot?
Flax has a very, very similar API to Unity's and it seems to be quite a promising Unity alternative. Stride 3D is also quite similar!
It will take some time but with other engines now growing more popular, it would also be a boon to Hutong to get in on that early I suppose.

It's a bit ironic being so reliant on a single software and Unity's decisions have made me realize that. It's healthy to learn other engines, but I'm honestly still quite reliant on Playmaker - I trust Hutong Games wouldn't ever do anything like what Unity did since it isn't a public company and I trust Alex wouldn't be up for it.
PlayMaker Help / Re: fsm only loads when selected in Inspector
« Last post by Luceid on September 24, 2023, 08:56:41 AM »
Hey Djay,
I had a test project behave similarly to what the OP described. It would misbehave in a very obvious visual way until I actively selected it, then it would do go back to normal. Really bizarre behavior. I had just upgraded the project to 2022.3.10f1 so I'm guessing that was the culprit.

Can you be a bit more specific about the correct way to update playmaker after upgrading unity? Playmaker was already at the latest version, so attempting to reinstall it greyed out all the options for re-importing scripts and reinstalling. Forcefully removing causes havoc in the project as tons of scripts lose their dependencies.

Did you also update Playmaker.

Usually its best to 1st update playmaker and other 3rd party assets, then update unity and the update playmaker and 3rd party assets again.

make sure to always have a backup of your project, especially when updating
PlayMaker Help / Re: Custom Action FsmVar Convert
« Last post by Luceid on September 23, 2023, 02:06:31 PM »
I figured it out eventually with some poking from Brokn.

FsmFloats and FsmInts and such just need a .Value to convert them to their native unity type like FsmFloat.Value. I was used to this and didn't realize FsmVars just needed a slightly altered form to work.

FsmVars need that type specified in front of Value in order to be converted directly like:

Hope this helps anyone else who might find this later! :)
PlayMaker Help / Re: Custom Action FsmVar Convert
« Last post by Luceid on September 23, 2023, 07:48:58 AM »
Those were actually the first ones I modeled my action after! Glad we had the same thought.

But I already looked into it, and it uses NamedVariables and INamedVariables to get variables from other FSMs, which is not what I need to do.

And furthermore, if I try to use NamedVariables and INamedVariables, they still cannot convert to local FsmFloats or floats for example. I get a similar error of InamedVariable cannot be converted to type ___

Is there not a simple command to convert an FsmVar to it's respective type?

I suppose I could brute force the interaction I am looking for by declaring arrays of FsmFloats, FsmInts, FsmStrings, etc, and just ignoring FsmVars altogether, but that hardly seems like an elegant solution.

Try looking at the 'Get/Set Fsm Variable' actions as a reference.
PlayMaker Bug Reporting / Re: Playmaker installation status in the 2022.3 LTS versions
« Last post by djaydino on September 23, 2023, 06:23:48 AM »
Did you update unity from an older version.

if so, the best steps to do is :
Update Playmaker and other 3rd party apps.
Then update unity.

Then Redownload and update Playmaker again and possible other 3rd party apps.

for major version there might be different versions of playmaker depending on the unity version. (so for example there can be a PM 1.9.7 for unity 2020 and a PM 1.9.7 for unity 2022)
PlayMaker Help / Re: [HELP] Play Maker Hash Table Proxy
« Last post by djaydino on September 23, 2023, 06:00:16 AM »
You need to get "Array Maker" on the Ecosystem

it has hashtables included
Pages: [1] 2 3 ... 10