Search Unity

  1. Get the latest news, tutorials and offers directly to your inbox with our newsletters. Sign up now.
    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. WestHill

    WestHill

    Joined:
    Oct 29, 2012
    Posts:
    158
    Hi
    When will 1.5.2 be released?

    This error will appear when running in 1.5.1.

    NullReferenceException: Object reference not set to an instance of an object
    UnityEditor.InspectorWindow.OnSelectionChange () (at C: /buildslave/unity/build/Editor/Mono/Inspector/InspectorWindow.cs: 148)
     
    coeing likes this.
  2. fidelsoto

    fidelsoto

    Joined:
    Aug 7, 2012
    Posts:
    87
    Having the same problem.
     
  3. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    107
    Can't build iOS application.
    XCode error:
    Code (CSharp):
    1. /* com.apple.ibtool.errors */
    2. /Users/Assets/LunarConsole/Editor/iOS/Common/Console/Log/LUConsoleLogController.xib:
    3. error: Interface Builder could not open the document LUConsoleLogController.xib" because it does not exist.
     
  4. weeeBox

    weeeBox

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

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
  6. hottabych

    hottabych

    Joined:
    Apr 18, 2015
    Posts:
    107
  7. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hi @hottabych,

    Great to hear that! Please, don't forget to rate and review the plugin if you find it useful!
     
  8. zzzzzz789

    zzzzzz789

    Joined:
    Dec 21, 2013
    Posts:
    22
    Is there a way to show and use the console in the Unity Editor?
     
  9. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    You can use Window->Lunar Mobile Console->Actions and Variables
     
  10. rossadamsm

    rossadamsm

    Joined:
    Feb 7, 2016
    Posts:
    7
    Hi,

    I cant seem to get your asset to work when using Gradle as the Build System option. I created an empty project that has just the Lunar Mobile Console asset in it. I am using Unity 2017.3.1f1. The exact same project works when I set the build type to internal.
     
  11. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hi @rossadamsm,

    Sorry for the issue. What host OS do you use?
     
  12. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
  13. zzzzzz789

    zzzzzz789

    Joined:
    Dec 21, 2013
    Posts:
    22
  14. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hi @zzzzzz789,

    Sorry for the issue. I'm currently out of town and would check it when I get back.
     
  15. neoplestudio42

    neoplestudio42

    Joined:
    Jun 29, 2018
    Posts:
    1
    Hi,
    As far as I know Lunar Console Support types are Boolean, float, integer, string.
    Is there any plan to support Enum type?
    It would be very useful if it supports Enum type.
     
  16. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hi @neoplestudio42,

    It's a good idea. I'll look at it and get back to you.

    Thanks,

    -Alex
     
  17. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,628
    I'm getting an error when freshly importing lunar mobile console to an android project, on windows editor. The error happens at build time:

    Code (Error):
    1. Can't enable Android plugin: unable to create importer for 'Assets/LunarConsole/Editor/Android/lunar-console.aar'. Re-install Lunar Mobile Console to fix the issue.
    2. UnityEngine.Debug:LogErrorFormat(String, Object[])
    3. LunarConsoleEditorInternal.AndroidPlugin:SetEnabled(Boolean) (at Assets/LunarConsole/Editor/AndroidPlugin.cs:48)
    4. LunarConsoleEditorInternal.Autorun:.cctor() (at Assets/LunarConsole/Editor/Autorun.cs:54)
    5. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
    I'm not sure if there is a conflict, perhaps with the asset "Cross Platform Native Plugins Ultra Pack", but I'll keep testing stuff and see if its something I've done wrong. This is on Unity 2018.2.6f1.

    EDIT: Forgive me for the wall of text I'm about to drop here. :p
    I'm not sure if reinstalling fixed the above error or it has something to do with the next problem I ran into - but I noticed that it kept losing the lunar gameobject in the scene when reopening the editor (after installing lunar).

    It seems like the scene is not marked dirty or something (even when hitting save manually then closing the editor the gameobject seemed to be gone) - and I had to save the scene as a different name, then add that scene to the build settings before it would work for me.

    I have experienced a similar issue with creating gameobjects through code and the editor "not noticing" that those objects were added in an active scene, and "forgetting" to save them without literally deleting the old scene and recreating it rather than saving it over.... not sure if there is something like that happening or what, but figured I'd let you know!

    Anyway, it seems to be working fine after that, so probably my own mistake somewhere. :D
     
    Last edited: Sep 2, 2018
  18. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hi @MD_Reptile,

    Sorry for the late reply (traveling currently). Glad that everything worked!
     
    MD_Reptile likes this.
  19. Temka_193

    Temka_193

    Joined:
    Oct 24, 2015
    Posts:
    42
    It is possible to make that "Exceptions Warnings" showed only at Exception, instead of LogError
     
  20. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @Temka_193, I can probably add it to the next release
     
  21. Temka_193

    Temka_193

    Joined:
    Oct 24, 2015
    Posts:
    42
    @weeeBox, it would be great, thanks
     
  22. Temka_193

    Temka_193

    Joined:
    Oct 24, 2015
    Posts:
    42
    when will the next release?
     
  23. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @Temka_193, sorry, missed your post some how. I'll try to squeeze it to 1.6.0 release (got busy with some other feature work and bug fixes)
     
  24. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Lunar Mobile Console v1.5.5 is now pending for a review!

    Fixes:

    • [ANDROID] Black screen on the settings activity when built with Unity 2018.x
     
  25. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    55
    Hello, I love this asset.
    Do you have a plan for support SafeArea?
    I cannot touch close button in iPhoneX.
     
  26. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Yes, I'll add it to the next release
     
  27. kyubuns

    kyubuns

    Joined:
    Aug 6, 2013
    Posts:
    55
    sounds good!
    I'm looking forward to it!
     
  28. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @kyubuns, don't forget to rate and review the plug-in if you find it useful!
     
    kyubuns likes this.
  29. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    80
    Hello @weeeBox , thanks for your awesome plugin, really helpful!
    Is there a way to change the time messages stay on screen when using transparent log overlay? (right now text disappear way to fast and thus this feature become not so useful)
     
  30. weeeBox

    weeeBox

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

    How would you like to configure that?

    -Alex
     
    Garrettec likes this.
  31. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    80
    I believe adding several variables to prefab will be more then enough. For example:
    - Delay before text disappear in seconds
    - Relative hight [from 0 to 1], for instance value 0.25 is a quarter of the screen

    Thank you in advance!
     
  32. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    @weeeBox I'm trying to create variables to access some values in library which has an assembly definition, but the variables don't appear. So I created a test and noticed when I create an assembly definition file for LunarConsole the variables are gone. Remove the assembly definition and the variables are back. Is there a fix for this?

    What I thought would be the right thing to do was to create an assembly definition for LunarConsole and reference that in my other library's assembly definition.
     
  33. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @doq, would you be able to share a sample project? You can put it on Github (make sure to take out the plugin files) or email it to me.
     
  34. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    Sure thing. lunar.plugin@gmail.com right?
     
  35. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Yes, please
     
  36. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    @weeeBox Can you update the API documentation for Variables? I wanted to create Variables on initialization, and wanted a simple way to do this. Here's what I ended up doing to get it working, but it'd be nice to be able to register Variables like Actions. Also there should be a note about running the initialization on Start instead of Awake.

    Code (CSharp):
    1. public class SettingsConsoleVariables : MonoBehaviour
    2. {
    3.     public Settings settings;
    4.     public static CVar factor;
    5.  
    6.  
    7.     private void Start()  // Note: setup on Start not Awake
    8.     {
    9.         LunarConsole console = GetComponent<LunarConsole>();
    10.         factor = new CVar("factor", settings.factor);
    11.         factor.AddDelegate(OnFactorUpdate);
    12.         console.registry.Register(factor);
    13.         // would be nice to say: factor = LunarConsole.Register("factor", settings.factor, OnFactorUpdate);
    14.     }
    15.  
    16.     void OnFactorUpdate(CVar cvar)
    17.     {
    18.         settings.factor = cvar;
    19.     }
    20. }
    I see a message in the console saying: [Lunar Mobile Console] Ignoring variable '%s'
    What does that mean?

    Also, is there a way to change the color of the logs in the Transparent Overlay? I tried using color tags, but it didn't work.
     
  37. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    doq likes this.
  38. Temka_193

    Temka_193

    Joined:
    Oct 24, 2015
    Posts:
    42
    @weeeBox, is it very annoying when you can make such a feature?
     
  39. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey @Temka_193, it will be included in the next release. Sorry, it's taking long.
     
  40. Temka_193

    Temka_193

    Joined:
    Oct 24, 2015
    Posts:
    42
    @weeeBox I get an exception in Unity 2018.3.7f1
    Code (CSharp):
    1. [Lunar Mobile Console] Unable to list types for assembly: Accessibility, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
    2. Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
    3.   at (wrapper managed-to-native) System.Reflection.Assembly.GetTypes(System.Reflection.Assembly,bool)
    4.   at System.Reflection.Assembly.GetTypes () [0x00000] in <d7ac571ca2d04b2f981d0d886fa067cf>:0
    5.   at LunarConsolePluginInternal.ReflectionUtils.FindTypes (System.Reflection.Assembly assembly, LunarConsolePluginInternal.ReflectionTypeFilter filter) [0x00008] in D:\Projects\MyProject\Assets\LunarConsole\Scripts\Utils\ReflectionUtils.cs:274
    6. UnityEngine.Debug:LogError(Object)
    7. LunarConsolePluginInternal.Log:e(Exception, String) (at Assets/LunarConsole/Scripts/Utils/Log.cs:61)
    8. LunarConsolePluginInternal.Log:e(Exception, String, Object[]) (at Assets/LunarConsole/Scripts/Utils/Log.cs:54)
    9. LunarConsolePluginInternal.ReflectionUtils:FindTypes(Assembly, ReflectionTypeFilter) (at Assets/LunarConsole/Scripts/Utils/ReflectionUtils.cs:285)
    10. LunarConsolePluginInternal.ReflectionUtils:FindAttributeTypes(Assembly, Type) (at Assets/LunarConsole/Scripts/Utils/ReflectionUtils.cs:261)
    11. LunarConsolePluginInternal.ReflectionUtils:FindAttributeTypes(Assembly) (at Assets/LunarConsole/Scripts/Utils/ReflectionUtils.cs:256)
    12. LunarConsolePlugin.LunarConsole:ResolveVariables() (at Assets/LunarConsole/Scripts/LunarConsole.cs:341)
    13. LunarConsolePlugin.LunarConsole:InitPlatform(Int32, Int32, LunarConsoleSettings) (at Assets/LunarConsole/Scripts/LunarConsole.cs:245)
    14. LunarConsolePlugin.LunarConsole:EnablePlatform() (at Assets/LunarConsole/Scripts/LunarConsole.cs:197)
    15. LunarConsolePlugin.LunarConsole:OnEnable() (at Assets/LunarConsole/Scripts/LunarConsole.cs:140)
     
  41. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Would you be able to open an issue on Github?
     
  42. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey @Temka_193 and @Garrettec, I've added "display mode" to the exception warning view along with additional customizations (more details here)
     
    Garrettec likes this.
  43. Garrettec

    Garrettec

    Joined:
    Nov 26, 2012
    Posts:
    80
    @weeeBox Thanks a lot! It will drastically improve usability!
     
  44. weeeBox

    weeeBox

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

    weeeBox

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

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Lunar Mobile Console v1.6.0 is now live!

    Changes:

    • Added log overlay customization.
    • Added exception warning display modes.
    Fixes:
    • Fixed iPhone X notch safe area.

    cc @Temka_193, @kyubuns, @Garrettec

    p.s. As always, don't forget to rate and review the plugin if you find it useful!
     
    MD_Reptile and Garrettec like this.
  47. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,628
    @weeeBox - I am having difficulties with lunar mobile console right now, and I can't say for sure its a problem with the plugin (pro version) or if its compatibility with other plugins. Right now I'm trying to test a problem I'm having with google's play games services on android, and google's admob plugin while using lunar mobile console for debugging. It seems that if I install the GPGS plugin, then the admob plugin, they have some sort of issue working properly, but if I install them separately I can get them to work. It seems that if I keep the older version of the play services resolver that comes with those two packages, the game will build and let me upload an APK to the app store, but if I then download lunar mobile console, and try to debug whats going on directly from the device, it causes the app to crash on startup.

    When I run ADB with this command:
    adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG

    I get this in the logs at start:
    Code (ADB LOG):
    1. 04-22 10:09:18.003  1776  3593 I ActivityManager: Start proc 4278:com.NinjeticStudios.TeleportTap/u0a287 for activity com.NinjeticStudios.TeleportTap/com.unity3d.player.UnityPlayerActivity
    2. 04-22 10:09:18.043  1776  4090 I ActivityManager: DSS on for com.NinjeticStudios.TeleportTap and scale is 0.75
    3. 04-22 10:09:18.103  1776  4090 D ActivityManager:  Launching com.NinjeticStudios.TeleportTap, updated priority
    4. 04-22 10:09:18.233  1776  3220 W ActivityManager:   Force finishing activity com.NinjeticStudios.TeleportTap/com.unity3d.player.UnityPlayerActivity
    5. 04-22 10:09:18.763  1776  2001 W ActivityManager: Activity pause timeout for ActivityRecord{bda732f u0 com.NinjeticStudios.TeleportTap/com.unity3d.player.UnityPlayerActivity t80 f}
    6. 04-22 10:09:18.833  1776  3973 D ActivityManager: post active user change for 0 fullscreen true isFloatingActivity() false isHomeActivity() true
    7. 04-22 10:09:18.863  1776  3730 I ActivityManager: Killing 2257:com.sec.android.app.popupuireceiver/1000 (adj 15): DHA:empty #31
    8. 04-22 10:09:18.913  1776  2720 D ActivityManager: cleanUpApplicationRecord -- 2257
    9. 04-22 10:09:18.913  1776  2720 D ActivityManager: isAutoRunBlockedApp:: com.sec.android.app.popupuireceiver, Auto Run ON
    10. 04-22 10:09:19.273  1776  2130 D ActivityManager: mDVFSHelper.release()
    This is on a Samsung Galaxy Note 4, T Mobile version, with Android 6.0.1 - But I seem to get this same crash on any device. If you try and install both those google plugins, I found that in Unity 2018.2.21f1 I had to stop the resolver from updating past these versions:


    Do you think there is anything I can do to get the lunar console plugin to work properly with these other two finicky plugins?
     
  48. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,628
    Here for an update to my problem - I gave up! I couldn't seem to get lunar working, and I even tried another free alternative, and it also did not work. Probably because of the complexity of trying to get all that debug info out of the unity engine.... and onto the screen lol.

    Wrote this, if anybody has similar problems, here it be:
    Code (CSharp):
    1. using System.Collections;
    2. using System.Collections.Generic;
    3. using UnityEngine;
    4.  
    5. public class DebugHandler : MonoBehaviour
    6. {
    7.     // reports custom debug information on builds, including release builds
    8.     public static DebugHandler Instance; // a static instance of the script to be called from other scripts (decoupled)
    9.     public UnityEngine.UI.Text DebugUIText; // assign in inspector
    10.  
    11.     private void Start()
    12.     {
    13.         Instance = this;
    14.     }
    15.  
    16.     public void Info(string info)
    17.     {
    18.         Debug.Log(info); // log to the standard unity console for whatever reason
    19.         DebugUIText.color = Color.white;
    20.         DebugUIText.text = info; // log to the debug UI
    21.         if (!DebugUIText.gameObject.activeSelf)
    22.             DebugUIText.gameObject.SetActive(true);
    23.     }
    24.  
    25.     public void Error(string error)
    26.     {
    27.         Debug.LogError(error); // log to the standard unity console for whatever reason
    28.         DebugUIText.color = Color.red;
    29.         DebugUIText.text = error; // log to the debug UI
    30.         if (!DebugUIText.gameObject.activeSelf)
    31.             DebugUIText.gameObject.SetActive(true);
    32.     }
    33.  
    34.     public void Warning(string warning)
    35.     {
    36.         Debug.LogWarning(warning); // log to the standard unity console for whatever reason
    37.         DebugUIText.color = Color.yellow;
    38.         DebugUIText.text = warning; // log to the debug UI
    39.         if (!DebugUIText.gameObject.activeSelf)
    40.             DebugUIText.gameObject.SetActive(true);
    41.     }
    42. }
     
  49. Egil-Sandfeld

    Egil-Sandfeld

    Joined:
    Oct 8, 2012
    Posts:
    72
    Hey, loving LunarConsole! I want to automate it into non-release builds, but I can't seem to make it enable / disable LunarConsole. I want to do it from an editor script in Unity:

    Code (CSharp):
    1.  
    2. ProcessStartInfo startInfo = new ProcessStartInfo(EditorApplication.applicationPath, "-quit -batchmode -executeMethod LunarConsolePluginInternal.Installer.DisablePlugin");
    3.  
    4. Process process = new Process();
    5. process.StartInfo = startInfo;
    6. process.Start();
    7. process.WaitForExit();
    This doesn't do anything. If I execute the disable_lunar_console.sh in Automation folder by double clicking nothing happens as well.

    On Free version, 1.6.2
     
  50. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey @Egil-Sandfeld, sorry for the late response (traveling Europe rn)

    The easiest way to do that in the editor script:

    Disable:
    Code (CSharp):
    1. EditorApplication.ExecuteMenuItem("Window/Lunar Mobile Console/Disable");
    Enable:
    Code (CSharp):
    1. EditorApplication.ExecuteMenuItem("Window/Lunar Mobile Console/Enable");
    Or
    Code (CSharp):
    1. LunarConsolePluginEditorHelper.SetLunarConsoleEnabled(flag)
    Don't forget to rate the plugin on the Asset Store if you find it useful!
     
    MD_Reptile likes this.
unityunity