Search Unity

[Released] TouchConsole Pro

Discussion in 'Assets and Asset Store' started by eAi, Dec 3, 2014.

  1. mariopinto_appgeneration

    mariopinto_appgeneration

    Joined:
    Apr 17, 2018
    Posts:
    2
    Hi,
    I'm having this problem too but changing the settings to External (SDCard) wasn't enough. I still have the error.
    Code (CSharp):
    1. AndroidJavaException: java.lang.illegalArgumentException: Failed to find configured root that contains /data/data/com.whatever.whatever/cache/Email/Attachments/log_2016-04-04 21.58.37.htm
    Do you have any idea why this happens?
    The error occurs on the foreach loop, on the SendEmail method:

    Code (CSharp):
    1. var attachmentPath = Path.Combine(emailAttachmentsDirectory, attachment.Filename);
    2. File.WriteAllBytes(attachmentPath, attachment.Data);
    3. androidEmailClass.CallStatic("addAttachment", attachmentPath);
    Thanks in advance,
    MP
     
  2. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hey - many apologies for the really late reply. For some reason I didn't get notified about this thread being posted in.

    This problem is normally caused by your AndroidManifest.xml being incorrect. The console has a AndroidManifest.xml contained within it, which adds a FileProvider. This is required for this feature to work. Can you check that you have the AndroidManifest.xml in the Plugins/Android/Opencoding folder. If you do, can you check the built AndroidManifest.xml in your project's Temp/StagingArea folder after you've done an Android build? Check that it contains the <provider> section.

    If that's all present and correct, can you check that you also have the Plugins/Android/Opencoding/res/xml/file_paths.xml file. This is also required for the above to work.

    Finally, if all that looks fine, can you try doing a build of the test project and see if that works?

    Feel free to contact me at support@opencoding.net and I'll do my best to get to the bottom of this.
     
  3. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Version 2.6.0 has just been released. This version has quite a number of changes based on feedback - thank you to everyone who sent them in and tested beta builds!

    Get it while it's hot!

    New features
    • The console now displays errors from other threads as well as the main thread.
    • Added CommandHandlers.BeforeCommandParsedHook. This is an advanced feature that allows you to bypass the built-in command handling. Returning true will tell the CommandHandlers system you've handled it, returning false will allow the CommandHandlers system to function as normal. An example is in BallGameController.SetupDebugConsole.
    • Improved behaviour of console on recent Android versions. The console now shrinks to fit in the space available between the keyboard and the top of the screen as it does on iOS (this was broken by a Unity change fairly recently). It also now no longer considers a tap outside the keyboard as confirmation of input. The keyboard also no longer opens automatically when a suggestion button is tapped, or when the search/filter bar is opened - you have to tap the input field to do this. This is due to the keyboard preventing touches on Unity UI when open, which made some uses with auto-complete options quite painful.
    • Added option to strongly reference command handlers so that they won't get garbage collected. This is off by default, and turned on by default for delegates and actions that are passed into CommandHandlers.RegisterCommandHandler. This can be controlled by the strongReference parameter for RegisterCommandHandler/RegisterCommandHandlers.
    • Enabled opening/closing the console using keyboard keys on mobile devices, to support bluetooth keyboards and Android-based desktop emulators.

    Bug fixes
    • Fixed an issue building on Android caused by package name conflicts.
    • Fixed issue with java BuildConfig class causing issues in Android Gradle builds.
    • Fixed a warning on Unity 2017.2 or newer related to the console's use of a deprecated Unity API.
    • Fixed an error when using the console in a scene that didn't have an EventSystem object active.
    • Fixed registering closures with CommandHandlers.RegisterCommandHandler causing an exception when they were used.
     
  4. KimNulbo

    KimNulbo

    Joined:
    Jun 25, 2014
    Posts:
    8
    Hi,
    I want to send logs by email from the custom function.
    How can I send the logs?
    I tried to do this, but it didn't work.
    I want to know how to e-mail the logs.
    I'm trying to provide that function with a button in the game.

    void Awake()
    {
    CommandHandlers.RegisterCommandHandlers(this);
    }

    [CommandHandler]
    private void Email()
    {
    Opencoding.Shared.Utils.Email email = new Opencoding.Shared.Utils.Email();
    File.WriteAllText(Application.persistentDataPath + "/save.dat", "Imaginary Save File");
    email.Attachments.Add(new Email.Attachment(Application.persistentDataPath + "/save.dat", "application/octet-stream"));
    email.Message += "\n\nYour imaginary save file is attached!";
    email.ToAddress = "mogamun@hotmail.com";
    NativeMethods.SendEmail(email);
    }
     
  5. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    That looks right to me. What aspect of it doesn’t work? How are you calling that function? It is marked as private so I don’t see how you’ve connected it to a button?
     
  6. KimNulbo

    KimNulbo

    Joined:
    Jun 25, 2014
    Posts:
    8
    I want to include the logs in the mail.
    Not a save.dat file.
     
  7. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    The easiest way to do this is to call:
    DebugConsole.Instance.EmailLog()
    .

    Let me know if that doesn't do what you want!
     
  8. ernesb

    ernesb

    Joined:
    Feb 12, 2017
    Posts:
    32
    Hi @EdwinLyons
    I've been using Touch Console pro for a while and I noticed recently when I update to Unity 2018 (I'm using Unity 2018.4.2f1), I'm having a hard time locating source of error if an error occurs on the log. The error that is shown are more or less like this

    Code (CSharp):
    1. GameManager.TestCrash () (at <00000000000000000000000000000000>:0)
    2. UnityEngine.Events.UnityEvent.Invoke () (at <00000000000000000000000000000000>:0)
    3. UnityEngine.EventSystems.ExecuteEvents.Execute[T] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.ExecuteEvents+EventFunction`1[T1] functor) (at <00000000000000000000000000000000>:0)
    4. UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchPress (UnityEngine.EventSystems.PointerEventData pointerEvent, System.Boolean pressed, System.Boolean released) (at <00000000000000000000000000000000>:0)
    5. UnityEngine.EventSystems.StandaloneInputModule.ProcessTouchEvents () (at <00000000000000000000000000000000>:0)
    6. UnityEngine.EventSystems.StandaloneInputModule.Process () (at <00000000000000000000000000000000>:0)
    7. UnityEngine.EventSystems.StandaloneInputModule:Process()
    With a lot of 0000 on it, this log on editor works fine (would shows the correct line on the source code correctly), but on ios and android we get this 000 output. I'm using IL2CPP both on android and ios.

    Works fine on 5.6 and 2017 and I don't remember when exactly this start to happen, but if I remember correctly it starts showing this 0000 info since we've migrated to 2018. Tried updating plugin version 2.6.0 but this issue still occurs

    Any idea/fix for this? We've been helped by this feature a ton just by quickly locating source of error in the past but right now it is harder to be used and we're considering searching for another solution.

    Thanks for the help!
     
  9. ernesb

    ernesb

    Joined:
    Feb 12, 2017
    Posts:
    32
  10. Evgeny-Eliseev

    Evgeny-Eliseev

    Joined:
    Jan 21, 2015
    Posts:
    19
    Looks like the plugin is broken in 2018.4.6f1 for iOS. I can't make any input with keyboard.

    It works fine in 2018.4.3f1. Do somebody have quick fix for it?
     
  11. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    I'll be getting an update out with a fix for this issue very soon, which was caused by something Unity changed. In the meantime, feel free to drop me an email with your invoice number to get the update early.
     
  12. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    I've just released version 2.7 that contains a number of important fixes. Most significantly fixing keyboard input on iOS on recent Unity versions and moving the Android support over to an Android Library with the Google Play Service Resolver.

    Here's the full release notes:

    New features
    - Moved Native Android integration code into an AAR file and added the Google Play Service resolver to make it easier to handle conflicts with other plugins.
    - Added the ability to set a custom touch detector class, so that a custom method can be used for opening and closing the console. This can be done via the DebugConsole.Instance.CustomTouchDetector property.
    - Added the ability to change which of the built-in touch detectors is used after the console has been initialized. This can be done via the DebugConsole.SelectBuiltInTouchDetector method.

    Bug fixes
    - Resolved a couple of bugs that became apparent when the console was destroyed and re-instantiated.
    - Improved how the console handles safe areas - particularly useful on iPhone X/XS/XR, as well as other devices that have safe areas.
    - Fixed an issue in Unity 2018.4.6 where text couldn't be entered into the console on iOS devices.
     
  13. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    I've recently released version 2.8. This has some useful fixes for 2019.3 (and beyond, hopefully!)

    Changes
    • Upgraded PlayServiceResolver to 1.2.143, this is now called the External Dependency Manager. The upgrade should be performed automatically when the package is imported.
    • The console now uses
      SettingsProvider
      rather than the now-deprecated
      PreferenceItem
    Bug fixes
    • Created a new attribute for console commands called
      [ConsoleCommand]
      . This works exactly the same way as
      [CommandHandler]
      , but avoids a conflict with a new class built into Unity called CommandHandler which was causing errors.
    • Fixes an error that occurred when switching from one scene with a DebugConsole prefab in to another that also did.
    • Fixes a missing font in the Demo scene as Arial appears to no longer be included in Unity 2019.2+
    • Fixes a compile error in the Demo in Unity 2019.2+ due to Unity adding a CommandHandler attribute in the UnityEditor class that conflicts with the CommandHandler attribute the console uses.
    • Adds support for CommandHandlers that have arguments that are unsigned ints, shorts and longs. Also adds support for byte and char arguments.
     
  14. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    610
    Hi @EdwinLyons.

    Some time ago, I reported a bug to you via email but I didn't get a reply for 2 weeks. Then I posted a review to asset store thinking that it would draw your attention but it's been weeks without any reply again.

    I hope you are well and OK.

    I just wanted to check in here. Is everything alright?
     
  15. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi @Xtro, yes I am ok, just incredibly busy with the day job!

    The work you’re requesting (support for the new input system) is not insignificant - days of work, probably. I have started it, but it requires restructuring the project significantly. Writing asset store packages that depend on optional Unity packages is a bit fiddly. You’re the only person (so far) who has requested it.

    If it’s urgent, I can provide you with the source for you to implement yourself, otherwise, it’s coming relatively soon, when I can find a spare moment!
     
  16. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    610
    It's nice to hear you are ok. I'll delete the asset store review which I tried to draw your attention now.

    Btw, I just did something crazy. I disassembled your console dll and modified it to work with the new input system. It works fine for me now. Of-couse I didn't implement any conditional stuff like checking the active input system and using the correct one etc. I just hard coded the new input system into it.

    Since I have this as a workaround, my request is not urgent. Take care of yourself please.

    I know that managing asset store projects are very time consuming.

    Thank you for the quick response on the forum.
     
  17. DragonOfRain

    DragonOfRain

    Joined:
    Nov 27, 2018
    Posts:
    3
    Hello. Have some issue on unity 2020.2.1f1: In webGL build (and only in browser, in editor all is ok) keyboard input duplicated (some times triple). Is there any solution to fix this issue?
     
  18. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
  19. miguel-ferradans-scopely

    miguel-ferradans-scopely

    Joined:
    Nov 3, 2020
    Posts:
    3
    hey @EdwinLyons !

    I updated the plugin to the latest version using unity 2018.4, and I'm having an issue with the send email functionality, getting the following exception, seems like its not finding the native email class:

    Code (CSharp):
    1. 2021-04-22 22:25:21.637 21775-21919/com.scopely.yux E/Unity: AndroidJavaException: java.lang.ClassNotFoundException: net.opencoding.console.Email
    2.     java.lang.ClassNotFoundException: net.opencoding.console.Email
    3.         at java.lang.Class.classForName(Native Method)
    4.         at java.lang.Class.forName(Class.java:453)
    5.         at java.lang.Class.forName(Class.java:378)
    6.         at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    7.         at com.unity3d.player.UnityPlayer.c(Unknown Source:0)
    8.         at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
    9.         at android.os.Handler.dispatchMessage(Handler.java:101)
    10.         at android.os.Looper.loop(Looper.java:164)
    11.         at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
    12.      Caused by: java.lang.ClassNotFoundException: Didn't find class "net.opencoding.console.Email" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.scopely.yux-1u5wiJPnNk4JTe6h7EY1RQ==/base.apk"],nativeLibraryDirectories=[/data/app/com.scopely.yux-1u5wiJPnNk4JTe6h7EY1RQ==/lib/arm64, /data/app/com.scopely.yux-1u5wiJPnNk4JTe6h7EY1RQ==/base.ap
    13.  
    Any idea what I might be doing wrong? Since you removed the OpenCoding project from plugins/Android, I removed it from my gradle.
     
  20. miguel-ferradans-scopely

    miguel-ferradans-scopely

    Joined:
    Nov 3, 2020
    Posts:
    3
    Inspecting the APK it seems like the native classes are not being added. Previous version:
    upload_2021-4-22_23-20-23.png
    With new version:
    upload_2021-4-22_23-20-44.png

    How does this new dependency resolver work exactly? Do i need to do anything specific to use it?
     
  21. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    I am guessing the Developer is MIA, have not gotten a response to any of my emails...

    That is unfortunate.
     
  22. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi @zKici - sorry if I missed your email. I am super busy at the moment with the day job which is making it tricky to get back to people. Please drop me another email and I’ll get back to you.
     
  23. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Is it support@opencoding.net ?

    Let's do the support here so others may benefit from it as well.

    1. I cannot find an option to show the line # and script of the Debug or any other output in the log section. Currently it just prints whatever the Log prints and no location of the file or line number. Please let me know how to get that (during runtime on Mobile) example:
    upload_2021-8-15_14-49-8.png
    On my end it does noot show the Script / Location nor Line #.

    2. The email log does not work with iOS anymore, likely because the way the attachments work now?
    I have tested with creating my own email and using your NativeMethods with a custom attachment, it works no problem in Android, however for iOS it does not.
    It is really important for me to be able to send log / and other attachments from iOS as well.

    Thank you!
     
  24. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
  25. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Looks like they may support line #s in the future.

    I am using Unity 2020.3.12f1 and planning to release the updated version on the store, hoping by then you can have an update on the iOS email issue.

    Thank you
     
  26. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Sorry to be a bit pushy, just wondering if there is any progress with a fix for the iOS email sending?

    Thank you
     
  27. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    @zKici Hey - I've just been testing this. Email send is working fine in Unity 2020.3.16f1 in our game. Have you done anything to customise the emails, if so can you share your code or reproduce it in a test project? Does it work for you in a brand-new project? Can you describe what doesn't work?
     
  28. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    The only difference I can think of I have Firebase and downloaded latest SDKs, as well as EasyMobile pro.

    When I touch the Email log on Android - the share button works I can select the email / message etc, as intended.
    When I touch a custom button to send a custom email with a csv attachment file:

    Email eTest = new Email
    {
    Subject = mail_Title,
    Message = mail_Message,
    Attachments = new List<Email.Attachment>
    {
    new Email.Attachment(attachment, "text/csv")
    },
    ToAddress = SendToEmails
    };
    NativeMethods.SendEmail(eTest);

    On Android - it works.

    When I touch to Email log or custom button to send the custom email via iPhone, nothing happens even though the code gets run. No pop ups, no sharing, nothing.

    Perhaps its because of newer apis or something?
     
  29. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Hello,

    Is there any progress?
     
  30. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi @zKici - could you answer the questions in my previous message - have you tried it in an empty project? If it works there then it's an issue that's specific to your project setup in some way.

    For reference, we use it in a game with Unity 2020.3.16, Firebase on the latest iOS versions and this works fine. EasyMobile Pro could potentially be the issue - I've not used that.

    I suggest creating an empty project, putting TouchConsole Pro in and testing that. If that works, add EasyMobile Pro and see if that works. Repeat as necessary until TouchConsole Pro doesn't work and let me know how you get on.
     
  31. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    New empty project;
    Unity 2020.3.12f1
    Import TouchConsole
    Build empty scene with DebugConsole in it, build and run
    Drag two fingers top down to open console, press the Gear Icon, touch the Email Log... button and same as before, nothing.
    The console log flashes off and then on right away for a split second and The Window with Show automatically and Email log button etc, disappears.

    Then I write "Test" in the console log so it can give me a warning that Test command could not be found and try Email Log again... still nothing.

    Aug 22 08:45:02.377 RemoteConsole <Message>: Console display initialized
    Aug 22 08:51:15.388 RemoteConsole <stderr>: Hello! I'm your app and this is my first message to stderr =)
    Aug 22 08:51:15.600 RemoteConsole <stderr>: 2021-08-22 08:53:49.351 FarmBinLevels[6741:793029] Built from '2020.3/release' branch, Version '2020.3.12f1 (b3b2c6512326)', Build type 'Release', Scripting Backend 'il2cpp'
    Aug 22 08:51:15.658 RemoteConsole <stderr>: 2021-08-22 08:53:49.352 FarmBinLevels[6741:793029] MemoryManager: Using 'Default' Allocator.
    Aug 22 08:51:15.707 RemoteConsole <stdout>: -> applicationDidFinishLaunching()
    Aug 22 08:51:15.707 RemoteConsole <stdout>: -> applicationDidBecomeActive()
    Aug 22 08:51:15.707 RemoteConsole <stdout>: GfxDevice: creating device client; threaded=1
    Aug 22 08:51:15.721 RemoteConsole <stderr>: 2021-08-22 08:53:49.464 FarmBinLevels[6741:793029] GfxDevice: creating device client; threaded=1
    Aug 22 08:51:15.721 RemoteConsole <stderr>: 2021-08-22 08:53:49.464 FarmBinLevels[6741:793029] Initializing Metal device caps: Apple A13 GPU
    Aug 22 08:51:15.721 RemoteConsole <stderr>: 2021-08-22 08:53:49.466 FarmBinLevels[6741:793029] Initialize engine version: 2020.3.12f1 (b3b2c6512326)
    Aug 22 08:51:15.766 RemoteConsole <stdout>: Initializing Metal device caps: Apple A13 GPU
    Aug 22 08:51:15.766 RemoteConsole <stdout>: Initialize engine version: 2020.3.12f1 (b3b2c6512326)
    Aug 22 08:51:17.922 RemoteConsole <stderr>: 2021-08-22 08:53:51.671 FarmBinLevels[6741:793029] UnloadTime: 2.098125 ms
    Aug 22 08:51:17.922 RemoteConsole <stdout>: UnloadTime: 2.098125 ms
    Aug 22 08:52:02.890 RemoteConsole <stdout>: The command Test could not be found.
    Aug 22 08:52:02.890 RemoteConsole <stderr>: 2021-08-22 08:54:36.639 FarmBinLevels[6741:793029] The command Test could not be found.
    Aug 22 08:52:02.890 RemoteConsole <stderr>: Opencoding.CommandHandlerSystem.CommandHandlers:HandleCommand(String)
    Aug 22 08:52:02.890 RemoteConsole <stdout>: Opencoding.CommandHandlerSystem.CommandHandlers:HandleCommand(String)
    Aug 22 08:52:02.890 RemoteConsole <stderr>: Opencoding.Console.TouchScreenInputField:ExecuteInput()
    Aug 22 08:52:02.890 RemoteConsole <stdout>: Opencoding.Console.TouchScreenInputField:ExecuteInput()
    Aug 22 08:52:02.890 RemoteConsole <stderr>: Opencoding.Console.TouchScreenInputField:OnGUI(Rect)
    Aug 22 08:52:02.890 RemoteConsole <stdout>: Opencoding.Console.TouchScreenInputField:OnGUI(Rect)
    Aug 22 08:52:02.890 RemoteConsole <stderr>: Opencoding.Console.DebugConsole:DrawMainWindow(Int32, Boolean)
    Aug 22 08:52:02.890 RemoteConsole <stdout>: Opencoding.Console.DebugConsole:DrawMainWindow(Int32, Boolean)
    Aug 22 08:52:02.890 RemoteConsole <stderr>: Opencoding.Console.DebugConsole:WindowFunc(Int32)
    Aug 22 08:52:02.890 RemoteConsole <stdout>: Opencoding.Console.DebugConsole:WindowFunc(Int32)
    Aug 22 08:52:02.890 RemoteConsole <stderr>: UnityEngine.WindowFunction:Invoke(Int32)
    Aug 22 08:52:02.890 RemoteConsole <stdout>: UnityEngine.WindowFunction:Invoke(Int32)
    Aug 22 08:52:02.890 RemoteConsole <stderr>: UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)
    Aug 22 08:52:02.890 RemoteConsole <stdout>: UnityEngine.GUI:CallWindowDelegate(WindowFunction, Int32, Int32, GUISkin, Int32, Single, Single, GUIStyle)
    Aug 22 08:52:02.890 RemoteConsole <stderr>:
    Aug 22 08:52:02.890 RemoteConsole <stdout>:

    Thats all

    Note; it works good on Android just not on iOS, is there any frameworks or something additional I need to include in Xcode? Or some custom scripts?
     
    Last edited: Aug 22, 2021
  32. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    @zKici This is really odd. I've done exactly as described, both with Unity 2020.3.12f1 and 2020.3.16f1 (the latest). In both cases I've tried running the included demo scene on device and an empty scene with the console prefab in it. In all cases, it works fine - it shows the email sheet as you'd expect.

    Can you confirm that the device you're testing on has an email account set up? I think I've seen similar issues where there's no email account on the device.

    Can you test on another iOS device?

    The log you included above seems to refer to 'RemoteConsole' and says "Hello! I'm your app and this is my first message to stderr =)" - what is that? This isn't a standard Unity thing (I don't think?!) which suggests the project you're testing in isn't entirely empty?

    If none of that helps, can you send me the project and information about the device you're testing on?
     
  33. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    I was using a custom debugger,

    However since you said it was working for you I decided to update Xcode to make sure it wasn't it.
    So I updated to Xcode 12.5.1

    Tested the empty project with the email log button and I get this in the Xcode debugger:

    2021-08-25 23:27:25.246735-0500 BinLevelsApp[19070:2207465] [MFMailComposeViewController] Unable to initialize due to + [MFMailComposeViewController canSendMail] returns NO.

    Hopefully this helps narrow it down further. Testing on iPhone 11, and also tried it on iPhone XR same issue. And yes both of them have emails on the phone
     
  34. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi @zKici thank you for continuing to investigate this. Everything I’ve found online suggests that the most likely reason canSendMail would return false would be if there are no email accounts set up. It could also be caused by the messaging framework being missing - this should be included though (you can check in Xcode to be sure).

    See this stack overflow thread: https://stackoverflow.com/questions...ilcomposeviewcontroller-cansendmail-return-no

    This thread suggests it can also fail if the only account you have is set up via MDM - I’m not sure how to test this situation myself as I don’t have an MDM system: https://stackoverflow.com/questions...mail-returns-false-if-the-email-account-was-a

    The final reason I’ve found for this happening is if the Mail app has been deleted off the device.

    Can you confirm if any of these four things apply to your situation?

    I’m also testing on an iPhone XR with Xcode 12.5.1 and I’ve not had this issue reported by anyone else so it feels as though there’s something specific to your device setup going on.
     
  35. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Ahh.

    So it turns out even though they have their email accounts they are using a different email app, in this example Gmail. They did not have the "Mail" app setup at all.

    On Android I am using a custom email app as well so there is a window that asks me how I want to share it when I press email log, however on iOS I am assuming it goes directly (or tries to) with the stock mail app, and fails/nothing happens when it is not setup.

    How can we make this compatible with any mail apps setup on their iPhones? As most clients will likely have their own preferred mail app...

    Note; Right now even though it works after setting up the Mail app, it is still not behaving accordingly. The default mail app is setup as Gmail, however it goes to the Mail one instead.

    Thank you for your support as well
     
    Last edited: Aug 26, 2021
  36. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    There's no standardised way on iOS to send an email with attachments using the system default mail app. It is possible to send mail via a mailto:// link - but this can't take attachments. I'm not able to find if the gmail app has a way to do this via some API - it's something that iOS makes quite tricky to do in general.

    I think the only alternative would be to use the system share sheet - but this is less convenient for any users who have the mail app (given you're the first person to mention this in 6 years or so, I think your situation is unusual - though I don't have data on that beyond that!)

    Given that this tool is designed for use on developer's and QA users device's, I don't think it's unreasonable to expect that they can set up an account in the mail app, even if it's only used for this purpose. It doesn't have to be their default app, it just needs to be set up.

    I'll consider adding a 'Share' option alongside the Send Email option that opens the share sheet for a future update, as I think this would help with this. I'll also see if we can handle this error case more gracefully so it's easier for people to identify!

    In the meantime, it looks as though you could use the Easy Mobile Pro plugin you're using to show the system share sheet: https://www.easymobile.sglibgames.com/docs/pro/chapters/sharing/scripting.html passing it the log file from the console. You can get this from DebugConsole.Instance.ExportLog. You could modify the code in the NativeMethods.SendEmail function to use this instead of the current method so that the button still works - or you can use the
    DebugConsole.CompleteLogEmailPreprocessor delegate to override this behaviour (returning false to stop the email being sent via the normal method).

    Thank you for taking the time to investigate this.
     
  37. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Thanks a lot for taking your time and providing support.
    I am running into a different issue this time, perhaps its because I am using multiple emails?
    This is the code:

    string SendToEmails = "email_1@test.com, email_2@test.com";

    Email eTest = new Email
    {
    Subject = mail_Title,
    Message = mail_Message,
    Attachments = new List<Email.Attachment>
    {
    new Email.Attachment(attachment, "text/csv")
    },
    ToAddress = SendToEmails
    };
    NativeMethods.SendEmail(eTest);

    When the popup comes on the email is populated accordingly with its attachment, however the email to is Blank.
     
  38. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Follow up, if it is just 1 email it works, is there a different way to to the SendToEmails string? I also tried "email@test.com; email2@test.com";
     
    Last edited: Sep 2, 2021
  39. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi @zKici - sending to multiple emails isn't supported at the moment. A workaround is to use set up an alias or group on your email server that sends the email to multiple people. I'll see if I can add this in an update.
     
  40. zKici

    zKici

    Joined:
    Feb 12, 2014
    Posts:
    438
    Thank you,

    It'll be nice to have that update as it works for Android :)
     
  41. vikasrawat

    vikasrawat

    Joined:
    May 24, 2017
    Posts:
    2
    Hello , I'm facing bit of an issue where after upgrading to Unity Version 2019.4.30f1 , the exporting logs feature is broken. The reason I could attribute to was the difference in which Unity is generating the stack traces for templated structures , for example the difference is as below in the same stack trace in different unity versions :

    2019.4.17f1 : System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1:Start(<OnExecute>d__7&)
    2019.4.30f1 : System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1<object>:Start<xxx/<OnExecute>d__7>

    Because of the <object> tag , the HTML output parsing is improper. Is this something I can fix on my part or do I wait for a fix for this.

    Thanks for reading.
     
  42. Miguel_Merayo_Scopely

    Miguel_Merayo_Scopely

    Joined:
    Jun 7, 2021
    Posts:
    5
    Hello EdwinLyons, I sent a mail to support@opencoding.net some months ago but I didn't get a reply, I read on the forums that you are really busy. I hope you are well.
    We have some performance issues that we would like to address, Would it be possible to get source code, and permissions to modify it?
    Thanks
     
  43. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi Miguel,

    Many apologies for not replying - the day job has been pretty full on! I can send you the source code - can you send me another email with your invoice number and I'll get back to you with it ASAP.
     
  44. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    I've emailed you with a fix for this. I'll release this new version soon once it's had a bit more testing.
     
  45. Mobile12

    Mobile12

    Joined:
    Sep 7, 2018
    Posts:
    1
    I want to send log to email, but it is not working,
    I have trying calling
    DebugConsole.Instance.EmailLog();

    it opened the logs in browser instead of sending it to mail
    I am trying on editor
     
    Last edited: Jan 10, 2022
  46. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi, EmailLog only works on mobile devices. On desktop there isn’t a way to generically send emails with attachments that works with any email client you may be installed.
     
  47. redmondurbino

    redmondurbino

    Joined:
    Feb 15, 2013
    Posts:
    2
    Hello,

    I wanted to bring to your attention an issue we’ve encountered after upgrading our project to Unity 2022.3.11f1 LTS. Specifically, on the Android platform, we’ve identified a crash related to your tool. In our investigation, we isolated the problem by testing it in an empty project with only your tool, and the crash is traced back to a JNI Error with a global reference table overflow. This occurs during the execution of TouchScreenKeyboardManager.GetAndroidKeyboardSize, called eventually from DebugConsole.OnGUI. The crash occurs after interacting with the Debug Console’s inputfield which displays the Android keyboard and allowing a few seconds for the global reference pool to fill up.

    Given our current possession of only the DLLs and our strong desire to continue utilizing your tool, we kindly request your assistance. We would greatly appreciate either an update incorporating the necessary fix or access to the source code, enabling us to address this issue on our end.

    Thank you for your attention to this matter.
     
  48. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi, please send me an email at support@opencoding.net and I’ll give you access to a beta version that includes the source. I’m going to release this imminently.
     
  49. Xtro

    Xtro

    Joined:
    Apr 17, 2013
    Posts:
    610
    Hello again, after a very long time.

    Are you still not able to add support for the new input system?

    Also, now I need support for No Domain Reload support too.

    Can you let us know if these coming out soon or should we not expect them at all?
     
  50. EdwinLyons

    EdwinLyons

    Joined:
    Oct 4, 2012
    Posts:
    84
    Hi, email support@opencoding.net and I can give you the beta with the new input system supported. I’ve not looking into “No Domain Reload” support yet - I should be able to but I’d appreciate any details you can provide about what currently doesn’t work in this respect.