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

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
    Hello,

    First post updated with some information (features, minimum requirements, site, etc.)

    Best regards,
    Shinx
     
  2. oussa

    oussa

    Joined:
    Mar 18, 2013
    Posts:
    64
    Looks great :D thank you for your great job , but can you publish the apk on google play or share the link.
    thank you
     
  3. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    So, just to clarify, the section of code
    Code (csharp):
    1.  
    2. public void onOffsetsChanged(float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset)
    3. {
    4.     super.onOffsetsChanged(xOffset, yOffset, xOffsetStep, yOffsetStep, xPixelOffset, yPixelOffset);
    5.     if (player != null  !isPreview())
    6.     {
    7.         UnityPlayer.UnitySendMessage("Main Camera", "SetCamOffset", String.valueOf(xOffset));
    8.     }
    9. }
    10.  
    would go inside of the eclipse project, not the unity project. (as stated before, I have very little experience with android out side of unity itself)



    EDIT:
    And I have my test done and waiting. :p
    http://cmte.us/cm/android/lwpTest/WebPlayer.html
    (would like to note that while it's set to 7 pages possible, it is dynamic in the editor and I could have 20 home screens and it'd just scale the position accordingly. ^_^)

    I know it's not super impressive, obviously (and largely stolen by your example and the example for unity2eclipse). But, it is a nice framework to start with for making other live wallpapers that are basic sliding motions.
     
    Last edited: Mar 18, 2013
  4. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Yes, you will find it inside Eclipse project. The example that you can watch in the video is the exact one that I submitted to the asset store, so everything is already done.


    How are you setting the 7 pages in Unity? All that you need to do is go from
    Code (csharp):
    1. SetCamOffset ("0");
    to
    Code (csharp):
    1. SetCamOffset ("1");
    and everything will work inside Android device, even if the user has 20 screen pages. ( Those 20 pages are divided between the setCam offset 0 to 1).

    Inside Eclipse, this code :

    Code (csharp):
    1.  public void onOffsetsChanged(float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset) {
    2.         super.onOffsetsChanged(xOffset, yOffset, xOffsetStep, yOffsetStep, xPixelOffset, yPixelOffset);
    3.  
    4.         if (player != null  !isPreview()) {
    5.             UnityPlayer.UnitySendMessage("Main Camera", "SetCamOffset", String.valueOf(xOffset));
    6.         }
    7.     }
    will pass values between 0 and 1 (xOffset) to Unity. You don't need to emulate the number of screens.
     
  5. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    Oh, well, that makes things easier I suppose then doing the math I'm already doing.

    All I'm doing is a lerp between startPosition and endPosition (both vector3's). My math was expecting the xOffset to send a home screen number value, not a (effectively) percentage. Easy enough to change though, and actually requires a bit less code.

    Either way, the example still works for showing what it would look like. (Needless to say, I'm still really excited about this.)
     
    Last edited: Mar 18, 2013
  6. oussa

    oussa

    Joined:
    Mar 18, 2013
    Posts:
    64
    hello, can someone share the demo apk for uni2lwp
     
  7. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    The only person with the actual APK file is the creator of the script, as it hasn't been added to the asset store, no one has access to it yet.
     
  8. rdias

    rdias

    Joined:
    Oct 9, 2012
    Posts:
    7
    I hope there are no compatibility issues. That implementation sketch on Unity 3.4 classes.jar was really incomplete, I made it work, but with already mentioned glitches. I am Glad you created a new implementation, Shinx. What is the approval process deadline? Looking forward to use it!
     
  9. luvcoolstuff

    luvcoolstuff

    Joined:
    Dec 19, 2012
    Posts:
    29
  10. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    Agreed on the putting it somewhere else, but other places also take their time to accept scripts. Gameprefabs.com are decent (last time I submitted a script at least), but still takes a couple days, so unless he wanted to set up his own cart system and figure that all out, then he doesn't have an "instant" option.
     
  11. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Uni2LwP was submitted on the 16th (Saturday). After reading their email carefully they say that it usually takes 3 days (working days). This means that they only started working on it monday the 18th. I'm expecting to be online tomorrow or friday.

    If not available by friday, I can publish the plugin to Gameprefabs.com or unitymagic.com, but they also take some time making it available.

    If everything fails... well there's always paypal (although not a big fan because of the problems of the logistic of future updates to the plugin)

    Best regards,
    Shinx
     
  12. luvcoolstuff

    luvcoolstuff

    Joined:
    Dec 19, 2012
    Posts:
    29
    Ok, that would be fine:)
     
  13. pushingpandas

    pushingpandas

    Joined:
    Jan 12, 2013
    Posts:
    1,419
    Still no working version of unity 4.0 in sight?
     
  14. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    I know you showed an example of how the homescreen is given, can you give an example of how to read the settings from the settings menu? Also, how to set up the settings menu? It'd be nice to not only have check boxes, but also a color wheel or slider bars as well.

    Thanks ahead of time. ^_^
     
  15. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Unfortunately no. Unity 4 is a completely different "beast".

    Sometimes using "development build" Unity 4 randomly starts working and that's why I haven't given up yet. :)


    The example that's included implements SharedPreferences.OnSharedPreferenceChangeListener. This means that changes are saved automatically.
    All you need to do is make sure that the name of the preferences to retrieve has exactly the same name (string) inside the file "wallpaper_settings.xml".

    It's probably better if I create a tutorial explaining how to add a new preference name to the settings menu. Check out my site in a day or two.
     
  16. Horror

    Horror

    Joined:
    Jul 18, 2011
    Posts:
    207
    A pox on thee! Come on, Unity Team, another Friday is upon us!

    Approve! Approve! Approve!
     
  17. invisiblesense

    invisiblesense

    Joined:
    Jan 21, 2013
    Posts:
    41
    Excellent work shinx!

    Can you please test to see if the page sliding feature works on a Samsung Galaxy device. I've had Galaxy S3 and now Note 2 but the scrolling doesn't work on most live wallpapers. I have been playing with unity2eclipse but this does not work for the lwp I've created and tested on those phones.

    Thanks.
     
  18. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    Still can't wait. ^_^ I've been checking out the latest rss feed from the asset store in wait of it.
     
  19. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    It works on my 2 devices ( Xperia X8 and Ascend G300) and it works on the Android emulator. However, I have read that Samsung removed the scroll feature from live wallpapers in their TouchWiz. This means that this method never gets called :

    Code (csharp):
    1. public void onOffsetsChanged(float xOffset, float yOffset, float xOffsetStep, float yOffsetStep, int xPixelOffset, int yPixelOffset)
    So, if you are using TouchWiz it shouldn't work, but I don't have access to a Samsung device so don't really know for sure. Sorry.
     
  20. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Just received an email from Unity with the following:

    "We have a slight back-log of submissions we're working through at the moment."
     
  21. resheez

    resheez

    Joined:
    Mar 22, 2013
    Posts:
    66
    still not available for unity 4 yet??
     
  22. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    Last it's been said, no, it doesn't work with unity 4 yet.
     
  23. electricseed

    electricseed

    Joined:
    Sep 23, 2012
    Posts:
    17
    We had the issue with the onOffsetsChanged in our LiveWallpapers too. This seems to be left out intentionally in ics, so fixing that in some way is crucial.

    It seems that you need to set the wallpaperoffsetsteps now:
    http://developer.android.com/refere...perManager.html#setWallpaperOffsetSteps(float, float)
    and setWallpaperOffsets
    http://developer.android.com/refere...r.html#setWallpaperOffsets(android.os.IBinder, float, float)

    What we found here, it seems to be left out intentionally:
    http://bimbim.in/software/post/Android-onOffsetsChanged-in-Live-WallpaperService-not-working.aspx
     
  24. invisiblesense

    invisiblesense

    Joined:
    Jan 21, 2013
    Posts:
    41
    So, if you are using TouchWiz it shouldn't work, but I don't have access to a Samsung device so don't really know for sure. Sorry.[/QUOTE]

    Thanks for the reply.
    I have noticed that there some live wallpaper that have this feature working. For example scrolling feature works on the 'Jungle Waterfall and Lost Island 3D'. This is using TouchWiz.

    I am aware on launcher such as Apex everything works fine.
     
  25. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295


    Jungle Waterfall and Lost Island 3D works because they must be using some sort of simulated scrolling on TouchWiz devices. They should be using onTouchEvent to simulate scrolling. Maybe this can get you started :

    Code (csharp):
    1. public void onTouchEvent(MotionEvent paramMotionEvent) {
    2.            
    3.     if (paramMotionEvent.getAction() == MotionEvent.ACTION_DOWN) {
    4.         Log.v("-->", "ACTION_DOWN : " +  paramMotionEvent.getX());
    5.     }
    6.    
    7.     if (paramMotionEvent.getAction() == MotionEvent.ACTION_MOVE) {
    8.         Log.v("-->", "ACTION_MOVE : " +  paramMotionEvent.getX());
    9.     }
    10.    
    11.     if (paramMotionEvent.getAction() == MotionEvent.ACTION_UP) {
    12.         Log.v("-->", "ACTION_UP : " +  paramMotionEvent.getX());
    13.     }
    14.    
    15. }
    http://developer.android.com/reference/android/service/wallpaper/WallpaperService.Engine.html#onTouchEvent(android.view.MotionEvent)


    EDITED:
    New idea :)

    How about using "onFling" method ? Your class implements OnGestureListener and then you can detect if the user swipes left or right. I have implemented OnGestureListener in my plugin because of the double tap feature and the onFling method is "ready" to be used.

    Code (csharp):
    1. public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
    This solution only detects if the user swipes left or right and not the xOffset needed to scroll the screen, but I think it's still the best solution.

    http://developer.android.com/reference/android/view/GestureDetector.OnGestureListener.html#onFling(android.view.MotionEvent, android.view.MotionEvent, float, float)
     
    Last edited: Mar 24, 2013
  26. mdewyea

    mdewyea

    Joined:
    Mar 15, 2013
    Posts:
    7
    Whats a good tutorial for learning the code you guys are using.
     
  27. resheez

    resheez

    Joined:
    Mar 22, 2013
    Posts:
    66
    still not available in asset store yet??
     
  28. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Didn't understood if you are refering to my plugin Uni2LwP , Android or Unity. Still, you can always check my site. Just added a new tutorial in how to add a ListPreference to the Settings menu.
    Regarding Android itself, obviously this one : http://developer.android.com/index.html and this one http://www.vogella.com/articles/Android/article.html#overview to learn the basics.


    Not yet. Never thought that it would take this long .... (submitted 8 days ago !!!)

    This is the last email I got from Unity:

    "We have a slight back-log of submissions we're working through at the moment."
     
    Last edited: Mar 23, 2013
  29. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,748
    GDC looming so everyone at Unity busy with stands and the developer day preparation I suspect.
     
  30. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    I doubt that the person that approves asset store stuff is going to be at GDC. There is no reason that they would have a need to go. Either way, from everything I've seen recently, it takes a while, and even longer if you aren't a person that uploaded before. (Kind of like apple app store, you tend to get further up the line faster if you've done stuff before)
     
  31. AntonObertiukh

    AntonObertiukh

    Joined:
    Mar 24, 2013
    Posts:
    4
    Does this make Uni2LWP Live Wallpapers for iOS, Windows 8 phone? Or this is for Android Only? Thanks!
     
  32. electricseed

    electricseed

    Joined:
    Sep 23, 2012
    Posts:
    17
    Android only. There are no livewallpapers on iphone or win8 platform
     
  33. annous

    annous

    Joined:
    Oct 4, 2012
    Posts:
    15
    any news if it is approved in store
     
  34. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,255
    Would like this for Unity 4.1
     
  35. annous

    annous

    Joined:
    Oct 4, 2012
    Posts:
    15
    can you update me if there is a way to get uni2lwp with paypal transfer
     
  36. invisiblesense

    invisiblesense

    Joined:
    Jan 21, 2013
    Posts:
    41
    EDITED:
    New idea :)

    How about using "onFling" method ? Your class implements OnGestureListener and then you can detect if the user swipes left or right. I have implemented OnGestureListener in my plugin because of the double tap feature and the onFling method is "ready" to be used.

    Code (csharp):
    1. public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY)
    This solution only detects if the user swipes left or right and not the xOffset needed to scroll the screen, but I think it's still the best solution.

    http://developer.android.com/reference/android/view/GestureDetector.OnGestureListener.html#onFling(android.view.MotionEvent, android.view.MotionEvent, float, float)[/QUOTE]

    Thanks shinx. Much appreciated! I will give these a try. Any ideas on how to use the gyroscope feature on live wallpaper?

    Very much looking forward to the release of your plugin.

    Regards
     
  37. Horror

    Horror

    Joined:
    Jul 18, 2011
    Posts:
    207
    Wouldn't the gyroscope just work in the background if you set it up in unity? I could be wrong.
     
  38. resheez

    resheez

    Joined:
    Mar 22, 2013
    Posts:
    66
    yeah...im thinking like wanna add gyroscope effect on lwp too...
     
  39. invisiblesense

    invisiblesense

    Joined:
    Jan 21, 2013
    Posts:
    41
    Probably, but I don't know how to do it?

    Thanks
     
  40. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Unity Store doesn't approve any assets/plugins on the weekends. So no release yet :(

    No. I have decided that for now It will only be available on Unity's Asset Store. Please wait a little longer.


    It should work.
     
  41. oussa

    oussa

    Joined:
    Mar 18, 2013
    Posts:
    64
    hello, how much will you sell your plugins ?
     
  42. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Price is set to 30$

    And the plugin is not finish yet. Next release will include the solution that detects if the user swipes left or right (for TouchWiz and Sense devices that don't support onOffsetsChanged method).

    Also, since most of the work of the plugin is already done ... I'm thinking of including an option to export Unity to eclipse app (just like unity2eclipse). Is it something that you guys need/want ?

    Lastly, Uni2LwP will allways include any progress made towards Unity4.x.

    All of that without changing the price :)
     
  43. AdamOwen

    AdamOwen

    Joined:
    Jul 13, 2011
    Posts:
    66
    This is fantastic and just what I've needed for a couple of years now! Good job on the tutorials too.

    As soon as it appears on the Asset Store I'll buy it!
     
  44. annous

    annous

    Joined:
    Oct 4, 2012
    Posts:
    15
    if i purchase the initial version did i need to purshase further updates
     
  45. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    No. You will always have access to the newer updates.
     
  46. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    T_T still waiting. T_T Why must the asset store people go so slow. T_T
     
  47. oussa

    oussa

    Joined:
    Mar 18, 2013
    Posts:
    64
    hello, I'm sorry Shinx that i write this news here.But i'm so excited and i'm proud to announce that i did the code for live wallpaper who work for all version of unity 3.x and 4.x.
    In my country we haven't yet the solution to sell product worldwide. So if someone can help me with an idea.
    I will publish a video on youtube as soon as possible ( 4 hours max from now ).
    With my .jar you can :
    - easily share preference with settings and send message to unity
    - change settings without any crash from your live wallpaper setting button.
    - you can easily play with Gesture and sensor and MotionEvent on one line of code.
    - you can change from 3.3.x 3.4.x, 3.5.x , 4.x without changing the code
    - you can build with opengl es 1.x and 2.x without changing the code.
    - you can add all the plugins and prefabs you want without changing the code.
    - no more crash (fatal signal or nullPointer or anything else).
    - accept android 2.1 till last version of android
    - and more ........
    I will publish a tutorials to explain how easy is to write script on unity to communicate with android and vice-versa.
    my website will be available on two days.
    Sorry for my bad english.
    http://forum.unity3d.com/threads/17...-with-Unity-4-x-and-3-x?p=1200410#post1200410
     
    Last edited: Mar 25, 2013
  48. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295

    Well, that's good news for you .... and bad news for me :(
    Can't wait to see your work !!!
     
    Last edited: Mar 25, 2013
  49. AdamOwen

    AdamOwen

    Joined:
    Jul 13, 2011
    Posts:
    66
    But good news for us, a little competition is always good! ;)

    That being said I'm still waiting impatiently for Uni2LWP, hope the submission goes through smoothly for you.
     
  50. shinx

    shinx

    Joined:
    Feb 28, 2013
    Posts:
    295
    Yes, a little competition is good. It drives us to create better products :)

    And, as I said in previous posts my plugin randomly works in Unity 4.0 using developer build... so I'm on the right path :)

    On a side note, I just finished the scrolling emulation part. Uni2LwP ver.1.1 now supports Touchwiz and Sense launchers. Next will be the export Unity to Android app functionality.
     
Thread Status:
Not open for further replies.