Forum rules - please read before posting.

Open Inventory Lag

Hi! Using Unity 5.5.2f1 and AC 1.56b

I have an inventory bar, click a button to leave it open and click the same button to hide it. Works great.

When I pick up an item and the inventory is open, there is this lag/delay before the item shows in the inventory. If I click in the inventory it'll make it show up. Is there a way to have picking up an item refresh the inventory menu so it shows up immediately?

Thanks!

Comments

  • I'll need to know more in order to recreate this.  How long are we talking about?  Is the Inventory menu rendererd with AC or Unity UI?

    Let's see the ActionList too.  At what point is the Inventory: Add or remove Action used, and what are the ActionList's properties.
  • edited February 2018
    Here's a gif of the bug, the items appear in the inventory on the next "click" of the mouse.


    Inventory menu is rendered with AC. I'm using a script for picking things up (the wait is for the animation):






        public void pickUp(int inventoryObject){

            StartCoroutine(waitToPickUp(inventoryObject));

        }



        IEnumerator waitToPickUp(int inventoryObject){

            yield return new WaitForSeconds(.75f);



            KickStarter.runtimeInventory.Add(inventoryObject,1,false,-1);

            sceneObject.SetActive(false);

        }

  • This is fixed in the latest release.  Alternatively, you'll have to force the updating of inventory boxes after adding the item:

    PlayerMenus.ResetInventoryBoxes ();
  • Thank you!!!!!!!!! :)
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.