Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Lunar Mobile Console] High-performance Unity iOS/Android logger built with native platform UI

Discussion in 'Assets and Asset Store' started by weeeBox, Aug 13, 2015.

?

How would you prefer the plugin to be integrated into your project?

  1. Open Source: I can modify files and have them compiled every time Unity builds my game

  2. Binaries: I still have an access to the source code on Github but can't modify them in my project

  3. None: I don't need your plugin - go to hell!

Results are only viewable after voting.
  1. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
  2. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @MD_Reptile, have you tried my suggested fix for a chance?
     
  3. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Working on configurable console variables

     
  4. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    It appears that Unity finally added ARC (Automatic Reference Counting) support for iOS builds. It might be for a while now but I didn't know until yesterday :)

    Before that some preprocessing tricks were used to make iOS part work in both MRC and ARC environments:
    Code (CSharp):
    1.  
    2. #if __has_feature(objc_arc)
    3.     #define LU_WEAK __weak
    4.     #define LU_RETAIN(obj) (obj)
    5.     #define LU_RELEASE(obj)
    6.     #define LU_AUTORELEASE(obj) (obj)
    7.     #define LU_SUPER_DEALLOC
    8. #else
    9.     #define LU_WEAK
    10.     #define LU_RETAIN(obj) [(obj) retain]
    11.     #define LU_RELEASE(obj) [(obj) release]
    12.     #define LU_AUTORELEASE(obj) [(obj) autorelease]
    13.     #define LU_SUPER_DEALLOC [super dealloc];
    14. #endif
    15.  
    This would be removed and a more clean version would be released soon!
     
  5. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Sorry been busy keeping up in a couple threads and well... making games :p

    Anyway yeah, some of the files in that plugin get pulled from googles servers or something... they like auto-update and also download more stuff when you first install it. That is why you won't find some stuff in the repo I think... it is kinda tricky I guess then to actually inform them of problems with other assets.

    I do not use the play services themselves in the app that I had that problem with, but rather just the advertisements which for some reason or another now require the play services to work properly.

    So I couldn't say if this would cause issues with play services, but it doesn't cause issues with either lunar or with the ads showing up (and working fine). As far as I am concerned, if it ain't broke, don't fix it! :)
     
  6. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    No worries! I checked everything - there's nothing broken on my side and no negative effects :) You can add a simple try-catch to the Play Services plugin code and it would fix it :)
     
  7. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Oh do you have a snippet? I don't care on that project honestly, since it doesn't use the play services, but for future reference!
     
  8. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Sure!

    Open Assets/PlayServicesResolver/Editor/PlayServicesResolver.cs and wrap Activator.CreateInstance with an empty try-catch:

    Code (CSharp):
    1. /// <summary>
    2. /// Gets the resolver.
    3. /// </summary>
    4. /// <value>The resolver.</value>
    5. static IResolver Resolver
    6. {
    7.     get
    8.     {
    9.         if (_resolver == null)
    10.         {
    11.             // create the latest resolver known.
    12.             try
    13.             {
    14.                 _resolver = Activator.CreateInstance("GooglePlayServices", CurrentResolverName) as IResolver;
    15.             }
    16.             catch (Exception e)
    17.             {
    18.             }
    19.         }
    20.         return _resolver;
    21.     }
    22. }
     
    MD_Reptile likes this.
  9. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
  10. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Can work with VR (google cardboard)?
     
  11. tolosaoldfan

    tolosaoldfan

    Joined:
    Sep 14, 2012
    Posts:
    92
    Hi,
    I installed the Lunar console as advice, build in XCode-Release + Development Build in Unity Settings.
    in XCode, when I try to build - build failed with errors here :
    "unknown property attribute null in all the 5th first lines


    @interface LUConsoleTableCell : UITableViewCell

    @property (nonatomic, strong, null) UIImage * icon;
    @property (nonatomic, strong, null) NSString * message;
    @property (nonatomic, strong, null) UIColor * messageColor;
    @property (nonatomic, strong, nullable) UIColor * cellColor;

    + (CGFloat)heightForCellWithText:(nullable NSString *)text width:(CGFloat)width; => error Expected type
    "

    I'm using XCode 6.2 and Unity 5.3.4p6. Target build iOS = 8.1
     
  12. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hi @tolosaoldfan!

    Objective-C nullability is only supported in XCode 6.3 and up!
    For more information: http://www.thomashanning.com/objective-c-nullability/

    I would strongly recommend to updated your XCode installation and always target the latest iOS SDK.
    For more information: http://www.fantageek.com/blog/2016/01/26/sdk-and-deployment-target/

    If you don't want to update (or simply can't) - I would make a custom build for you! For a quick fix you can simply remove all the nullability attributes from the Objective-C code: _Nullable, _Nonnull, nullable, nonnull. And your code will compile fine.

    Please note: there are no "null" attributes in Objective-C:

    @interface LUConsoleTableCell : UITableViewCell

    @property (nonatomic, strong, null) UIImage * icon;
    @property (nonatomic, strong, null) NSString * message;
    @property (nonatomic, strong, null) UIColor * messageColor;
    @property (nonatomic, strong, nullable) UIColor * cellColor;

    Your code may probably be corrupted - reinstall the plugin to fix it!

    Thanks and let me know it it helps!
     
    tolosaoldfan likes this.
  13. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    @weeeBox any chances of this plugin ever supporting standalone PC platforms? Like binded to ~ or something?

    I figure that would be nifty, collecting error and debug information from a built client. It wouldn't necessarily need to be as robust as your other editor plugin, but just what it already does on mobile, on other platforms.
     
  14. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @MD_Reptile, I believe there's a bunch of solutions on the Asset Store already.
     
  15. tolosaoldfan

    tolosaoldfan

    Joined:
    Sep 14, 2012
    Posts:
    92
    Thanks a lot ! We had XCode6.2...
    It works now. Great !

     
  16. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Sure thing!

    Please, consider rating the plugin on the Asset Store: I would really appreciate that!
     
  17. hengineer

    hengineer

    Joined:
    Mar 18, 2013
    Posts:
    13
    Great plugin!
    Do I have to initialize the email function somehow? I just tried it on iOS and it said "Log email could not be sent".
     
  18. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @hengineer, it should work out of the box. Let me look at it really quick and I'll get back to you
     
  19. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @hengineer, I ran a quick test and everything worked well. Can you create a new project and check if everything works on your side as well?

    It would be helpful to know the following:

    • Your target device
    • iOS version
    • Xcode version
    • The list of the 3rd party plugins you use
    • The console output from Xcode
     
  20. hengineer

    hengineer

    Joined:
    Mar 18, 2013
    Posts:
    13
    Still doesn't work with new (empty) project.
    Also when I click on a log line the stack trace is missing with the message "Make sure Development Build is checked...", but it is indeed checked.
    - iPad 2
    - iOS 9.2.1
    - Xcode 7.3.1
    - (no related console output other than my own log messages for testing...)

    I also tried it on an iPad mini 2 (iOS 8.4) and email still didn't work but I *could* see the stack trace.
    Then I tried it on a Nexus 7 and it worked fine.
     
  21. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Found it! Preparing the fix: thanks for reporting!
     
  22. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @hengineer, I've released the fix on Github: asset store update is still pending. I can confirm the missing stack trace issue but it can be fixed by selecting "Debug" in "Run in Xcode as" under "Build Settings". It worked fine with the previous Unity releases but something had changed so I need to investigate further.

    Thanks for reporting these problems and please consider rating the plugin on the Asset Store if you find it useful.
     
  23. hengineer

    hengineer

    Joined:
    Mar 18, 2013
    Posts:
    13
    Awesome thanks! I will happily rate it. This plugin is exactly what I needed.
     
  24. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Thanks for posting the rating: really appreciate it!
     
  25. boowman

    boowman

    Joined:
    Jan 3, 2014
    Posts:
    57
    I just downloaded this and it works great, there is only one thing that I would add and that is a way to open the console using keys. The reason for that it's because I am using an emulator and I don't have access to "2 Finger Swipe", I added some extra code to make it work but it would be something that could probably save some time to other people that can't be bothered to look through the code and edit it.
     
  26. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Thanks! What solution did you use? Can you post some code here?
     
  27. boowman

    boowman

    Joined:
    Jan 3, 2014
    Posts:
    57
    #if UNITY_ANDROID
    if (Input.GetKeyDown(KeyCode.Q))
    {
    LunarConsolePlugin.LunarConsole.Show();
    }
    #endif
     
  28. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Thanks, @boowman! I'll add it in the future release.
     
    boowman likes this.
  29. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey there!

    I'm happy to announce the release of version 0.4.2b!

    Fixes:
    • iOS: fixed potential linking issue while building for IL2CPP script backend.
    The update is still pending but you can pull the latest package from GitHub.

    Please, rate and review the plugin on the Asset Store!
     
    Last edited: Aug 19, 2016
  30. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    The update is now live!
     
  31. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Ahoy!

    I've added a "Donate" button to help me find some additional motivation and finish incubating features (actions, variables, transparent overlay, etc...)



    All the support is greatly appreciated!

    p.s. Got no money? Rate the plugin instead or just say something nice! :)
     
  32. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    116
    Still using and loving the plugin, but is there a way to disable the in-editor update notification popup? I regularly check my plugins in the Asset Store tab to see if any of them have updates, so I don't need a modal popup telling me there's an update for Lunar Console. It just sorta gets in the way.

    I know I can just comment out the line in Autorun.cs, but maybe it'd be better if there was a setting instead, so I don't have to muck about with the plugin on my end.
     
  33. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Sure, I'll think of an option. The autoupdate feature was added before Asset Store notifications :)
     
  34. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    116
    Another -- very minor -- thing that just came up is that I've started color-coding my log messages to better separate them out, visually. I'm using Unity's built-in rich text support. Right now, those log messages come through like this:

    [<color=teal>WebSocketsManager</color>] WebSockets connection disconnected

    It's obviously very unimportant but it just looks a bit weird.
     
  35. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey @AdamT. Thanks for reporting: I'll take a look at it!
     
  36. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    I've found a few issues with Unity 5.4. Preparing release...
     
  37. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @adamt, I've removed rich text tags from the messages for now. Adding color support will mess up with the current color scheme and probably add an extra performance hit.
     
  38. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    116
    I think that's the smart move, actually. Color tags seem to work really well in-editor, but everywhere else (HockeyApp crash logs, Unity command-line output, etc.) they're just a pain.
     
  39. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Not mentioning that it would screw up the UI color scheme :)
     
  40. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey there!

    I'm happy to announce the first non-beta release of version 0.5.0! After one year of the hard work I'm finally ready to sell my plugin! The update is still pending and would be available for purchase for $25.

    The source code is available on GitHub but no more package releases would be published until I'll prepare the free version.

    Fixes:
    • Unity 5.4 compatibility bugs.
    • iOS: fixed multiple invocation of console callbacks.
    Improvements:
    • Added an option to remove rich text tags from the output.
    • Added stack trace for email/clipboard log text.
    Thanks to all the folks who reported bugs and helped testing the console!
     
  41. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    My package update was approved over night! Usually takes 5-10 days! Amazing!
     
  42. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    116
    Congrats on your sale! It looks like I'm not able to retroactively buy the plugin, unfortunately. I'd gladly buy it if Unity allowed it (maybe it does and I'm not looking in the right place -- let me know if you know of a way).

    Anyhow, I'm finally back to trying to get this thing working on Android. It's been broken there for a couple of months, for me, but I haven't had the time to devote to getting it going. I just installed version 0.5.0 and am getting this error when trying to build the APK:
    Any ideas?
     
  43. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey @adamt,

    You don't need to purchase the plugin since you already own it: all the 2,5k folks who participated in beta would continue enjoying the future updates for free! That's the least I can do to say "thank you"!

    For this issue - try to nuke the plugin and import it again. Seems like some old traces remained in you project. To remove the plugin:
    • Delete "Assets/LunarConsole" folder
    • Delete "Assets/Plugins/Android/LunarConsole" folder if exists

    Let me know if it helps!
     
  44. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    I've added a Troubleshoot section for the issue.
     
  45. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    116
    Thanks!

    Looks like I've got the Android build working again. I thought it was the multiple AndroidManifest.xml files rearing their ugly heads again, but it seems like removing Lunar Console including the prefab in the scene and going through the process again (i.e., re-import and re-install the prefab).

    Now that I'm using it again, I realize at times it can be tough to dispatch a log message popup in the Android plugin. On iOS, there's a little X in the lower-right corner of each popup. But on Android, there's just a big "Copy to Clipboard" button in the center of the popup with no visible X to close it. It seems as though I can click outside of the popup to close it, but when the log message/stack trace is large, the clickable area is pretty slim. I guess I can just click Copy to Clipboard every time but it just seems a bit weird, heh. Again, totally minor and not really at all a problem, just an observation (and I'm probably missing something super basic anyway).
     
  46. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Use the "back" button, Luke! :)
     
  47. adamt

    adamt

    Joined:
    Apr 1, 2014
    Posts:
    116
    Oh god, you can tell I'm an iOS user haha. I forget those things exist!
     
  48. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    We didn't have a budget for an extra "close" button for android so the system "back" button was used instead.
     
    MD_Reptile likes this.
  49. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    An overview video for the upcoming v0.6.0 release
     
  50. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey there!

    I'm happy to announce the release of version 0.6.0!

    Improvements:
    • Added a transparent log overlay view.
    • Added plugin settings.