Search Unity

[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. Egil-Sandfeld

    Egil-Sandfeld

    Joined:
    Oct 8, 2012
    Posts:
    72
    Yes that works fine, thank you :)
     
  2. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Great!

    Please, don't forget to rate and review the plug-in in the Asset Store if you found it useful?
     
  3. nicloay

    nicloay

    Joined:
    Jul 11, 2012
    Posts:
    540
    Can someone please explain what's the "Target" here
    Code (CSharp):
    1. Listening For Variable Changes
    2.  
    3. You can register delegates and get notified whenever the value is changed:
    4.  
    5. myVar.AddDelegate((value) => {
    6.     Debug.Log("New value is " + value);
    7. });
    8.  
    9. Don't forget to remove the delegate to avoid memory leaks (would be changed to weak references in the future)
    10.  
    11. myVar.RemoveDelegates(target);
    12.  
    Thanks
     
  4. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    nicloay likes this.
  5. HarrisonShort

    HarrisonShort

    Joined:
    Sep 6, 2018
    Posts:
    1
    Hi @weeeBox,

    My team has been using Lunar Console for a while now and have been loving it, thanks for your work on it!

    We've recently set up Unity Cloud Build, which has provided it's own set of hurdles, and have followed your tutorial on setting up Lunar Console with UCB. We were getting close to having our iOS builds set up (Android work with no issue), but kept running into an issue with XCode involving "Undefined symbols for architecture arm64." After disabling LunarConsole (and having a successful build right after that), I decided to dive a little deeper.

    Code (CSharp):
    1. 18510:;  Undefined symbols for architecture arm64
    2. 18511: > Symbol: ___lunar_console_destroy
    3. 18512: > Referenced from: _PlatformIOS___lunar_console_destroy_m18D0AAE6ED262912AA321F886D0F60CA057396A9 in Bulk_Assembly-CSharp-firstpass_4.o
    4. 18513:;  ld: symbol(s) not found for architecture arm64
    5. 18514:;  clang: error:
    6. 18515: ** ARCHIVE FAILED **
    7. 18516: The following build commands failed:
    As you can see above, there is an issue with ___lunar_console_destroy, so I found this code, commented it out, re-enabled Lunar Console and ran another build, which succeeded! And furthermore, it appears as if LC is working as expected!

    So I was just wondering what you recommend doing here, as we don't want to be potentially breaking functionality of Lunar Console. Have you come across this issue before? I've not worked with many native plug-ins in the past, so my apologies if I'm missing something obvious. I can't speak for anyone else on my team but I'd also like to know more about this issue with symbols, instead of just commenting something out and moving on, ahaha. Annoyingly, this issue does not come up during local builds, it only happens on UCB.

    We are using:
    Unity 2018.4.2
    XCode 10.2.0
    Latest Version of Lunar Console (to my knowledge)

    Hope to hear back soon. Thank you!
    - Harrison
     
  6. BQT

    BQT

    Joined:
    Dec 20, 2018
    Posts:
    6
    Hi,
    can use this in unity also?
    can i see lunar console while run my game on unity?
     
  7. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    No, you would just use the normal editor console while using the editor, because this would provide no further functionality.
     
  8. noora-sq

    noora-sq

    Joined:
    Mar 13, 2019
    Posts:
    1
    I am also getting this error on importing the package from the asset store:

    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.

    I've tried reimporting a couple of times but keep getting the same error.

    However if I build to Android, everything works fine except the console reads "Lunar Console v?.?.?". The first time I built to Android the console was empty but the second time it was magically working - so if anyone else has this problem, just try again.

    I'm running Unity 2019.2.0f1-
     
  9. yogi_kenobi

    yogi_kenobi

    Joined:
    May 24, 2017
    Posts:
    23
    I purchased the Pro version but I can't figure out where to enable transparency. On the settings dialog on device there is only 'Enabled', 'Max visible Lines' and 'Timeout' options on 'Log Overlay' part. Can't find anywhere the transparency setting.
     
    trungvt1690 likes this.
  10. AAK_Lebanon

    AAK_Lebanon

    Joined:
    May 30, 2015
    Posts:
    77
    Hi, I am building an XCode project on windows and copy it to a mac, but I always get this error on xcode when I try to publish to my iPhone:

    CopyPNGFile /Users/aaklebanon/Library/Developer/Xcode/DerivedData/Unity-iPhone-chccauorzfcqavbulauiiyjcwtod/Build/Products/ReleaseForRunning-iphoneos/samples.app/lunar_console_resize_handle_vertical@3x.png /Users/aaklebanon/Assets/LunarConsole/Editor/iOS/Common/Images/lunar_console_resize_handle_vertical@3x.png (in target: Unity-iPhone)
    cd /Users/aaklebanon/Desktop/iOS
    export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer
    export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk
    export TOOLCHAINS=
    /Applications/Xcode.app/Contents/Developer/usr/bin/copypng -compress -strip-PNG-text /Users/aaklebanon/Assets/LunarConsole/Editor/iOS/Common/Images/lunar_console_resize_handle_vertical@3x.png /Users/aaklebanon/Library/Developer/Xcode/DerivedData/Unity-iPhone-chccauorzfcqavbulauiiyjcwtod/Build/Products/ReleaseForRunning-iphoneos/samples.app/lunar_console_resize_handle_vertical@3x.png

    error: Build input file cannot be found: '/Users/aaklebanon/Assets/LunarConsole/Editor/iOS/Common/Images/lunar_console_resize_handle_vertical@3x.png'

    UPDATE: I have found the solution, it was mentioned in the wiki troubleshooting page, just add this define to your project: LUNAR_CONSOLE_EXPORT_IOS_FILES.
     
    Last edited: Sep 11, 2019
  11. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
  12. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    748
    @weeeBox is there any way to get a hold of the full log file or an array of all the collected lines so that I can attach it to my bug reports? I currently only record unity logs but would love to grab lunarconsole's logs so it includes native message too.
     
  13. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey @trooper, at this point the plugin only collects logs from Unity
     
  14. trooper

    trooper

    Joined:
    Aug 21, 2009
    Posts:
    748
    Understood, I read the description wrong :)
     
  15. weeeBox

    weeeBox

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

    Fixes:

    • Unity 2019.3b incompatibility fix.
     
  16. sathya

    sathya

    Joined:
    Jul 30, 2012
    Posts:
    297
    @weeeBox
    Any clue why this happens when importing the package?
    Unity 2019.2.0

    Code (CSharp):
    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:39)
    5. UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes(Type[])
    6.  
     
  17. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey @sathya, this is fixed in the upcoming v1.6.3 release (still pending - should go live anytime now)
     
    sathya likes this.
  18. novaVision

    novaVision

    Joined:
    Nov 9, 2014
    Posts:
    518
    Are you planning to improve log file format sent by email? Some other assets use html format with expandable stack trace and pretty view as Unity Editor Console has. Would be great if you add it to paid version
     
  19. weeeBox

    weeeBox

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

    Yes, this is on the roadmap. Feel free to create a GitHub issue.
     
  20. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
  21. FKInno

    FKInno

    Joined:
    Dec 13, 2017
    Posts:
    7
    Any update on the release of the 1.6.3 PRO version in the asset store?
     
  22. weeeBox

    weeeBox

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

    weeeBox

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

    Fixes:

    • Unity 2020.x incompatibility fix.

    @FKInno, I went back and forth with Unity Asset Store support team but they've never published 1.6.3 update. Submitted 1.6.4 (fingers and toes crossed)
     
  24. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
  25. justinl

    justinl

    Joined:
    Aug 27, 2012
    Posts:
    58
    @weeeBox I'm working on a VR project for Oculus Quest. Is there a way to simply have the lunar console display in 3D space instead of ScreenSpace? Essentially I'd like to have the log on some plane rendering in 3D space. I don't necessarily need all the functionality to interact with it, but just to be able to view logs while in game would be fantastic. I'm happy to purchase the PRO version as well.
     
  26. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @justinl, I haven't tried to run it with Oculus (got not hardware). The plugin itself uses native Android UI and renders in 2d window so not sure if that's currently possible.
     
  27. justinl

    justinl

    Joined:
    Aug 27, 2012
    Posts:
    58
    Good to know. Thanks!
     
  28. litebox

    litebox

    Joined:
    Aug 29, 2011
    Posts:
    158
    Hi, I use Lunar Mobile Console Pro for few months and it is very good. The only thing I cannot figure out, is how to get rid of warnings "[Lunar Mobile Console] Can't register action: plugin is disabled".
    I use this approach: Console is enabled for dev-branch of my app and utilises next logic for cheats:
    Code (CSharp):
    1. private void Awake()
    2.         {
    3.             LunarConsole.RegisterAction("Show InterstitialAds", ShowInterstitialAds);
    4.             LunarConsole.RegisterAction("Show RewardedAds", ShowRewardedAds);
    5.             LunarConsole.RegisterAction("Open Next Level", OpenNextLevel);
    6.             LunarConsole.RegisterAction("Reset Progress", ResetProgress);
    7.         }
    It works pretty good until I create release-branch where I Disable Console. After this I start getting warnings in Unity Editor and in app Analytics.
    I was looking for some variable inside LunarConsole class like IsEnabled or something but didn't find. Also I tried to utilise this approach:
    Code (CSharp):
    1. private void Awake()
    2.         {
    3. #if LUNAR_CONSOLE_ENABLED
    4.             LunarConsole.RegisterAction("Show InterstitialAds", ShowInterstitialAds);
    5.             LunarConsole.RegisterAction("Show RewardedAds", ShowRewardedAds);
    6.             LunarConsole.RegisterAction("Open Next Level", OpenNextLevel);
    7.             LunarConsole.RegisterAction("Reset Progress", ResetProgress);
    8. #endif
    9.         }
    But somewhy LUNAR_CONSOLE_ENABLED / LUNAR_CONSOLE_DISABLED is not visible in scope of Assets/Scripts folder.

    Any ideas how to achieve this?
    Cheers
     
  29. hundred_hands

    hundred_hands

    Joined:
    Sep 11, 2019
    Posts:
    7
    Hey @weeeBox
    I use the latest version of Lunar Mobile Console FREE and I have a problem.
    I can’t show Console in Editor mode.
    I tried to use:
    Code (CSharp):
    1. LunarConsolePlugin.LunarConsole.Show();
    But PlatformEditor doesn't have any code for showing console.
    How does it work?
     
  30. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    The console shows on iOS/Android devices
     
  31. IggyZuk

    IggyZuk

    Joined:
    Jan 17, 2015
    Posts:
    43
    Hey @weeeBox, is it okay to move LunarConsole folder to the Plugins folder? Or best to leave it in the Assets root?
     
  32. weeeBox

    weeeBox

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

    You can place it anywhere inside Assets folder.

    p.s. don't forget to rate and review the plugin if you find it useful!
     
    IggyZuk likes this.
  33. SkySupra

    SkySupra

    Joined:
    Jun 22, 2014
    Posts:
    8
    Hello @weeeBox. Will this work if the LunarConsole is put into a package and downloaded via npm? Maybe not, because scripts try to edit readonly files (eg. AndroidPlugin.cs).
     
  34. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @SkySupra, I haven't tried it yet but most likely won't work since the plugin modifies it's own files
     
    SkySupra likes this.
  35. ExcaliburGames

    ExcaliburGames

    Joined:
    Oct 29, 2013
    Posts:
    50
    Hello @weeeBox

    Thanks for a great asset, but I have one question about Variables.
    So when Console opens I want to set actual values for console variables. For this, I used event LunarConsolePlugin.LunarConsole.onConsoleOpened

    But when console opens I see default values, not actual.

    Code (CSharp):
    1.  
    2. private void Start()
    3. {
    4.    LunarConsolePlugin.LunarConsole.onConsoleOpened += OnConsoleOpened;
    5.    LunarConsolePlugin.LunarConsole.onConsoleClosed += OnConsoleClosed;
    6.  
    7.    foreach (CVar cvar in m_variables)
    8.    {
    9.       cvar.AddDelegate(OnVariableChanged);
    10.    }
    11. }
    12.  
    13. private void OnConsoleOpened()
    14. {
    15.    Debug.Log("Console open");
    16.    m_variables[0].Value = GetCurrentLevelId().ToString();
    17.    m_variables[1].Value = GetGems().ToString();
    18. }
    19.  
     
  36. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hi, thanks!

    Did you register your variables in a class with [CVarContainer] attribute?
     
  37. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @ExcaliburGames, I found the issue: originally variables were designed to be constant and only get updated via UI on mobile phone. As the time passed, this was changed and a bug was introduced (as I just discovered). Give me a couple of moments to make a fix. Sorry for the inconvenience!
     
  38. ExcaliburGames

    ExcaliburGames

    Joined:
    Oct 29, 2013
    Posts:
    50
    Hi @weeeBox Thank you so fast reaction! Will be happy if you help me =)
     
  39. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @ExcaliburGames, please, find hotfix attached. Let me know if it works for you!
     

    Attached Files:

  40. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Make sure you are using the latest plugin version (1.8.0) before applying the hotfix.
     
  41. ExcaliburGames

    ExcaliburGames

    Joined:
    Oct 29, 2013
    Posts:
    50
    Hi @weeeBox yes it's working! Thank you so mutch!
     
  42. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @ExcaliburGames, sure thing! Sorry for the issue!

    p.s. don't forget to rate and review the plugin if you find it useful - I would really appreciate that.
     
  43. ExcaliburGames

    ExcaliburGames

    Joined:
    Oct 29, 2013
    Posts:
    50
    Hi @weeeBox
    I have a very strange problem with asset, How I can remove it from the project?
    I removed prefab, Disabled from editor, removed all related files, rolled back to version before installing asset , but still when I build it I can see new created lunar-mobile-console-variables.bin file with some data on android device?
     
  44. weeeBox

    weeeBox

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

    ExcaliburGames

    Joined:
    Oct 29, 2013
    Posts:
    50
    Hi @weeeBox "build output folder" - you mean folder where a new apk file created?
     
  46. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    @ExcaliburGames, sorry for the late reply: I thought, I've replied already.

    You can find your build folder here: <ProjectDir>/Temp/gradleOut
     
  47. trungvt1690

    trungvt1690

    Joined:
    Jul 30, 2018
    Posts:
    2
    How can I change background of feature "Log Overlay" to "transparency"?
    I use unity 2019.2.21 + LunarConsolePro 1.6.6, my phone is ASUS_X00DD, android 8.1.0
    (Your demo apk from GooglePlay is working fine on my phone.)
     

    Attached Files:

  48. weeeBox

    weeeBox

    Joined:
    Jun 2, 2014
    Posts:
    271
    Hey @trungvt1690, you can change background color in LunarConsole prefab settings (see attached screenshot)
     

    Attached Files:

    trungvt1690 likes this.
  49. trungvt1690

    trungvt1690

    Joined:
    Jul 30, 2018
    Posts:
    2
    Thank, I found my problem.
     
  50. Gleb_Palchin

    Gleb_Palchin

    Joined:
    Jan 7, 2016
    Posts:
    22
    Hey @weeeBox,
    Great Asset!

    Do you have any plans to add some sorting or grouping feature for Actions and Variables?

    Or at least a very very usefull feature to create combos of variable + button:
    Ex. I have to create a few cheats, to add money and set some level of some skills, it would be perfect to have the input field aligned with the button so I don't have to search the field in the variables list and then back to the methods to search the one that applies the value.

    EDIT:
    I am trying to reset the variables from code, for example this scenario:
    Set the variable "Money" to whatever value you need, press ok, the money will be added via delegate option, and reset the variable to 0 for the next use.

    Now I set the value to 0 from code but it doesn't update :..(
     
    Last edited: Oct 27, 2020