Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice

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

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

  1. Abhishek_Joshi

    Abhishek_Joshi

    Joined:
    Dec 15, 2019
    Posts:
    2
    Yes I updated between two very different versions of lean touch but first I deleted the old folder of lean touch.
     
  2. Darkcoder

    Darkcoder

    Joined:
    Apr 13, 2011
    Posts:
    3,170
    Where is this error coming from? If it's from your code then you will have to update it to match the new event names. It's now called OnAnySelected.
     
  3. Quast

    Quast

    Joined:
    Jul 5, 2015
    Posts:
    555
    Any update coming to "Lean GUI Shapes" ? I'm waiting for "Gradient" feature :)
     
    Nikita500 likes this.
  4. Braza

    Braza

    Joined:
    Oct 11, 2013
    Posts:
    119
    Hi Carlos,
    I'm using LeanTouch but to drag a clickable sprite around (LeanFingerTap + LeanDragTranslate + LeanSelectableByFinger). It works well in Editor but on Mobile it usually does not work, but starts working at some point.
    It seems to be something with the selectables. Are there differences in mobile and PC implementations? Could the timeScale affect thigs somehow as I'm messing with it in the game?
    upload_2022-8-16_14-40-40.png upload_2022-8-16_14-43-1.png

    *Update* What I noticed recently in Editor:
    - LeanSelectByFinger properly shows that my item is selected when I hold down the LMB.
    - LeanSelectableByFinger though shows as selected only if I start dragging the LMB a bit.

    Why is that?

    *UPDATE 2*
    NVM, I removed RequiresSelecatble check from FingerTap and things started working somehow.
     
    Last edited: Aug 21, 2022
  5. lanihou

    lanihou

    Joined:
    Jul 9, 2015
    Posts:
    5
    Hi, does leantouch+ support the new input system of unity ? i am getting compilation error in a new project with just LeanTouch+.
    Thank
    2022-08-23 22 14 37.png

    2022-08-23 22 33 27.png
     
    Last edited: Aug 23, 2022
  6. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    108
    Installing Lean Touch + (v3.0), Unity 2020.3.31, Input System 1.3 - I'm getting the error message:

    Assets\Lean\Common\Scripts\LeanInput.cs(3,30): error CS0234: The type or namespace name 'InputSystem' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    After changing Lean common Plus (pic below) , I get a lot of error messages along the lines of:
    Assets\Plugins\CW\LeanCommon+\Examples\Scripts\LeanSelectedString.cs(59,24): error CS0246: The type or namespace name 'LeanSelectable' could not be found (are you missing a using directive or an assembly reference?)



    lean.JPG
     

    Attached Files:

    Last edited: Aug 26, 2022
  7. AR_Tehcnoplus

    AR_Tehcnoplus

    Joined:
    Jan 17, 2022
    Posts:
    15
    When I build for Android, the buttons do not work. I am building for Quest 2. Any idea ? I am using the latest LeanGUI. Does it use the old input system ?
     
    Last edited: Aug 26, 2022
  8. Volkerku

    Volkerku

    Joined:
    Nov 23, 2016
    Posts:
    108
    Prblem with multiple objects being manipulated at once.
    I'm instatiating multiple prefabs in an AR scene, each with a few Lean components (drag, rotate and scale), see pic.
    There is also the LeanTouch component in my scene.
    However, all my prefabs are manipulated together. How can I fix this?

    lean1.JPG

    lean2.JPG
     
  9. halinc

    halinc

    Joined:
    Feb 24, 2019
    Posts:
    25
    I was struggling with this as well, here's what is working for me if u are using simple Unity 3D Objects:

    on LeanTouch, add LeanFingerDown and LeanSelectByFinger:



    make sure to fill the OnFinger Event on LeanFingerDown as in the screenshot.

    on your leanContainer, add LeanSelectableByFinger and then fill it to the RequiredSelectable field in your drag, rotate and scale components:



    This should work for cubes, spheres etc. What doesn't work for me yet is if I use imported 3D Models. The LeanSelectableByFinger never gets selected (it works fine if I check "SelfSelected", but then it is always selected and not only if the finger is on the object). Anyone knows how to fix this?

    EDIT: my bad, just had to add a MeshCollider to the 3D object, working now.
     
    Last edited: Sep 2, 2022
    MuhammadAhmadYousaf likes this.
  10. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    I'm having trouble with LeanTooltip leaving "orphaned" tooltips behind when the gameobject it's hovering over suddenly becomes disabled or destroyed. What's the recommended action for this situation?
     
  11. elfasito

    elfasito

    Joined:
    Jul 4, 2017
    Posts:
    41
    Hi Carlos.
    Im using the localization asset, Im reading translation from a txt file with ("Lean Language CSV" script).
    Its possible assign a translation with multiple lines of text (w break lines) to one key/phrase?
    my problem:
    all the lines from the txt file are readed, but if one key have a translation with multiple lines only the first line of the key/phrase is stored (the line before the break line)
     
  12. unity_1F549590108F926CE71E

    unity_1F549590108F926CE71E

    Joined:
    Aug 2, 2022
    Posts:
    1
    Hello @Darkcoder !

    I'd like to have an ability to choose which certain mouse buttons trigger touches (to limit the others from doing so, like, not allow right button click for instance).
    In
    LeanTouch
    I've found that it just tests all the button indices
    Code (CSharp):
    1. for (var i = 0; i < 5; i++)
    2. {
    3.     mouseSet |= CwInput.GetMouseIsHeld(i);
    4.     mouseUp  |= CwInput.GetMouseWentUp(i);
    5. }
    So the question is: can I make sort of pull request to implement that feature? It requires just few lines of code to add the indices array to the editor script and handle them like this instead:
    Code (CSharp):
    1. foreach (var i in MouseButtons)
    2. {
    3.     mouseSet |= CwInput.GetMouseIsHeld(i);
    4.     mouseUp  |= CwInput.GetMouseWentUp(i);
    5. }
     
  13. ProtagonistKun

    ProtagonistKun

    Joined:
    Nov 26, 2015
    Posts:
    345
    Has anyone ever tested this LeanTouch with ARCore / ARKit? I can't seem to get it working and I'm not sure why. The game builds but crashes on startup past the splash screen. I'm pretty sure LeanTouch might be the culprit (or the way I'm using it)

    Anyone encountered issues with it before or has tested and got this working?
     
  14. frogwise

    frogwise

    Joined:
    Nov 27, 2009
    Posts:
    103
    Hi all - with the lack of Playmaker actions, I am finding it difficult to understand how to send information from Lean Touch Events to a Playmaker FSM. For example - how would I got about sending the On World (Vector 3) value from a Lean Finger Down to a Playmaker FSM? I can only seem to "Broadcast Events" to FSM's.

    The reason I ask is because I'd like to detect whether a player touches the left or right side of the screen, and then power my character accordingly in that direction with my FSM logic.

    Thanks in advance.
     
    Last edited: Oct 12, 2022
  15. elKarkayu

    elKarkayu

    Joined:
    Mar 23, 2017
    Posts:
    18
    Hi there we are new using your fabolous plugin (leantouch) but we have a doubt.

    He have dragable items with components Lean Drag Translate and Lean Selectable by finger to move them.
    We have a door over the items with Lean Finger Tap to open them that with a script opens it.

    The problem is that if you try to drag an item behind the door it moves! how we can avoid this behaiviour?
     
  16. ARVRdavide

    ARVRdavide

    Joined:
    Nov 2, 2021
    Posts:
    1
    hi everybody, what kind of licence does lean localization has? am i free to use it for a game that i will publish? best regards
    Davide
     
  17. mohsenz

    mohsenz

    Joined:
    Aug 10, 2016
    Posts:
    27
    Hey, I'm using Leantouch for an AR project, for dragging an object. it works good, but you can't drag [keep the object] and physically move! I mean I'm looking for a way to somehow equip it once I drag, now it seems everything is based on the screen raycasting, and once I drag and move physically, it stays!
    any Idea?
    thanks
     
  18. RobbertGroenendijk

    RobbertGroenendijk

    Joined:
    Sep 12, 2018
    Posts:
    8
    Hi there, I am using Lean Touch for a project running on Android using the new UIToolkit package to build a UI. Since this UI is not attached to a game-object it is not on a specific layer and cannot be excluded by LeanTouch. Is there a way to tell LeanTouch to not activate certain Events when an event occurs over this UI? Thanks in advance!
     
  19. Quast

    Quast

    Joined:
    Jul 5, 2015
    Posts:
    555
    Hi,
    Is there a way to get a smooth carve without using Blur?
    In my scene, I'm using "Lean Box" to make a mask for my image.
    - Canves.
    -- LeanBox + Mask.
    --- Image.
    The problem is I can't get a smooth curves without using Blur. When I do use Blur I get pixels!!
     
  20. pako

    pako

    Joined:
    Nov 21, 2012
    Posts:
    106
    Hi,

    I had LeanTouch+ in my project and everything was working fine. I imported LeanPool and got errors in the form:

    error CS0012: The type 'CwEditor' is defined in an assembly that is not referenced. You must add a reference to assembly 'CW.Common, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

    in LeanSelectableByFinger.cs and LeanSelectByFinger.cs

    So, the project doesn't build now. I added a reference to CwEditor by using the suggestion in VS2022, but no change.

    How can I fix this?
     
  21. ShayKrainer

    ShayKrainer

    Joined:
    Feb 19, 2019
    Posts:
    17
    Hi, I need some help.
    I don't understand from the examples how to implement the following. I have 2D sprites on the screen and I want to drag a sprite when I drag it with a finger/mouse (and also a different behavior for swiping).
    But I can't make them move.
    I have the Lean Touch object in the hierarchy, the gameobjects with the sprites have LeanDragTranslate with the correct camera and LeanSelectableByFinger but they won't budge. Not even if I replace LeanSelectableByFinger with Lean SelectByFinger. What am I missing?
     
unityunity