Search Unity

[Update 1.1] Stacking Loot Labels

Discussion in 'Assets and Asset Store' started by lejean, Nov 18, 2017.

  1. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392

    Hey everyone,

    After too many months off work I finally finished my asset and it's now live on the assetstore.

    Loot labels is perfect for all your loot based games, and is easy to use and implement!

    It gives you to ability to stack all your labels on top of each other to get a clear overview of all the gold and legendary items that a boss just dropped.

    Functionalities:
    - Highlighting items
    - Clamping important labels to the camera
    - Changing text color based on rarity
    - Fading out the labels
    - Force show all loot on the screen with the press of a button
    - A loot fountain animation
    - Automatic repositioning

    Documentation: Google drive

    Here's an video example to see the asset in action



    Let me know what you think, and if you have any suggestions of if there's any problems be sure to let me know in the comments or message me.
     
    Last edited: Apr 7, 2018
    Gekigengar likes this.
  2. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Hey everyone,

    Working on a big update for the lootlabels asset.

    Gonna post some previews soon, but in the meanwhile I made a road map on trello for you the check out.

    https://trello.com/b/eUqo4Ixv

    Grtz
     
  3. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Icons option with a rarity circle has been implemented!

    Icon preview.png
     
  4. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Text and Icons can now be switched at runtime.
    Handy if you want to add this to your game's interface settings.

    Desktop 12.14.2017 - 18.47.53.01.gif
     
  5. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    The range checker has been implemented.
    If you're out of range, the loot event gets queued, you run to the object and call the event when in range.

    Desktop 12.15.2017 - 17.18.10.01.gif
     
  6. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Build in a toggle to loot items by walking over them.

    Updating documentation now and the update is ready for upload!

    Desktop 12.27.2017 - 17.13.14.02.gif
     
  7. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Update 1.1 now pending for review!
     
  8. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Update 1.1 now live!

    Changelog:
    - Normal labels and stack labels merged into 1 object
    - Added an option to switch text with icons
    - Added a range checker which queues the interaction and makes your player run to the object
    - Added an option to loot by walking over the object
    - Updated player navigation
    - Lots of code refactoring and bugfixes
    - Expanded documentation
    - Packages for new unity versions
     
  9. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Also added 2017.3 support!
     
  10. Amvient

    Amvient

    Joined:
    Feb 5, 2016
    Posts:
    24
    I know it may be silly to ask (I am new to developing), but I wanted to confirm I can add all the loot I want from my game. I want to check if there is any restriction on the items I can place.
     
  11. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    You can add anything you want cause it's just a name that gets generated from a list of names or that you give it manually.
    There's a section in the documentation for adding new items.

    Just let me know if you don't understand and I'll help you out :)
     
  12. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    - Resubmitted the package to remove javascript files to prevent deprecation
    - Updated 2017.1,2,3 to their latest versions
    - Reduced the price to 16 dollah
     
  13. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Well even tho I removed all the javascript files, they still deprecated the package for some reason.
    Happened with other people too.

    Dnno who's behind this entire operation but he's screwing up >.<

    Anyway, gonna put the package back up once we get word from unity what happened and what we need to do.
     
  14. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    K, Loot labels is back online apparently, didn't get any notification about it oO
     
  15. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Loot labels is now part of the unity plus subscriber discount! :eek:
     
  16. Necka_

    Necka_

    Joined:
    Jan 22, 2018
    Posts:
    488
    Hi, looks really good. But a few questions:

    -I'm not a coder (using playmaker or bolt) would it be a problem? didn't find a link for the documentation to check how to implement/manage this asset
    -I use inventory pro, would it work with it? Can I just use regular prefabs?
    -The loot fountain is a plus but the stacking is kind of a turn down. I saw in your roadmap that you have a task to make the loots spread; how far are you in this? I think we both can think of Diablo 3 style of loot fountain, that would be great

    thanks a lot
     
  17. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Ye you do need to code, cause you still need to program what an item does obviously. Clicking on a gold coin still needs to add a coin somewhere in your project.
    The documentation is in the asset pack, but I didn't think of putting it online somewhere. I'll put a link to it in the first post.

    I've never used inventory pro, so no idea, but it's just drag and drop so you can put it on any prefab you want.

    I had to work on another job the last couple of months so I didn't have time to continue working on this, but I'll find some time and see if I can get the loot spreading to work. :)
     
  18. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Trailer shows fade in, but will label fade out when I'm far enaight from the loot. Will performance tank if I have like 100 objects with distance fade in label in a scene. Of course 99% will not be visible at the same time, but those 100 objects still need to check if I'm close enough. Is this system suitable for first person game? I basically want loot icons to fade in when I'm close to them and fade out when I'm far away.

    Is it possible to not show label/icon if there some object between camera and loot. Here's example where laber doesn't get shown when there a car door or window between loot and camera.
     
    Last edited: Apr 10, 2019
  19. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Hmm, the asset is made with a top down view in mind like diablo. It uses the onbecamevisible/invisible functions so if the item is visible to the camera, it would show the label.
    I'm not sure what happens with onbecamevisible if it's culled through distance tho, you might need to add Lods to the items to get those function calls, I'll do some research on it.
     
  20. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    K so I tried it and you can add a LOD group to the items with 2 states, LOD 0 and culled. So if the camera is too far away, the item gets culled and Onbecameinvisible gets called causing the label to dissappear.

    This might be a bit more difficult, you'll have to add raycasting to see if something is in it's way, but you could try only raycasting when the object is actually visible to the camera for performance
     
  21. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    EDIT : So I figure out how to make it work with your PDF, But can you tell me what I have to do If I only want to use your Stack Script ?
    Can you provide me of a version of your Stack script that could work without all the other script ?

    Hey, I just bought your pack and the Label placement isnt working ...
    I bought it only for that Feature ...
    I'm using unity 2019.3
    upload_2020-2-10_18-3-21.png
     
    Last edited: Feb 12, 2020
  22. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Hey mate, thanks for the interest.

    I attached a script that you can just drag on a mesh and it will only stack the text that you fill in.

    To prevent an error you do need to open up the EventHandler.cs script and change the MouseDownEvent function too

    Code (CSharp):
    1. public void MouseDownEvent() {
    2.             //if (NavManager.singleton.EnableRangeChecker) {
    3.             //    //if in range call code else queue this, walk to it and call code
    4.             //    NavManager.singleton.QueueInteraction(OnMouseDown, gameObject.transform);
    5.             //}
    6.             //else {
    7.             if (OnMouseDown != null) {
    8.                 OnMouseDown();
    9.             }
    10.             //}
    11.         }
    Aside from that you always need the Canvas prefab which contains the labelManager to spawn the labels.

    I'm gonna look into the project to see if I can make a new update that's worthwile.
    Do you have any remarks or suggestions maybe?
     

    Attached Files:

  23. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    I just look into your script and I see that It call the SpawnLabel Function,
    I dont want to Spawn the label, I already have my Label system , But I only want them to stack like you do.
    I can use your Canvas prefab, but I need to use my own label
    This is my Own label in the game
     
  24. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    That's not gonna be easy, there's alot of scripts and colliders on the LL labels needed to make it behave correctly and still be performant and the label manager in turn is crucial for the positioning.

    I think you're better off just changing the background image and text font on the LL labels to replicate yours.

    In the end I assume your system calls "Spawn this label with this text and color" which is why I added a SpawnLabelByRarity or SpawnLabelByColor function for example in the CreateLabel.cs script.

    You can just add another function more to your specifications f.e.

    Code (CSharp):
    1. public void SpawnLabelWithColor(string text, Color labelColor) {
    2.             if (objectToFollow == null) {
    3.                 Debug.Log("Assign object to follow in createLabel script for " + gameObject.name);
    4.                 return;
    5.             }
    6.  
    7.             labelSettings = new LabelSettings(stack, labelHeight, objectToFollow, text, labelColor, autoHide, clampToScreen, disableOnClick, "");
    8.  
    9.             LabelManager.singleton.InstantiateLabel(labelSettings, GetComponent<EventHandler>());
    10.         }
    and then call this function from which ever script you use to create your labels.

    Code (CSharp):
    1. public void SpawnLabel(string text, Color LabelBackground) {
    2.             GetComponent<EventHandler>().ClearDelegates();
    3.             //GetComponent<EventHandler>().SubscribeMouseEvents(MouseDownFunction, MouseEnterFunction, MouseExitFunction);
    4.  
    5.             GetComponent<CreateLabel>().SpawnLabelWithColor(text, LabelBackground);
    6.  
    7.             StartCoroutine(GetComponent<EventHandler>().VisibilityCoroutine());
    8.         }
    If you want to change the background color instead of the text color, open the LabelVisibility.cs script and change the following functions:

    Code (CSharp):
    1. void SetTextOpaque() {
    2.             //SetColor(labelText, SetOpaque(rarityColor));
    3.             //SetColor(labelBG, standardColor);
    4.  
    5.             SetColor(labelText, standardColor);
    6.             SetColor(labelBG, SetOpaque(rarityColor));
    7.         }
    8.  
    9. Color SetOpaque(Color color) {
    10.             Color tempColor = color;
    11.             tempColor.a = color.a;
    12.             return tempColor;
    13.         }
    14.  
    Here's an example
    example.png
     
  25. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    I finally manage to make it works.
    I have only one thing that is bugging me.

    I need to use the Canvas in " Scale with screen Size " mode 1920x1080.
    When the screen is small, I have a lot of space between the label
    Do you have a solution ?
     
    Last edited: Feb 13, 2020
  26. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    Hello ?
     
  27. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    The asset wasn't really made with a scaling canvas in mind, but I'll try to help you.

    So because most of the sizes of the labels are based on their starting size and a non changing canvas, the size between the labels will also stay the same even with a scaled canvas.

    So if you want to use a scaled canvas you'll have to multiply some size values with the current scale of the canvas.

    So first open up the LabelManager.cs script and add
    public Canvas canvas;
    with the other public variables, and then in the editor assign the canvas to the LabelManager script. We need the canvas to retreive it's current scale in other scripts.

    Then open the FollowTarget.cs script and change these 2 functions
    Code (CSharp):
    1. public Vector2 GetParentBasePosition() {
    2.             tempPosition = followParentScript.TargetScreenPosition;
    3.  
    4.             if (LabelManager.singleton.EnableIcons) {
    5.                 tempPosition.y += iconOffset;
    6.             }
    7.             else {
    8.                 tempPosition.y += textOffset * LabelManager.singleton.canvas.transform.localScale.x;
    9.             }
    10.  
    11.             return tempPosition;
    12.         }
    Code (CSharp):
    1. public Vector2 GetParentStackedPosition() {
    2.             tempPosition = followParentScript.TargetScreenPosition;
    3.  
    4.             tempPosition.y = TargetUiTransform.position.y + (TargetUiTransform.sizeDelta.y* LabelManager.singleton.canvas.transform.localScale.x) + (spaceBetweenLabels* LabelManager.singleton.canvas.transform.localScale.x);
    5.             return tempPosition;
    6.         }
    That seems to fix the scaling problems.
    There might be some more issues along the line but I didn't see any with the limited testing I did.

    Also fyi, if you edit one of your posts I don't get a notification in my inbox, cause I saw your last reply and it didn't contain the scaling problem. So just make a new forum post for each issue.
     
  28. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    Great ! Thanks a lot, It work well.

    Now, I need to be able to limit the distance witch the label can be seen. ( Since my game have a 3rd person view )
    Can you tell me where I have to do it ?

    Thanks !
     
  29. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    You can do that with LOD groups, someone asked that earlier.
    If the item gets culled by LOD, the same code gets called when it's not visible.
     
  30. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    Yeah but I dont want Invisible Label to Stack with Visible one ..
    Will they stack ?
     
  31. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    One more Question,
    Is there a Function to call to refresh the Stacking ?
    When I Destroy an item on the ground, I destroy the label at the same time and I got an error when it was stacking with an other label

    Code (CSharp):
    1. MissingReferenceException: The object of type 'Rigidbody2D' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. LootLabels.Drop.TargetViable () (at Assets/LootLabels/Scripts/LootLabels/Helpers/Drop.cs:174)
    4. LootLabels.Drop.CheckForDrop () (at Assets/LootLabels/Scripts/LootLabels/Helpers/Drop.cs:63)
    5. LootLabels.FollowTarget.FollowStateMachine () (at Assets/LootLabels/Scripts/LootLabels/Helpers/FollowTarget.cs:185)
    6. LootLabels.FollowTarget.ManualLateUpdate () (at Assets/LootLabels/Scripts/LootLabels/Helpers/FollowTarget.cs:138)
    7. LootLabels.FollowParent.ManualUpdateHelpers () (at Assets/LootLabels/Scripts/LootLabels/FollowParent.cs:78)
    8. LootLabels.ManualUpdate.manualUpdate () (at Assets/LootLabels/Scripts/Other/ManualUpdate.cs:20)
    9. LootLabels.ManualUpdate.LateUpdate () (at Assets/LootLabels/Scripts/Other/ManualUpdate.cs:14)
    10.  
     
  32. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    The objects have built in destroy functions to prevent these errors if I recall correctly, I don't think you can just call destroy yourself from anywhere.

    Check the example scene where you click on an item to loot it, they get destroyed too.
     
  33. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    I dont see the function that is suppose to properly Destroy the Label ..

    I tried to follow your Boolean " DisableOnClick " on the CreateLabel Script ..
    I cant find where you check if its ticked ..
    upload_2020-3-26_21-28-42.png
     
    Last edited: Mar 27, 2020
  34. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    K so the destroying is handled by the event scripts on both the 3D object(EventHandler.cs) and the label object (LabelEvents.cs).

    The event scripts contain the code for the mouse events and visibility events for both the label and the 3D object.

    We need to run the mouse events for both objects cause they are practically "linked" to each other. When you click the label, the 3D object also needs to be "looted" and vice versa.

    So when a 3D object instantiates a label, it contains a reference to the 3D object's EventHandler.cs that the Label uses to subscribe it's mouse and visibility events too.

    So in the CreateLabel.cs script basically follow the code containing the EventHandler reference.
    LabelManager.singleton.InstantiateLabel(labelSettings, GetComponent<EventHandler>());
     
  35. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    Soo, as I can see , I need to call UnsubscribeEvents() on LabelEvents.cs
    I'm currently doing it before destroying the label, and I still got this Error :

    Code (CSharp):
    1. MissingReferenceException: The object of type 'Rigidbody2D' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. LootLabels.Drop.TargetViable () (at Assets/LootLabels/Scripts/LootLabels/Helpers/Drop.cs:174)
    4. LootLabels.Drop.CheckForDrop () (at Assets/LootLabels/Scripts/LootLabels/Helpers/Drop.cs:63)
    5. LootLabels.FollowTarget.FollowStateMachine () (at Assets/LootLabels/Scripts/LootLabels/Helpers/FollowTarget.cs:185)
    6. LootLabels.FollowTarget.ManualLateUpdate () (at Assets/LootLabels/Scripts/LootLabels/Helpers/FollowTarget.cs:138)
    7. LootLabels.FollowParent.ManualUpdateHelpers () (at Assets/LootLabels/Scripts/LootLabels/FollowParent.cs:78)
    8. LootLabels.ManualUpdate.manualUpdate () (at Assets/LootLabels/Scripts/Other/ManualUpdate.cs:20)
    9. LootLabels.ManualUpdate.LateUpdate () (at Assets/LootLabels/Scripts/Other/ManualUpdate.cs:14)
    10.  
    And I cant subscribe to your MouseEvents, sinces i'm using my own mouse event to handle my own System. I need to know what to call when I destroy the object without having to subscribe to the MouseEvent when I create the Label.

    Its really annoying, because I bought your Label Stack system ONLY for the Stacking system ... And I have to Clean up all the system that you Attached to it ..
     
    Last edited: Mar 29, 2020
  36. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Well that's not how assets packages work. It's a package containing several features most of which depend on each other. You can't just start deleting and changing code and still expect it to work.

    Not sure what you mean with systems, a 3D object creates a label that stacks, drops, has visibility functions that are crucial and has mouse event where you can simply plug in the code that you want it to do.

    The rest is mostly optional, but maybe I should remove some examples to make it more user friendly.

    I added options in the inspector to configure your labels but I wouldn't change anything about the label code because of all the loopholes I had to work through to get it to work the way I wanted. It would break pretty fast.
     
  37. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    I'm not Buying Asset pack to make my Game around it !! I'm buying them to speed up my development on some features that I'm not comfortable doing.
    Your Staking label system should be separate from all your other features ...
    I have my own Rarity System, Gear System , Loot System, Spawning Gear system, Mouse Event System Ect...

    I did replug your SubscribeEvents for the mouse and I still have the same Error , So its not the problem.

    NOTE that the problem only happen when the label that i'm destroying is colliding with an other label. Otherwise , Everything is working well when I'm destroying label.

    Now can You tell me What Code I need to Edit instead of telling me to find it by myself ?
    Again, I need to know Exacly how You Destroy the Label. What is Updated in your system ?? I will call those update manually ! I need the name of the functions to call or to update with a state of something ..

    Do I need to remove something in the List
    FollowParent[] labelFollowList = new FollowParent[0];
    in ManualUpdate.cs ?
     
    Last edited: Mar 30, 2020
  38. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    I need to update something in the label that are still visible and was colliding with the label that got destroyed.
    as soon as they are colliding with a new label, the error disappear. Like if their label to check List was updated ...
    Where is that list ?
    How do I I update it ?
     
    Last edited: Mar 30, 2020
  39. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Like I said these are all examples, you don't need to use any of them. The stacking is separate.

    As listed in the documentation the only thing you need is the SpawnLabel function which you can use in any of your scripts, even your own mouse event system. As long as the object also has the EventHandler and the CreateLabel script and the canvas with the labelManager is in the scene.

    You just replace the mouse functions parameters with your own functions. Use the DroppedCurrency script as an example
    Code (CSharp):
    1. /// <summary>
    2.         /// Creates the label!!
    3.         /// Called in animator or in start when there is no animator
    4.         /// </summary>
    5.         public override void SpawnLabel() {
    6.             GetComponent<EventHandler>().ClearDelegates();
    7.             GetComponent<EventHandler>().SubscribeMouseEvents(YourClickFunction, YourHoverFunction, YourExitFunction);
    8.  
    9.                 GetComponent<CreateLabel>().SpawnLabelByColor("Your text", "your icon if needed");
    10.            
    11.  
    12.             StartCoroutine(GetComponent<EventHandler>().VisibilityCoroutine());
    13.         }
    When did I tell you to find it yourself, I told you the events for the labels are in the LabelEvents script.

    The "destroying" happens in the MouseDownFunction, all though they are not really destroyed, but get deactivated and pooled. Actually destroying them might throw errors I don't know.

    Like I said I wouldn't change anything in the label scripts, there's too much going on.
    You're better off saying what you wish to accomplish.
     
  40. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    I'm trying to make it work with your system , but it doesn't seems to remove the label.
    I did remove my "Destroy" on the label and the dropped item when I mousedown on the label.

    upload_2020-3-30_19-18-23.png

    This is one of my Item that I instantiate on the ground.

    This is the Label in the Canvas/LabelManager/Visible
    upload_2020-3-30_19-19-31.png

    What is missing ?
     
  41. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Nothing is missing, like I said you can't just start changing code and expect everything to work.
    There's a reason behind alot of the choices I made, the reasons mostly being the way unity works and physics issues.

    But if you really want to delete the labels instead of pooling them you have to do it with a coroutine like this in the Label.cs script.

    Code (CSharp):
    1. public virtual void UpdateLabelState() {
    2.             UpdateComponentStates();
    3.  
    4.             switch (LabelState) {
    5.                 case LabelStates.InCameraFrustum:
    6.                     //label needs to be active otherwise GetComponentsInChildren doesn't work
    7.                     gameObject.SetActive(true);
    8.  
    9.                     transform.SetParent(LabelManager.singleton.LabelVisible.transform, false);
    10.                     break;
    11.                 case LabelStates.OutCameraFrustum:
    12.                     if (LabelSettings.ClampToScreen) {
    13.                         transform.SetParent(LabelManager.singleton.LabelVisible.transform, false);
    14.                     }
    15.                     else {
    16.                         transform.SetParent(LabelManager.singleton.LabelInvisible.transform, false);
    17.                         gameObject.SetActive(false);
    18.                     }
    19.                     break;
    20.                 case LabelStates.Inactive:
    21.                     initialized = false;
    22.                     GetComponent<LabelEvents>().UnsubscribeEvents();
    23.                     transform.SetParent(LabelManager.singleton.LabelPool.transform, false);
    24.                    
    25.                     StartCoroutine(DestroyThis());
    26.                     break;
    27.                 default:
    28.                     break;
    29.             }
    30.         }
    31.  
    32.         IEnumerator DestroyThis() {
    33.             yield return null;
    34.             Destroy(gameObject);
    35.         }
     
  42. Poinball

    Poinball

    Joined:
    Feb 23, 2016
    Posts:
    42
    I finally found it !

    instead of destroying it, I'm setting it Inactive !!
    SetLabelState(LabelStates.Inactive);

    What you said about the label pooling putted me on the right track.

    That was the Function I was looking for all this time ..
     
  43. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    I have added Stacking Loot Labels to my project.
    I have configured the layers and done everything in the document.

    When I run the demo scene the labels start out stacked and look great.
    After they fade out if I hit the Alt key they lose all stacking for some reason(video attached).
    What can I do to stop this?

    https://www.dropbox.com/s/0bm3bkixo17t3rc/Unity_20210201_085843F.avi?dl=0
     
  44. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Hey, I don't really work on this anymore but I'll try to help you.

    First what unity version are you using this on?
    Cause I haven't tested this on anything higher then unity 2019.
    When I try the demo scene in 2019 the same way you do in the video it works as it should.

    Aside from that the only thing I can think of is that the HelperHidden object in the label prefab maybe doesn't have the layer set?
     
  45. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    Hey thanks for getting back to me.
    I'm using 2019.4.18f1.
    I have all the layers set.
    If I create a brand new project it works fine.
    The problem is when I import it into my existing project.
    I setup the label object layers the same way in both projects.
    This problem is killing me. I can't seem to figure out what is the problem.
     
  46. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    Also if I turn off "Auto Hide" on the objects, and then hold "Alt" then the stacking is lost as long as I am holding alt.
    Soon as I let go it stacks again.
     
  47. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    Ok I figured it out. Sorry to bother you. I was setting 3d physics layers instead of 2d physics layers.
     
  48. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    Cool, glad you worked it out :)
     
  49. mateuszwis

    mateuszwis

    Joined:
    Mar 4, 2020
    Posts:
    2
    Hi,
    First of all thanks for the asset as i will probably crack it at some point in time but let me just share some of my thoughts:

    It's my second day digging into this asset and sadly i have to confirm what the other guys above are saying. Im having a really hard time trying to get just the stacking system extracted from this asset. Documentation isn't very helpful in that matter

    I bought this hoping that it will speed up my game development process but it's not a plug-and-play. For now my feeling is i will spend similar amount of time trying to adjust it as writing my own anty-overlap label system.

    If i could recommend something is to isolate the label system from the rest of the assets and provide in documentation what exactly needs to be called to make it work, completely getting rid of the loot system,picking up items, mouse event handler etc. as most games have it written in their own way.

    For me the ideal version of this package would be:
    Sample scene with just some random boxes/spheres which have a way to make them instantiate label on canvas which are not overlaping.
    and that's it.

    The rest is a nice addition and I appreciate it but it's also making the system way harder to implement and understand than it should be.

    Cheers!
     
  50. lejean

    lejean

    Joined:
    Jul 4, 2013
    Posts:
    392
    If I understand you correctly, you can just toggle stacking off in the item settings. The premade examples are optional you can just use the basic script