Hi,
i made 2 different version for testing, requested by Krillan87
He had an error using this action, when using photon.
"Get_realtimeSinceStartup is not allowed to be called during serialization, call it from Awake or Start instead"
In CountdownTimer2 i moved "Get_realtimeSinceStartup" into update with a bool check, but when i use the action on a start state, there is a very small delay :
Original action gets 0, CountdownTimer2 gets 0.003+
Which should be fine in most cases.
I also made a version without the realtime option (CountdownTimerNoRealTime), so you can use that if you don't need realtime.
Realtime is mainly useful like for example, when you use timescale 0 (pausing game) and you still want the Countdown to continue.
Thank you so much, I really appreciate your effort. The weird thing here is that I still get the error, even when I use the action without realtime.
For a second I thought that maybe there is another action on the game object that is using the "get realtime" so it is not your action that is causing the issue... but I can't seem to find it.
I do not really know how to check where exactly the issue is coming from, the only information unity is giving me is:
"get_realtimeSinceStartup is not allowed to be called during serialization, call it from Awake or Start instead. Called from MonoBehaviour 'PlayMakerFSM' on game object 'PlayerBrain'. See 'Script Serialization' page in the Unity Manual for further details."
When I playtest and instantiate my player the game pauses and this error text appears, the thing is I can just unpause the game and keep playing so maybe this is not a big issue? My coding skills are next to nothing so I'am really know the significance of this error text haha
Once again, thank you for your help.