Forum rules - please read before posting.

Can I change the display position of the inventory number on cursor?

I checked "can carry multiple?", set the selection mode to ALL, and then I found that it seems unable to set the number display position on the cursor; it shows in the middle by default.
Any ideas? Thank you.

Comments

  • If you're using Software or Hardware cursor rendering, the "item count" label will be shown in the centre.

    If you use Unity UI, however, then this is shown within a Text component that you assign in the Unity UI Cursor component, which you can then reposition as needed.

    The default UnityUICursor prefab should be set up with this already - try setting the Cursor rendering mode over to Unity Ui and see how things look. You can find more details on this mode in the Manual's "Unity UI cursor rendering" chapter.

  • I created a text child under the CursorUI prefab and but I can't assign it in the Item count Text, I can only assign text asset in my project, which won't display in my game. What should I do?

    https://drive.google.com/file/d/1MHn6ijwbCqtmdWQ0DSAMQnmLAZF3F4DV/view?usp=drive_link

    Unity version: 2022.3.41f1c1
    AC version:1.81.6

  • Can you share a screenshot of the Text (Legacy) object's Inspector? So long as it has a Text component, it should assign.

  • Can't see why that'd have an issue. Try opening it up in Prefab Mode, and then clicking the circle to the right of the field to bring up the selection window - can you assign it that way?

    If you have TextMesh Pro installed, try using that instead.

  • edited October 2024

    I created a new project and import AC only and did it in prefab mode, tried both legacy and TMP and still can't work. Clicking the circle to the right shows only "asset" tab and there's nothing under it. If I create a text asset, I can assign it, but it won't show on the cursor.

    PS: In this video, it said that I didn't import TMP essentials, but I got the same result after importing it.

  • Recreated, thanks.

    I'll look into an official fix for v1.82, but in the meantime: open up AC's UnityUICursor script and replace the line (around line 194):

    itemCountText = (Text) CustomGUILayout.ObjectField<Text> ("Item count Text:", itemCountText, false, string.Empty, "A Text component to display the selected inventory item's Count text");
    

    with:

    itemCountText = (Text) EditorGUILayout.ObjectField ("Item count Text:", itemCountText, typeof (Text));
    
  • It worked, thank you so much!

  • edited October 2024

    One more question, sir. How to make the count number invisible when I right-click to deselect an item? Currently it keeps showing on my cursor and will update when I select another item.

  • Sounds like a bug - I'll look into it, thanks for the report.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.