Playmaker Forum

Bug Reporting => PlayMaker Bug Reporting => Topic started by: PlaymakerNOOB on March 23, 2019, 09:04:31 PM

Title: Android - Debug Log not reporting
Post by: PlaymakerNOOB on March 23, 2019, 09:04:31 PM
Playmaker 1.9.0.p12
tested on Unity 2017 4.1, 4.3, 4.5

When using the Debug Log action with it set to Send to Unity log checked, it appears it is not on Android builds.  I have used several mobile console (android) log addons:

-Lunar Mobile Console
-SRDebugger
-Mobile Console
-Log Viewer

None of them are seeing it.  So I made my own debug log script and called it via a FSM and it shows up in the mobile console viewers. 
Title: Re: Android - Debug Log not reporting
Post by: Alex Chouls on March 24, 2019, 12:19:02 AM
For performance reasons, internal FSM logging is disabled in builds, unfortunately, this was also blocking the debug actions. I've attached a fix.

Please backup the file PlayMaker/Actions/ActionHelpers.cs then import the attached package. This should fix debug actions logging in builds.

Let me know if it works for you and I'll include the fix in the next update.

Title: Re: Android - Debug Log not reporting
Post by: PlaymakerNOOB on March 25, 2019, 07:59:40 AM
That did it.. thanks!

I needed the action to help troubleshoot why playerprefs are not saving/loading properly in my build, but work fine in the editor.  Im still not closer to understanding it so im wondering if you have an android device available and I can condense the project down to the offending section for you to look at?
--edit--
ignore the request, added debuglog but forgot to check send to unity. I can see why I have an issue.  Thanks!!
Title: Re: Android - Debug Log not reporting
Post by: djaydino on March 26, 2019, 05:19:07 AM
Hi.
Off Topic.

@ PlaymakerNOOB

I would not recommend to save sensitive variables with playerprefs tho, as the are very easy to hack.

Easy save is until now still one of the best solutions and worth the purchase.
I have it a few years now and i use it in almost all my projects.
Title: Re: Android - Debug Log not reporting
Post by: PlaymakerNOOB on March 26, 2019, 09:30:43 AM
Yeah, I actually got ES3 to save encrypted PlayerPrefs.  But I had 4 bugs show up all at once which really caused me a headache.

1) ES3 wouldnt save/load without a cryptography error
2) When I fixed the above, then ES3 would crash unity upon building (took many hours before the Unity error log actually showed an error related to ES3 so I could ask the dev for help)
3) PlayerPrefs not saving
4) Using Playmakers Debuglog action didnt work on builds, so I couldnt troubleshoot properly why PlayerPrefs were not saving on mobile as I couldnt figure out where things were failing. 

So I removed ES3 and that cleared up #1 and #2, worked with ES3 creator to figure out why.. we did, it works, but just to be safe I removed ES3 again to make sure that its not related to issue #3 or #4.  Then I went to debugging and that figured out why #3 wasnt triggering after Alex gave me the updated file.  I just havent got around to putting ES3 back yet.
Title: Re: Android - Debug Log not reporting
Post by: Broken Stylus on September 23, 2019, 10:03:35 AM
This is an old thread but I'm curious about PLnnob's chocie regarding Easy Save.
Have you gone back to using Easy Save 2? It's included in the package after all and actions are still available.
Title: Re: Android - Debug Log not reporting
Post by: PlaymakerNOOB on September 27, 2019, 02:41:57 PM
At that time, I was pretty frustrated with ES3 in general and had no interest in dealing with ES2 if ES3 was giving me that much trouble.  Its been awhile but I eventually worked through the issues since I had to just put debug logs on everything to figure out where it was failing in device builds.  Also used SRDDebugger to provide a console log on device.  I dont remember now where the problem was.

Since then, i've had no issues and its worked great.
Title: Re: Android - Debug Log not reporting
Post by: Broken Stylus on September 30, 2019, 06:11:23 AM
Thx.
SRDDebugger (https://assetstore.unity.com/packages/tools/gui/srdebugger-console-tools-on-device-27688) looks mighty nice. Especially the pin option.
It's really something that by default, in a WYSIWYG engine, there's no solution to save values tweaked at runtime.
However, I wonder how easy it would be to expose variables to make them accessible in-game through the plugin's panels, when using Playmaker. Have you done that through code only or did you manage to pull some simple actions?
Or was it with Script Control actions?
Title: Re: Android - Debug Log not reporting
Post by: PlaymakerNOOB on September 30, 2019, 09:02:24 AM
SRD has limited playmaker options.  I've included a screenshot.  I thought they would have actions to expose those variables in the panel when I bought it, so I could change things, but no such luck.  Adding playmaker support to SRD looks rather straightforward I think.

https://www.stompyrobot.uk/tools/srdebugger/documentation/#options_tab

In its current state, I am using it for the console logger and bug reporter for my mobile game.
Title: Re: Android - Debug Log not reporting
Post by: Broken Stylus on October 02, 2019, 05:23:27 AM
Ok thx, I see.
I try to guess what the things does but since you obviously cannot access Unity's Inspector panel inside your game, on your device, something special has to be done for the tweakable parameters to be saved at runtime.
If in your code you had a float set to 2 at init and you decide it would be better to be set at 2.1, essentially it's modifying the code that's on the device and then send back the new code into Unity; or it directly applies the change into Unity—all of this logically meaning that your test device is attached to your computer at all time anyway—and to me this almost sounds like the code would have to be prepared ahead, so these variables actually appear in the SRD's panel (https://assetstorev1-prd-cdn.unity3d.com/package-screenshot/dd3ac9fb-c25f-46ae-8f20-4160bb5b1a0b_scaled.jpg).
Title: Re: Android - Debug Log not reporting
Post by: Broken Stylus on October 02, 2019, 05:27:37 AM
I just finished reading some parts of the documentation.

I see that you need to inject the SROptions code bit into the lines involving the variables you seek to modify on the run. My understanding of all of this is rudimentary and it's possible Playmaker does not reach that far into the code.
However, it would be fantastic if it were a feature of Playmaker. :)
Imagine, all you'd have to do to expose the variable into the in-game PM's Option tab would be to tick a box next to the var in the Playmaker Editor: Variables tab.
A Wizard might be necessary to parse the code just before building, for all references in order to add the, say, "PMOptions." part just before the variables you wish to expose and tweak in-game.
Most of the FsmVars are managed (edit: I mean the relatively same types, aside from the fact that FsmVars are only slightly different so as to work within the Playmaker environment):

