Search Unity

Uni2LwP : Create Live Wallpapers with Unity 3.4.2 /3.5.7/ 4.0/4.0.1

Discussion in 'Assets and Asset Store' started by shinx, Feb 28, 2013.

Thread Status:
Not open for further replies.
  1. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,

    Yes, it works. Already tested Unity 4.0.1 with Uni2LwP on my Nexus 5 running Android Lollipop (stock rom).

    Best regards,
    Shinx
     
  2. MadOx

    MadOx

    Joined:
    Mar 8, 2014
    Posts:
    2
  3. akuczera

    akuczera

    Joined:
    Feb 13, 2014
    Posts:
    15
    I recently switched to Android Studio. Could you please update your plugin for an AS export?
     
  4. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,

    It's on my to-do list but for now only Eclipse is supported. It requires a lot of changes including changing some code inside the Uni2LwP main library file (already tested it with Android Studio and it doesn't work). There is also the issue with the Tutorials because all of them are for Eclipse and even though the code is the same, the tutorials still need to be updated :(

    However, I will eventually update Uni2LwP main library file to be compatible because Eclipse ADT is no longer being updated. Last version is 23.0.4 (October 2014).

    Best regards,
    Shinx
     
  5. akuczera

    akuczera

    Joined:
    Feb 13, 2014
    Posts:
    15
    Thank you very much!
     
  6. Kanzler

    Kanzler

    Joined:
    Jun 14, 2014
    Posts:
    4
  7. mr2miach

    mr2miach

    Joined:
    Jan 8, 2015
    Posts:
    2
    EDIT: Figured out the issue. I needed to copy the folder 17.0.0 from inside build-tools and paste into the parent directory (sdk) so it is on the same level as build-tools. Then rename platform-tools folder to platform-tools-old and then rename 17.0.0 folder to platform-tools. This forces Unity to use the now renamed 17.0.0 folder and use the tools inside. Problem solved!

    Posted this in case anyone else has the same problem and doesn't understand how others posted the fix.


    Hello all,

    The last few days I have been trying to make my Live Wallpaper but have run into some snags.

    I am unable to export my creation to an Android App and keep getting the same error.

    Error building Player: Exception: android (invokation failed) ERROR: unknown error cmd:android list target -c stdout; stderr: Exception in thread "main" java.lang.NullPointerException at SDKMain.main(SDKMain.java:62)

    I have google searched this countless number of times and tried everything others have claimed to have fixed this. The only common denominator they all have is nobody lists exactly which version of each software they are using.

    So my question is. I want to use Unity 4.0.1 along with Uni2LWP plugin but what Java JDK and Android SDK do I need installed? I am running Windows 7 Ultimate 64bit all up to date. I have tried Java 6 all the way to 8. Countless versions of Android SDK and even fell back to Unity 3.5.7 and still no luck. The only thing that works is Unity 4.6.1 with the most recent build of Android SDK along side Java 8. This of course doesn't work for Uni2LWP.

    So can someone just list the exact versions I need so I can stop receiving the error and properly export my app?

    Thank you in advance,
    Patrick
     
    Last edited: Jan 18, 2015
  8. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello,

    Please contact me and I will help you fix that issue.

    Edit: You already fixed it :)

    Best regards,
    Shinx
     
  9. mr2miach

    mr2miach

    Joined:
    Jan 8, 2015
    Posts:
    2
    Thank you for posting a reply. And yes, I figured it out. I apparently was making things more difficult for myself than needed. :) Very nice to know, you are willing to support a user that is having a problem, that does not directly involve your awesome plugin. Thanks again!
     
  10. Manjesh

    Manjesh

    Joined:
    Jan 4, 2015
    Posts:
    1
    Hi shinx
    I just bought your plugin through credit card. Please check and send me the package, thanks. [p. manjeshyadav@gmail.com]
     
  11. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello,

    Please check you email.

    Best regards,
    Shinx
     
  12. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Hello shinx,

    is there any chance that future Unity versions will support the Live Wallpaper service again?

    Are there any big problems with Unity 4.0.1 and Android compiling? I've heard that quite a lot happened to the mobile compiler since 4.0.1 and I want to know If the wallpapers will run reliably. Can you suggest some wallpapers that were made with your plugin that I can try over the Play store? :)

    Best,
    monogon
     
  13. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello,

    That depends entirely on Unity. All we can do is ask Unity to reinstate the support for Live Wallpapers.

    Yes, it's even compatible with the latest Android sdk(5.0). You can search this thread for several links for live wallpapers that were published on Google Play (almost every page has a few links :) ).

    Best regards,
    Shinx
     
    Last edited: Feb 7, 2015
  14. uhbygvtfcr

    uhbygvtfcr

    Joined:
    Jan 29, 2015
    Posts:
    9
    Can one use playmaker in designing the scenes?
     
  15. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello,

    I don’t have Playmaker asset therefore I can’t give you a 100% certainty but it should work although not every feature that Playmaker has. Everything related to touch event won’t work because we can’t use Unity native coordinates (touch) with Live Wallpapers. However, the other features should work fine.

    Best regards,
    Shinx
     
  16. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    245
    I guess it won't work, but have you taken a look already to Unity 5 to see if Uni2LWP can work with it?
     
  17. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,

    Still doesn't work. Unity hasn't changed anything yet...

    Best regards,
    Shinx
     
  18. Trisibo

    Trisibo

    Joined:
    Nov 1, 2010
    Posts:
    245
  19. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Hello Shinx,

    right now I have problems adding libraries to my projects (colorpicker). See here:
    http://stackoverflow.com/questions/...aries-built-apk-crashes-with-inflateexception

    This project has been built before and worked perfectly fine. However, I had to rebuild my eclipse workspace from backups and now I get these errors... :( I don't know why I can't get this library to work right now.

    I want to try upgrading my sdk tools but wanted to ask you beforehand which version will work with Uni2Lwp?
    And now that eclipse is not officially supported anymore, can I update without problems to SDK Tools 24.1.2?

    Thanks!
     
  20. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello,

    Yes, you can install to the lastest versions of SDK tools. I have a small tutorial that fixes the incompatibility issue between Unity and that version of SDK tools. Please contact me using this form.

    Best regards,
    Shinx
     
    Last edited: Mar 6, 2015
  21. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Done.! Thanks. :)=
     
  22. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Hello Shinx,

    how can I safely restart the Live Wallpaper?
    What I mean is when the live wallpaper is already set and we pick it again in the live wallpaper chooser in Android it inevitably crashes. So far I figured out that this is correlated to "public Engine onCreateEngine()". I guess a new engine gets created without properly quitting the old one.
    Can we check if there is already an engine, then safely remove it and load the new engine so that the application does not crash? I tried saving the engine in a private variable and returning it again when it is already set, however this did not work ...

    I think it is very unconvenient for the user to deal with crashing applications. :-/

    Thank you!

    Edit: Just saw that this is a known issue... So it is not going to be fixed anytime soon I think. :(
     
    Last edited: Mar 17, 2015
  23. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,

    Yes it's an known issue and as far as I know it's not possible to safely restart Unity engine. The player.quit() method can’t be used to do that because they added one line of code that kills the process itself. Unity doesn't just release resources… they actually kill the entire process this destroying the live wallpaper service.

    Best regards,
    Shinx
     
  24. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82

    Ok... Maybe Unity reestablishes LIve wallpaper support in the future which might fix this issue... :-/

    But what I noticed (maybe it helps):
    When you are in the live wallpaper picker and select a Uni2Lwp live wallpaper, then rotate the device (from landscape to portrait or vice versa), Android restarts the live wallpaper without crashing!! So it has to be possible to do this from the app itself, doesn't it?

    Also I have two other issues which I could need some help with:
    1)
    I am getting this error when changing Unity scenes in my live wallpaper sporadically (not all the time; but from time to time):
    Code (CSharp):
    1. Incorrectly called buildLayer on View: lh, destroying layer...
    It then freezes the Unity player until manually killing it in the task manager... So very annoying and "app-breaking" ...

    Do you know what causes this maybe?

    Edit: SOLVED ... this was caused by having to many objects in scene on scene load (120+). I now instantiate them after loading the scene and this resolved the issue.
    Number 2 is still an issue though:


    2)
    I am getting tons of these errors on start up:
    Code (CSharp):
    1. <qeglDrvAPI_eglGetConfigAttrib:638>: EGL_BAD_ATTRIBUTE
    2.  
    Like 30-40 times in a row... Do you know what this is? It does not seem to influence the behaviour of the live wallpaper (hopefully) but I would like to figure it out before deploying the app...

    THANK YOU.
     
    Last edited: Mar 17, 2015
  25. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,

    The warning message (EGL_BAD_ATTRIBUTE) usually appears on adreno-based devices and it's usually some incompatibility with shaders. It can also be just warnings being reported when the GPUs capabilities are enumerated and some drivers don't support specific EGL attribute constants. Don't worry about this :)


    Best regards,
    Shinx
     
  26. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Thank you. :)

    And what about this?
    Doesn't it have to be possible to restart without crashing then? Android does it in the wallpaper chooser when switching orientation mode.
     
  27. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,

    If I'm not mistaken that new "feature" only happens after Android 4.4 (Kitkat) and not on previous versions of Android. it's also handled by Android OS and I haven't found any code that would allow us to implement that ourselves.

    Best regards,
    Shinx
     
  28. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Hey @shinx

    Why is it that the opening of the settings screen after doing a double tap takes a while? Sometimes it takes 3 - 4 seconds after the double tap which is awefully long.
    Actually it took me a while to notice that it is still opening. At first I thought the double tap feature was just plain broken as it did not respond but in fact it does respond, just very slowly...

    It's "double tap" 1 ... 2 ... 3 ... "Settings screen opens".

    I am using your standard implementation of the gesture detector by the way.

    Thanks.

    monogon

    Edit:
    This is my log when it happens.
    It confuses me that after the first START in the Activity Manager the request is stopped again:
    Is there anything I could do about this? 3-4 seconds after the double tap is very unresponsive for a settings screen... :-/

    Edit 2:
    Ok I found the answer but not a workaround, yet. So it definitely happens when exiting the Settings Screen with the home button and trying to reopen it with double tap.
    https://code.google.com/p/android/issues/detail?id=4536

    Edit 3:
    A workaround does not seem to be possible without requiring the user to root the phone because this is an Android "feature" to prevent malicious apps to reopen again after the user pressed the home button. :(
     
    Last edited: Apr 11, 2015
  29. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi monogon,

    You are correct and as far as I know there is no workaround without having to root the device.

    Best regards,
    Shinx
     
  30. akuczera

    akuczera

    Joined:
    Feb 13, 2014
    Posts:
    15
    Hi!
    Any news about Android Studio export?
     
  31. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Ok, thanks. I hope it does not bother the user too much.

    Another question: I want to deploy a full version as well as a free version of my lwp. Therefore I will copy the live wallpaper folder and change the package names. As I am having quite a lot of classes and references this is an annoying task and I only want to do it once.
    So in the future I'd like to update my free version manually (not with your Unity LWP menu button).
    Say I just updated the normal version via your Unity menu, could you please explain which folders and files I would need to copy over to my free free version folder in order to update this eclipse project with the newest Unity stuff? ;)

    Thanks!
     
  32. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,

    Android studio fails to read uni2lwp inner classes. Still haven't found a way to fix this :( . For now only Eclipse is supported.

    The files and folders that you need to copy are the ones related to Unity. They are located inside your live wallpaper project in 'AndroidLWP\DemoTest\assets'. Copy the bin folder to the free version.

    Best regards,
    Shinx
     
    exitsimulation likes this.
  33. uhbygvtfcr

    uhbygvtfcr

    Joined:
    Jan 29, 2015
    Posts:
    9
    hello shinx,

    when i tried to update the application,here by update i mean the version update of an existing application),only by changing the code in eclipse along with the version code etc,the wallpaper hangs at the splashscreen when installed,do i have to also change the version code etc in the unity editor also,or is there someother problem?
    also is there a way to add a seek bar preference,and also remove the app icon from the launcher after installation?
     
  34. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello,
    To update the live wallpaper (version update) all you need to do is change the version code and name located in the AndroidManifest.xml file. You don't need to change anything inside Unity related to version code.
    Have you check Eclipse logcat to see exactly what's happening? Please contact me by email and maybe I can help you.

    Unfortunately I don’t have any tutorial for seek bar preference but you can check this one to get you started: http://webtutsdepot.com/2011/12/03/android-sdk-tutorial-seekbar-example/

    Uni2LwP doesn't automatically add any app icon to the launcher after installation. If you have it, then it probably means that you have followed the tutorial called "Tutorial Add App Icon to Settings" that I previously sent you. Just reverse the order of the tutorial and remove the code that you have added.

    Best regards,
    Shinx
     
  35. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    @shinx
    I have problems activating Anti Aliasing. I saw in you Daydream thread that you fixed this issue for this plugin. Is it possible that it needs a fix for Uni2lwp too?
    In my quality settings I have anti aliasing set to 4x multisampling. It does work in the editor but not in the deployed app.

    Do you have an idea how to fix this?
     
  36. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello,

    Unfortunately no. Anti-Aliasing is "handled" by Unity and not by Uni2Daydream or Uni2LwP. I have already spent a few days on this before and I couldn't figure why it works on Daydream services and not on live wallpapers :(
    Let me try again this weekend and I will let you know if I find anything.

    Best regards,
    Shinx
     
  37. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Ok, thanks for the heads-up. Unfortunately my live wallpaper looks really jagged on tablets and anti aliasing would really make a difference.
    Would be great if you tried again. Thanks very much!
     
  38. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    How could we make a petition or something to Unity devs so they enable the live wallpaper features again?
    Live wallpapers would be a really great way for Unity also, to show off their engine.
    Maybe they aren't aware of this change and someone has to point them?
     
  39. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Yes, nobody understands it... Using Unity 5.1 for LWPs would be amazing! I really hope this hapens at some point in the Unity 5 product cycle.
    There is this vote however and so far Unity does not seem to bother:
    http://feedback.unity3d.com/suggestions/reinstate-support-for-android-live-wallpapers
     
  40. johnnydj

    johnnydj

    Joined:
    Apr 20, 2012
    Posts:
    211
    thanks for that link. I also threw in my votes there because I would like to see this feature coming back.
     
  41. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
  42. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,
    No changes. Still not working.

    Best regards,
    Shinx
     
  43. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Ok thanks for checking it though. Some day it will be working again! I still want to believe it. ;)
     
  44. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    @shinx

    Please take a look at this implementation of multisampling:
    https://code.google.com/p/gdc2011-a...ample/gdc11/MultisampleConfigChooser.java?r=2

    It describes how to choose the right OpenGL config for enabling multisampling.

    Also in the WallpaperEngine class i noticed that you assign RGB_565 mode which has no alpha (which would be the fourth value in the parameters):
    Code (CSharp):
    1. setEGLConfigChooser(new ConfigChooser(5, 6, 5, 0, 16, 0));
    In my understanding multisampling needs alpha to work, doesn't it? So I tried assigning another Config there:
    Code (CSharp):
    1. setEGLConfigChooser(new ConfigChooser(8, 8, 8, 8, 16, 0));
    This worked but still no anti-aliasing.

    I would really appreciate if you'd check out the multi sampling config chooser above, though. It would be awesome to have anti-aliasing.

    Hope this helps!

    Best,
    monogon
     
  45. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello,

    Thank you for the link but I have already tried that one and many others :( . I have even changed the code and replaced my class with that one but it still doesn't work. I have also tried every combination for the Config but still nothing.
    Changing the ConfigChooser only fixes colour banding for some devices so if anyone has issues with colors you can use:
    Code (CSharp):
    1. setEGLConfigChooser(new ConfigChooser(8, 8, 8, 8, 16, 0));
    or
    Code (CSharp):
    1. setEGLConfigChooser(new ConfigChooser(8, 8, 8, 8, 24, 0));
    Regarding anti-aliasing unfortunately everything is still the same. Works on Daydream services but not on Live Wallpapers :(

    Best regards,
    Shinx
     
  46. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hello everyone,

    Uni2LwP is now on sale for 50% off. That's only $15! For a limited time only.

    New version of the main library file is also almost ready (probably will be finished next week) with the following changes/improvements:

    • Live Wallpaper preview thread is delayed a few milliseconds before calling the onDestroy method. This helps with the issue that sometimes users can't set the live wallpaper after the first try. Still experimental but with good results.
    • Automatic detection of Pixel Format. This feature will automatically detect the best and most compatible pixel format that the device supports. Best one will be choosen to be used. This also fixes Color banding :)

      These previous 2 changes/improvements will be disabled by default and can be easily enabled by changing just one line of code.
    • Increase speed !!! Some Statistics:
      Nexus 5 running Uni2LwP 1.5 (current version on Asset Store) demo scene but with 2000 cubes only reaches ~45 fps
      Nexus 5 running Uni2LwP 1.5.1 (new and unreleased version) demo scene but with 2000 cubes reaches a constant 60fps :)
    Don't forget that Uni2Lwp is now on sale 50% off :)

    Best regards,
    Shinx
     
    Last edited: Jun 9, 2015
    ArturMaciag and exitsimulation like this.
  47. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    This is great news!
    The first item: Is it a fix for the crash when selecting the live wallpaper in the live wallpaper chooser a second time?

    Can I just replace the library file or do I have to adjust some Java classes in my current eclipse project as well?

    Thanks!
     
  48. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    No. This is for users (on some devices) that can't apply the live wallpaper after the first try. It doesn't happen to everyone so it's possible that most of you haven't experienced this and you can just leave the new feature disabled.

    Yes, just replace the main library file (jar file) inside the libs folder :)

    Best regards,
    Shinx
     
    exitsimulation likes this.
  49. exitsimulation

    exitsimulation

    Joined:
    Feb 10, 2014
    Posts:
    82
    Ok, cool! Is the new version live already? Cause the asset store confuses me: It says
    Code (CSharp):
    1. Version: 1.5 (Jun 09, 2015)
    Is this the new version or is it still under review?
     
  50. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Hi,

    That's the old version. Because I have changed the description and the price (50% off) Unity still counts that as new "published date" and that's why you are seeing that.

    The new version (1.5.1) isn't finished yet and I will probably just sent it by email to everyone when it's finished. I will be doing that because it's just the main library file to replace the old one (basically a patch) and also because depending on the workload Unity can take quite a while to review and approve packages.

    When I finished the new version (1.5.1) I will post the information here and also on my site. After that just email me the invoice number and I will send the new library file.

    Note: If you have already contacted me before with the invoice number you don't need to provide it again. A simple email will be enough.

    Best regards,
    Shinx
     
Thread Status:
Not open for further replies.