Announcement

Collapse
No announcement yet.

Need help on Shipping package

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Need help on Shipping package

    Hi everyone,

    We just finished to work on our project so we launched the shipping package. After reviewing the game it appears that we have an issue with some images only in the shipping version.

    Here is how it's built :

    Our player is walking inside a map.
    In this map he finds items that we add in his inventory (simple array of those items).
    Each item is represented by one or several images that we display on the screen via a HUD that receives an array of texture 2D.
    When he reaches the end of the actual map we make a save of the inventory using a structure dedicated and we load the second map.
    When we load the second map we check the save object and we create version of the previously picked items inside the second map so i can still see the previous items.

    Here is the issue. The save is parsed perfectly and all items are loaded in the inventory. However when we pick one of the items in the inventory to display the image in it's HUD it doesn't display anything and we lose the focus so we can't really do anything.

    The issue only applies on items picked in the previous map that are loaded in the actual one. And it seems that we only have issues with the images attached to the items.

    Items found in the second level works perfectly in the inventory. And when we are playing in the editor everything works perfectly.

    Does someone have any idea where it can come from ?

    If you need more information let me know.
    Last edited by H0ros; 05-26-2019, 05:19 AM.

    #2
    Up,

    if you got any clue, we are in need!

    Comment


      #3
      Probably something to do with where items are stored / executed ?
      If anything of your inventory is kept / stored executed within a certain level it may not be found when you move to the next level.
      My suggestion is to put everything in the game instance...... which is the first thing created and persistent across the entire project.
      If anything needs a tick function (which is not available in game instance), consider using the game mode but set all object references from the game instance,
      eg in game intance Variable1, get game mode , cast to gamemode, set Var1
      Another possibility is replication, which probably does not take effect when PIE but would in a packed game ?

      Sorry can't be specific but the pointers may help

      Paul G

      Comment


        #4
        Thank you very much for your feedback.

        By putting everything in the Game Instance, do you mean that we should move every item variable to the game instance ?

        Not sure how I can put an item into my map and making sure that the reference to the images are set on the Game Instance instead of being in the map.

        Should I create an array of items in the Game Instance and moving the items to this array when the player pick them ?

        Comment


          #5
          Hi everyone,

          After a few more tests it appears that the issue was in my loading function. Before building the inventory from scratch for each item I was checking if the item was valid. Which in the editor is not when we change the map. But it seems that in the packaged version, items from other maps are somewhat accessible and considered as valid where I expected them not to.

          Changing a bit the check solved my issue since it automatically switched to the rebuild of the items.

          Thank you for the help.

          Comment


            #6
            Glad you sorted things :-)


            Paul G

            Comment

            Working...
            X