SpaceMadness / lunar-unity-console

High-performance Unity iOS/Android logger built with native platform UI
https://www.assetstore.unity3d.com/en/#!/content/43800
Other
839 stars 114 forks source link

Lunar uses variables cache #127

Closed senkal closed 5 years ago

senkal commented 5 years ago

Hi, I am not sure if somebody else encounter this "problem" but I couldn't find anything in the docs or issues. In general, looks like Lunar Console caches user variables in a way which is confusing, to me at least.

What do I mean?

  1. Create Lunar variable "playerSpeed".
  2. Everything works I can edit it on my Android, awesome.
  3. For any reason I don't want to expose this variable to Lunar console any more, so I remove it from variables and callbacks code.
  4. I deploy modified Lunar script, and somehow, variables are still set from last Lunar values on device. Even if it's not in the Lunar variables/callbacks code any more it is still used, don't know it works. Probably something with serializing.
  5. What helps is clearing app cache on Android, this removes this "caching" effect.

I spent some time trying to figure it out why some parameters are changed even if they are not in the Lunar console code and I think that is the case.

Does it make sense at all?

weeeBox commented 5 years ago

Hey @senkal,

Sorry for the issue. I'll take a closer look.

senkal commented 5 years ago

Thanks @weeeBox for fast answer. If you won't be able to replicate the issue let me know, will try to be as useful as possible. Good luck.

weeeBox commented 5 years ago

Thanks! I really appreciate that!

weeeBox commented 5 years ago

Hey @senkal,

I'm not able to reproduce the issue. Once I remove a variable - it's gone from the UI.

Would you be able to share a test project?

-Alex

senkal commented 5 years ago

Hi @weeeBox My fault, didn't describe it well. So the removed variables are removed from UI, that is not the problem I encounter. The problem is, even if variables are no in UI and not in the code, they are still somehow applied.

Before you check this give me a week or so will try to create a simple project where this can be replicated.

weeeBox commented 5 years ago

Hey @senkal,

I'm not 100% sure about this part

they are still somehow applied

senkal commented 5 years ago

Agree, looks really weird. I am not sure how this could work. Need some time to separate the issue.

weeeBox commented 5 years ago

More information would definitely help troubleshooting!

senkal commented 5 years ago

So in the end it didn't make sense. After more digging I think I found the issue and wasn't strictly related to Lunar Console, more to invalid way I used it. I mixed some Awake/Start order in my project. I think it's ok to close this issue, in the end there was no issue to begin with.

Sorry for confusion.

weeeBox commented 5 years ago

Glad you were able to figure this out! Don't forget to rate and review the plugin if you find it useful!

senkal commented 5 years ago

@weeeBox I already did(5/5), so don't worry :)