Quote
Properties of the following types are supported: Boolean, Enum, int, uint, short, ushort, byte, sbyte, float, double, and string.

They also have option that's more dynamic and it might be the solution here,

Code: [Select]
// Simplified example - it is a good idea to handle cases where MyComponent is not found.
public float MyCustomProperty {
get { return GameObject.FindObjectOfType<MyComponent>().SomeField; }
set { GameObject.FindObjectOfType<MyComponent>().SomeField = value; }
}

because they say:

Quote
#2 is useful when you wish to affect code that you do not control, for example a library contained in a .dll file.

Maybe PM staff could get in touch with the publisher of SRDebug and see if something can be done here?
Title: Re: Android - Debug Log not reporting
Post by: jeanfabre on October 03, 2019, 02:46:35 AM
hi,

 it seems they already support PlayMaker: "Control SRDebugger from Playmaker state machines."

Have you contacted the author and asked if they would be willing to provide support for fsmvariables?

Bye,

 Jean
Title: Re: Android - Debug Log not reporting
Post by: Broken Stylus on October 03, 2019, 04:37:16 AM
I think they only mean you can open the Debug panel, based on the screenshot taken by pnoob. It's different form the Options tab, which is the juicy part of the plugin unfortunately not reachable via Playmaker.

https://www.stompyrobot.uk/tools/srdebugger/updates/#updates

Quote
1.4.0 (21/Sep/15)

(EXPERIMENTAL) Added PlayMaker actions package (Open bug report sheet, Open/Close debug panel, Dock/Undock Console/Profiler, Enable/Disable trigger, etc).

Their last update was Oct 23, 2018.
However, they may still be active as they had a game in WIP state, called Nova.
Title: Re: Android - Debug Log not reporting
Post by: PlaymakerNOOB on October 10, 2019, 11:46:35 AM
@Jean and @Stylus

Yeah, I purchased because I thought I could control variables directly from their options menu, but you cannot. 

I'd email them about it, but just wanting to know first if somebody like Jean or DJ will be willing to help them out if they have trouble so I can include the offer of help in the first message.

They can also be reached at hte bottom of this link:
 https://stompyrobot.uk/tools/srdebugger/documentation/#support
Title: Re: Android - Debug Log not reporting
Post by: jeanfabre on October 11, 2019, 02:24:56 AM
hi,

 yes, I'll be willing to help out on this. Cc me when you reach them out, ( my email is available if you pm me and then choose to send via mail)

Bye,

 Jean
Title: Re: Android - Debug Log not reporting
Post by: Broken Stylus on November 14, 2019, 07:29:33 AM
@Jean and @Stylus

Yeah, I purchased because I thought I could control variables directly from their options menu, but you cannot. 

I'd email them about it, but just wanting to know first if somebody like Jean or DJ will be willing to help them out if they have trouble so I can include the offer of help in the first message.

They can also be reached at hte bottom of this link:
 https://stompyrobot.uk/tools/srdebugger/documentation/#support

Have you gotten any news on the Playmaker integration?
Title: Re: Android - Debug Log not reporting
Post by: PlaymakerNOOB on December 05, 2019, 06:37:39 PM
I emailed them earlier in the day explaining the request and pointed them out to this thread too.
Title: Re: Android - Debug Log not reporting
Post by: PlaymakerNOOB on December 09, 2019, 05:55:47 PM
I emailed them a few days ago.  They had a disappointing reply stating that they wanted to do add that feature, but had not gotten around to it and most likely, it would not be added.  So it looks like playmaker support is dead on that asset.
Title: Re: Android - Debug Log not reporting
Post by: jeanfabre on December 10, 2019, 01:22:23 AM
Hi,

 Did you cc me? I can't recall any mails on that in the last few days.

Bye,

 Jean
Title: Re: Android - Debug Log not reporting
Post by: PlaymakerNOOB on December 10, 2019, 09:52:07 AM
When I click on your profile, there is an email icon on the left.  When I click it, it only allows me to email you directly and there is not a CC or BCC option.

To prevent them from getting spam, their email is listed on this page, on the right.  https://assetstore.unity.com/publishers/10610

I emailed them again and they have agreed to allow SRD playmaker portion to be updated if somebody created the actions instead of the SRD devs and they would package that update.

edit

sent Jean an email through the forum