Search Unity

LEAN ⚡️ Touch / GUI / Texture / Localization / Transition / Pool

Discussion in 'Assets and Asset Store' started by Darkcoder, Aug 1, 2019.

  1. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412


    Quickly add touch controls to your game using Lean Touch ― no code required! Simply pick the components you want, customize the settings, and enjoy consistent controls across Android, iOS, and Desktop!
    > Get Lean Touch <




    Lean Touch+ is an extension to the popular Lean Touch, adding a massive amount of new components and demo scenes. These allow you to quickly add touch controls to your game ― no code required! Simply pick the components you want, customize the settings, and enjoy consistent controls across Android, iOS, and Desktop!
    > Get Lean Touch+ <




    Lean GUI is a collection of components that extend Unity's GUI system, allowing you to rapidly polish and enhance the user experience (UX) of your game's UI.
    > Get Lean GUI <




    Lean GUI Shapes allows you to quickly add lines, rounded boxes, polygons, and much more to your GUI! Each shape is fully customizable and is procedurally generated, lowering your texture memory usage, and allows you to quickly tweak your UI designs.
    > Get Lean GUI Shapes <




    Lean Texture allows you quickly modify textures in your project with a range of filters, pack them together into channels, and much more!
    > Get Lean Texture <




    Lean Texture+ is an extension to Lean Texture, adding many new types of texture modification tools!
    > Get Lean Texture+ <




    Quickly add multi-language support to your games using Lean Localization. This lightweight asset allows you to localize text, sounds, load CSV, and much more!
    > Get Lean Localization <




    Improve the performance of your game within minutes using Lean Pool. This lightweight asset manages prefab spawning, despawning, recycling, and much more!
    > Get Lean Pool <



    Lean Transition allows you to easily tween or animate almost anything in your game, making it transition smoothly and look professional.
    > Get Lean Transition <


    Feel free to ask any of your questions here!
     
    Last edited: Jul 30, 2021
    Scorpion_1980 likes this.
  2. dariuspranskus

    dariuspranskus

    Joined:
    Jul 6, 2019
    Posts:
    2
    Hello, I am pretty new to Unity. What I want to achieve is to initiate a rotation of a small object by swiping in clockwise or counter-clockwise manner with a single finger. Is it possible to detect with the library? Which example can I use to get some advice from? Could you please advice. I just recently purchased the Lean Touch+. Thanks
     
    mmaxim1179 and khanhabib like this.
  3. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    There's no component or demo scene that can detect this yet, but this sounds like a good idea so I can add it. I'll send you a build when it's implemented!
     
    wallabe and rexcheung like this.
  4. giggioz

    giggioz

    Joined:
    May 11, 2017
    Posts:
    52
    Hi Darkcoder,

    I was looking at LeanTouch/LeanTouch+: do they manage gesture recognition?

    If the answer is yes, here you can find more detail about my needs:

    Basically, in my game, I want to allow the player to trace magic symbols on the screen and this will trigger some internal mechanics.

    Is it possible to create some particles effects and trails during the player gestures to improve the visual quality of the action?
     
  5. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    The next version of LeanTouch+ will include drawn shape recognition :)

    You can already add trails to fingers using LeanFingerTrail/Fade, but not particles. I'll add that too!
     
  6. rexcheung

    rexcheung

    Joined:
    Feb 2, 2017
    Posts:
    35
    Hi Sir,
    I am looking for this function too.
    I guess the idea is to attach three conductive points to form a fixed triangle so that unity can detect and locate the triangle movement.
     
  7. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    Seems everyone wants this :D

    Good news is that I've just finished implementing this feature, I'm just working on making the demo scenes for it now. I'll submit a new version and send everyone early builds later today.
     
    khanhabib and Appokalopps like this.
  8. rexcheung

    rexcheung

    Joined:
    Feb 2, 2017
    Posts:
    35
    you are so great, i just brought Lean touch + and wait for your great demo :)
     
    Darkcoder likes this.
  9. Tom-Goethals

    Tom-Goethals

    Joined:
    Mar 6, 2015
    Posts:
    102
    LeanTouch works great! Thanks for the Asset!

    I want to run 2 windows touchscreens at the same time from 1 PC. (only have 1 at the moment to test myself)
    Would I be able to differentiate between touches coming from either screen?
    for example, the left screen rendering camera 1 is controlling camera 1 by touch and the same for the right screen with camera 2.

    Can you share any experience with running touch in windows on multiple screens?

    Thanks!
    Tom
     
  10. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    I don't have access to any dual touch screen setups, so I have no idea. Unity's Touch class doesn't appear to contain any information about screens though, so assuming it does support such setups, there's no automatic way to detect which screen it's on. You would probably have to calculate this yourself.
     
    Tom-Goethals likes this.
  11. pinesG

    pinesG

    Joined:
    Feb 7, 2017
    Posts:
    4
    Carlos,

    Our team is referencing an English.txt csv file in LeanLocalization. We are using the Lean Localized Text Phrase Path variable on each of our text objects and the text display red even though the connection is working. Also, when we update to the latest version and import the csv, it does not fill in the Phrase Path variable. Without having to reselect each text box, how should we proceed?

    Also, Is there a way to update the CSV file after build if we wanted to be able to change the text on the fly from the CSV?
     
    Last edited: Aug 8, 2019
  12. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    I made a mistake with LeanLocalizedBehaviour.cs, change like 26 to: [FormerlySerializedAs("PhraseName")]

    Your behaviours should now carry over after your upgrade. If the old version works fine then you could just stick with that, since I did change quite a lot recently.

    Modifying text from a CSV isn't a scenario I considered when designing Lean Localization. One thing you could do is change the LeanLanguageCSV script execution order to be -100 or something, then you could create a normal LeanPhrase with a GameObject name matching the phrase you want to override, then you can add a translation Entry for the desired language.
     
  13. GordonWedge

    GordonWedge

    Joined:
    Jul 6, 2013
    Posts:
    23
    Hi, thanks for your great assets.
    I'm working with lt+ and wanna get pinch data and direction, i've added a leanmultipinch script to my gameobject on scene, and added a function to onpinch event, buy i don't understand how to get pinch data.

    Schermata 2019-08-14 alle 11.05.53.png

    Code (CSharp):
    1.     public void onpinch(Lean.Touch.LeanMultiPinch myData)
    2.     {
    3.         Debug.Log(myData.????);
    4.     }
     
  14. nigel-moore

    nigel-moore

    Joined:
    Aug 28, 2012
    Posts:
    26
    Hey DarkCoder,

    Just running through and example project I found that uses LeanTouch - I updated the asset in the project to the latest version and now its complaining with these error messages:

    Assets/Scripts/ARImageScene.cs(228,17): error CS0200: Property or indexer 'LeanSelectable.OnSelectUp' cannot be assigned to -- it is read only


    this is the bit of code in question:

    var leanSelectable = imageObject.GetComponent<LeanSelectable>();


    if (leanSelectable != null)
    {
    // intialize events ( only needed when LeanSelectable is added via code - currently not the case )
    if (leanSelectable.OnSelectUp == null)
    {
    leanSelectable.OnSelectUp = new LeanSelectable.LeanFingerEvent();
    leanSelectable.OnDeselect = new UnityEngine.Events.UnityEvent();
    }

    // image OnSelectUp event instead of OnSelect to include Tab information
    leanSelectable.OnSelectUp.AddListener(ImageSelectUp);
    leanSelectable.OnDeselect.AddListener(ImageDeselect);
    }


    Obviously these properties used to have setters as well as getters but I was wondering if you had any suggestions for a fix?
     
  15. Sir_Ken

    Sir_Ken

    Joined:
    Aug 23, 2014
    Posts:
    3
    Hi,

    Thank you for the Lean series, they are great!

    I have been working with the LeanDrag in Lean GUI recently. Is there a functionality to constrain/clamp the drag surface to the parent object instead of entering floating numbers?
     
  16. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    The OnPinch event you can see in the event inspector gives you one parameter (Single), this is another name for float. The actual value of this depends on your Scale setting, which is currently Pinch Scale. If there is no scale then this will be 1.0, but if you get a value of say 0.9, then that means between the previous and current frame, you pinched to 90% of the previous scale (e.g. if your fingers were 100pixels apart, then they are now 90). If your fingers expanded then this would be above 1.0.


    You can remove the code that checks to see if leanSelectable.OnSelectUp is null, and the code inside that gives it a new instance.

    This code used to be required because the events were public fields, but I've now made them private and given them properties that automatically initialize to non-null when accessed for the first time. This should require less code now and allow users to develop faster. Unfortunately you will have to remove this old code though!


    Not currently, but that sounds like a great idea. I can try adding it next week!
     
    MuhammadAhmadYousaf likes this.
  17. oneuppedgames

    oneuppedgames

    Joined:
    Jul 30, 2013
    Posts:
    15
    Hi! Thank you for your great assets. I am currently using Lean Localization, and it's been a blast to work with. Awesome stuff!

    I am currently trying to get Tokens to work, but I can't seem to get it to work. My current setup is:

    - I'm using a CSV with a tag / name and a translation including a token (i.e. token.test.translation = this is the token: {NAMEOFTOKEN}
    - I created a token (created using the 'Add' button in the LeanLocalization Inspector) called 'NAMEOFTOKEN'
    - This generated a GameObject (and reference to this GameObject in the Lean Localization Inspector) called NAMEOFTOKEN and I added a value (ThisIsTheTokenValue)
    - I call the translation in code using: LeanLocalization.GetTranslationText("token.test.translation");

    I keep getting 'this is the token: {NAMEOFTOKEN}' as a translation result, instead of 'this is the token: ThisIsTheTokenValue'.

    I've checked the documentation and I am doing exactly as suggested. I also looked into your examples, but there is no token example it seems? I've also tried using a similar setup without CSV and such, but I keep getting the same unwanted result.

    Any idea?

    Also: do you have a way so I can donate some bucks? Your tools have helped me out quite a bit, and I'd like to return the favour. Cheers!
     
  18. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    Thanks for pointing this out. GetTranslationText currently just returns the raw text without any token substitution, I'll have to update the code to do this, and now that you point it out I also notice a bug with the substitution code that would cause it to break if you tried to use it in your current scenario. I'll send you an updated build in a little bit.

    I have no donation system setup. The best way to support me is to write a review (or at least a rating) if you haven't already. If you really want to give me money then you could always purchase one of my assets if they will help your project :)
     
    GoliathAT likes this.
  19. Fluffy_llama7

    Fluffy_llama7

    Joined:
    Oct 2, 2018
    Posts:
    1
    I'm a beginner game developer, (so forgive me if I'm missing something obvious), and I wanted to make a mobile game, so I found this asset. It works very well and is easy to use, especially considering how I don't have much experience in game design, but there is one thing that I'm not sure if I can do with this.

    I have an object, which is an iceberg, that I want the player to be able to tilt by dragging a finger without necessarily swiping, so that the player does not have to lift their finger off of the screen. As the player drags their finger up or down, the iceberg tilts away and towards the player, and as the player drags their finger left and right, the iceberg tilts to the left or to the right. In essence, it will tilt in the direction that the player drags their finger and it will tilt more or less depending on the distance that the player drags their finger.

    The closest thing that I found was the feature that could detect the angle and distance of a swipe. Please let me know if I can achieve what I described with this asset.

    Thanks for this amazing asset! I'm definitely going to use it in more games in the future.
     
  20. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    LeanTouch+ includes the LeanManualRotate/Smooth component (DragTurn2D demo scene), which can be used to do this. With this component you can rotate an object (e.g. iceberg) along two axes of rotation using a finger drag gesture.
     
  21. kayy

    kayy

    Joined:
    Jul 26, 2011
    Posts:
    110
    First of all thanks for this amazing asset, just the bought the plus to support you :)

    I stumbled upon some static actions in LeanTouch.cs, that JetBrains Rider (or Resharper) marks as dangerous:
    Code (CSharp):
    1. public static System.Action<LeanFinger> OnFingerUp;
    2. // several samples (e.g. LeanFingerHeld.cs) us in code like
    3. LeanTouch.OnFingerUp   -= OnFingerUp;
    The -= for unsubscribing is marked with a hint Delegate subtraction has unpredictable result. You can find a detailed explanation at JetBrains help page.
    I think OnFingerUp should be rather declared as an event e.g. public static event System.Action... so that listeners can safely subscribe and unsubscribe no matter how many listeners exist.
    But maybe I am wrong and this is intended. In that case we should register/unregister our one and only listener by assignment like
    Code (CSharp):
    1.  LeanTouch.OnFingerUp = OnFingerUp;
    2. // and unregister
    3. LeanTouch.OnFingerUp = null;
     
  22. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    I'll consider changing them to events. I think this warning is silly in this scenario though, because -= OnFingerUp; is just unsubscribing a method, so there is no scenario where this will cause the behaviour described on that page. They should really improve their parsing skills to test to see if the user is adding multiple methods together like this before warning of this.
     
  23. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    Hello i have a Question to LeanPool, i have a Terrain Map,on this map i have Place same Items(stone) the player can go to the stone and pick it the Stone up in him´s inventory.
    My Idea is create 1 Empty Object und that i have the stones from the map,when player have 20 Stone´s pickit up the emptyObject will respawn the stone´s.My Question is can i do that with LeanPool,i have see LeanPool have one Object and respawn that on the same position,must i set up on every stone the LeanPoolScript or can i use a Array or list?

    Thx for your answer.
     
  24. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    I'm not sure I fully understand your scenario. When using LeanPool it's best to think about how you would normally design your game using Instantiate/Destroy with your prefabs, and you can just replace them with Spawn/Despawn. LeanPool doesn't contain any code to count to 20 and do special logic, you would have to write a custom script to do that.
     
    Pandur1982 likes this.
  25. Pandur1982

    Pandur1982

    Joined:
    Jun 16, 2015
    Posts:
    275
    Ah ok thx for the answer.
     
    Darkcoder likes this.
  26. haim96

    haim96

    Joined:
    May 24, 2013
    Posts:
    107
    hello,
    using Lean Transition, how can i create Ping pong effect with code only? (without adding lean component)
    i managed to create UP and then Down but how do i make it repeat forever?

    thanks!
     
    Last edited: Sep 2, 2019
  27. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    The easiest way is to call a method containing your transitions, then have the last transition call itself, like this:

    Code (CSharp):
    1. using UnityEngine;
    2. using Lean.Transition;
    3.  
    4. public class RepeatFromCode : MonoBehaviour
    5. {
    6.     void Start()
    7.     {
    8.         UpAndDown();
    9.     }
    10.  
    11.     void UpAndDown()
    12.     {
    13.         if (!isActiveAndEnabled) return;
    14.  
    15.         transform.
    16.             localPositionTransition(Vector3.up, 1). // Move up
    17.             JoinDelayTransition(1). // Wait 1 second
    18.             localPositionTransition(Vector3.down, 1). // Move down
    19.             JoinDelayTransition(1). // Wait 1 second
    20.             EventTransition(UpAndDown, 0); // Begin again
    21.     }
    22. }
    In theory this could be done with less code using InvokeRepeating, but apparently there's a bug somewhere that I must track down to allow that. I'll look into it!
     
  28. spido_games

    spido_games

    Joined:
    Nov 20, 2017
    Posts:
    1
    Hello

    I bought Lean Touch+ and I will ask a question.

    I checked your SwipeDirection8 demo. When I finger up that return direction value one time in demo. But I want to return direction values continuously until my finger up. How could I do this?
     
  29. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    If you want it every frame then you could use LeanFingerDrag.OnFIngerDrag instead of LeanFingerSwipe.OnSwipe. Drags have no direction constraints though. If you want this then then LeanTouch+ has the LeanFingerSwipeNoRelease component, which can do continuous swipes.
     
  30. agittrim

    agittrim

    Joined:
    Jan 29, 2018
    Posts:
    3
    Hi, I use the LeanCameraMove and LeanCameraZoom (2D) from the demo, is it possible to limit the camera movement position based on maximum view I set, so the limit of camera's position will depend on how far I zoomed out/zoomed in the camera? (hope you get what I mean)

    Btw, thanks for making this great asset!
     
  31. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    There's no feature to do this yet, but I added it to the to-do list. It may require a new component since it will likely work very differently to the current constraint/boundary components available in LeanTouch+.
     
  32. SpadXIII

    SpadXIII

    Joined:
    May 16, 2017
    Posts:
    1
    I'm using this awesome and free LeanTouch asset for a little game I'm making and came across a small issue: I made a script that extends from LeanSelectable. In the Start method, it adds buttons to the ui. The problem is that these buttons also get added in the editor, and not only in play-mode. The second time, play-mode is started, there are 2 sets of buttons in the UI, etc.

    This is because the LeanSelectable class has the attribute ExecuteInEditMode. Why does this class have this attribute?
    There are also a few other classes with this attribute. Do they need this attribute as well?
     
  33. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    This attribute probably isn't necessary for any of the components. It's used to register the component instances, and that data might be used by some other components in the editor, but it's probably not important.
     
  34. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    Hey everyone,

    Version 2.0.0 of Lean Touch and Lean Touch+ have been released!



    This is a partial rewrite of all example components, so please don't update if you're in the middle of a project!

    This new version includes so many changes.

    The biggest change is that I removed all __Smooth versions of components, and instead included the smoothing code in the basic version of each component. This simplifies how you use Lean Touch because there are now far less components, and it allows me to make changes much faster.

    The second biggest change is that I added many more events to each finger and multi finger component (e.g. LeanFingerTap, LeanMultiSet). These new settings allow you to get the world position of fingers, world delta of fingers, etc. Implementing these settings in the finger components simplifies a lot of interaction with other components (e.g. manually adding Rigidbody velocity from finger gestures), and allows you to do many of the same things as before, but now using less components, thus being easier to understand.

    Next up is the new FingerFilter inspector settings. These are used by components like LeanMultiTwist under the setting name of Use. This inspector setting simplifies a lot of component code, because all components that work with multiple fingers now use this same system.

    Finally, I re-designed all the demo scenes and updated the description text to be clearer. There are many other small tweaks I made in Version 2.0.0, so I recommend you go through the scenes again, read the description, and understand what was changed.

    If any of the new things look confusing and need more explanation or you need more demo scenes then feel free to post below!
     
  35. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    Hi Darkcoder, I'm attempting to use LeanTouch+ for an AR game - it's really helpful that translations (eg. LeanDragTranslate) work relative to camera angle since the AR camera can be positioned anywhere.

    Currently LeanDragTranslate only moves an object on the X/Y axis but I need an option to move it on the X/Z axis instead. ie. when you move your finger up/down on the screen the object should move away/towards the camera. Can you describe how I might achieve this? Thanks!
     
  36. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    This can be done using LeanTouch+ with the LeanDragTranslateAlong component. With this component the ScreenDepth setting can be set to HeightIntercept or PlaneIntercept, allowing you to move away/towards the camera based on a flat surface along the X/Z axis.
     
    rocket5tim likes this.
  37. SAVVU

    SAVVU

    Joined:
    Dec 6, 2015
    Posts:
    21
    Well first of all this is an amazing Asset!
    Im currently working on a mobile 2d endless runner with this functions:
    -Touch on the left side of the screen = jump
    -Touch on the rightside of the screen = attack
    -Swipe down wherever on the screen = Quickly fall when in air or through platforms when obstacle ahead

    My question is:
    Where exactly do I have to implement the check to see on which side of the screen the player taps?
    Want to add something like this:
    if(touch.position.x < Screen.width/2){
    tapL = true;
    }else if(touch.position.x > Screen.width/2){
    tapR = true;
    }

    Thanks for any tip!
     
  38. rocket5tim

    rocket5tim

    Joined:
    May 19, 2009
    Posts:
    242
    Thanks for the reply! I've got PlaneIntercept setup to be constrained to a LeanPlane which works fine in most situations, however when the camera is looking straight down the edge of the plane, the's no way for the system to understand where to move the object along the Z axis. So this isn't going to work well for AR since the camera could be anywhere, including parallel to the plane.

    Another issue with LeanDragTranslateAlong + LeanPlane is that after the object hits the Y plane extent if you keep pushing in the same direction the object will push over to the X extent even if I'm not moving my finger along the X axis. Instead the object should stay at the last X position at the Y extent until I actually move my finger along the X.

    Would it be possible to have a variation of LeanDragTranslate with the option to move along the X/Z axis rather than the the current X/Y axis?
     
    Last edited: Sep 11, 2019
  39. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    From code you would hook into the Lean.Touch.LeanTouch.OnFingerDown and OnFingerSwipe events. Both of these events give you a LeanFinger finger as an parameter. You can then read the finger.ScreenPosition value, and perform the code you describe.

    If you use LeanTouch+ then you can make a UI rect covering the areas of the screen you want, and then add the LeanFingerDownCanvas component to it, which will call the OnFinger event when you begin touching over that UI element. However, it looks like you can't detect swipes using this method yet. I'll add it to the to-do list!


    In this scenario you would need to use a setup like the FirstPersonLookMove demo scene, where the movement distance is based on the drag distance rather than anything in the scene. Components like LeanDragTranslate and its variants work using a scene reference point, and if your reference point is a plane then when viewed side-on there's no valid reference point to translate using. For objects the same style of movement can be done using the DragMove2D demo as a base, but with a different DirectionB setting.
     
    rocket5tim likes this.
  40. SAVVU

    SAVVU

    Joined:
    Dec 6, 2015
    Posts:
    21
    I have successfully used the swipe function to swipe down whenever i want. As for the OnFingerDown in order to jump..the character jumps immediately before the script manages to ckeck if it is a swipe.
    To solve this I tried the OnFingerTap implementation but the problem here is that the character only jumps when taking the finger from the screen (makes the game feel laggy)! Is there a way to use OnFingerDown with the touchthreshold together? This would be the final solution for my project!!!
     
  41. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    I'm not sure I understand. Tap and swipe both require the finger to go up within the TapThreshold time. The difference between them is how far the finger moves relative to SwipeThreshold, and it will either call swipe or a tap. If OnFingerDown is too quick for you, but releasing the finger is too slow, then how would the jump timing be decided? Adding a new event for when a tap/swipe is no longer possible might be useful, but it wouldn't be faster than a tap, so I'm not sure how your idea would work.
     
    SAVVU likes this.
  42. SAVVU

    SAVVU

    Joined:
    Dec 6, 2015
    Posts:
    21
    New
    Maybe I can explain it differently. I would like the player to jump as soon as the finger touches the screen without lifting the finger. The Tap function needs exactly that (the finger to lift) in order to perform an action. So i want something like the TapThreshold but for the OnFingerDown function. This way the player will jump as soon as I touch the screen and the, lets name it, touchThreshold is over. Finger still on screen!

    Hope you understand what I mean and sorry if I explain it not in the right way.
     
  43. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    Try the attached package. The new OnFingerOld event should do what you describe.
     

    Attached Files:

    SAVVU likes this.
  44. SAVVU

    SAVVU

    Joined:
    Dec 6, 2015
    Posts:
    21
    Just implemented it! Works really great..have to make some changes to the threshold though to get the result I want
    Thank you so much for your time!
     
    Darkcoder likes this.
  45. isasaurio

    isasaurio

    Joined:
    Nov 13, 2016
    Posts:
    18
    Hi dear, I am using ARFoundation and I am using LeanTouch to move the object once it appears on the screen, but I have a problems that I don't know how to solve.
    First, limit the "drag" only to the Z and X axes.

    Before I could but with an earlier version, now that I update the script it doesn't work anymore :(
    Greetings and thanks
     
  46. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    I've already answered these via e-mail?
     
  47. singyosan

    singyosan

    Joined:
    Oct 18, 2018
    Posts:
    12
    Hello, I'm currently using your LeanLocalization, and it's amazing to be honest.
    But I want to know if TMProUGUI & TMProUGUIFont can be applied at the same time?
    Just by looking at the code, the translation seems like only be able to choose between 2 kinds of data :
    String or Object

    Does that mean if I wanted to have different languages using different fonts, I'll have to implement by myself?
    thanks!


    UPDATE
    I've set up an easy language-font switch, but still this could be a feature for future update! :)
     
    Last edited: Sep 16, 2019
  48. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    You can open the "TextMeshPro" package in the Lean/Localization folder to add support for TMP. I can't include these in the main package because some users don't have TMP and would get errors.

    A Font asset (and Material, Mesh, etc) is a type of Object, so you should select this. I made the toolbar pick between String/Object/Sprite only because I didn't want to have hundreds of buttons, and because these 3 object types have fairly distinct usage in the inspector.
     
  49. DannyWoo

    DannyWoo

    Joined:
    Oct 25, 2012
    Posts:
    24
    Hi

    is leantouch support for windows 10 multi touch gesture?
     
  50. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,412
    I'm not sure, I don't have access to any monitor like this. LeanTouch uses the Input.touches data, so any platform supported by that is also supported.

    If you have such a monitor then it would be great if you could test it and let me know.