Forum rules - please read before posting.

Inventory item texture too big...

Hi all, I'm using the walking dead download for my ui, and I've just made my first inventory item.  When I show my inventory with the one item in it, it is way bigger than the first inventory slot - in fact the frame of the slot doesn't even show. 
To complicate matters, if I leave the number of inventory slots at 5 (the default number), the image stretches to fill all the slots, so I limited the slots to 1, but as I said the image is still too big.
I am assuming I am missing something basic, but after scouring the inventory menu settings and game settings in the AC game editor, I can't find what I'm doing wrong.  The image is a 256 x 256 png texture. Any assistance is appreciated.  Thanks.

Comments

  • Have you modified the downloaded Inventory menu?

    Check the Size field of your InventoryBox element's properties.  If it is set to Automatic, it will take the size of your inventory graphic (i.e. 256x256).  If you set it to Absolute Pixels or Manual, you can choose the size of it there in the editor.

    If you're still having trouble, post screenshots of your Menu's properties as shown in the Menu Manager, and how it looks in-game.
  • Hi Chris. The only modification I have made to the menu is a different texture for the inventory slots, everything else is default.

    I don't have a "Size" field in the inventoryBox properties, all I have is "Element name" and "Is visible?",
    "Display" (icon, text, or both), "max number of slots" and "when slot is empty", then it goes on to Linked button objects, which is none.

    This is under Menu/Inventory in the AC editor, right?  Thanks.
  • Ah - if you're not getting a Size field, it'll be because the Menu itself is relying on Unity UI to draw it, rather than AC's built-in renderer.  This means that the size is determined by the Unity UI prefab instead.

    You can correct this either by amending the prefab, or by switching to AC's renderer instead.  To amend the prefab, find the Linked Canvas field in the Menu's properties and drag the prefab (should be WD_InventoryUI) into your scene, adjust the inventory btuton sizes to suit, apply changes and remove from the scene.  Otherwise, set the Menu's Source field to Adventure Creator, and then adjust the InventoryBox's Size field, while having the Game window open to see the changes made in real-time.
  • Thanks for that Chris, I will give that a go and see if it works.  I have another question while I'm here if I may:
    I have 3 small scenes currently in my project, which is 3d point and click, and the first 2 scenes open with a small cutscene, which in both cases uses the default player camera, so no camera switches.

      In one cutscene, the camera remains still and doesn't move at all until it is done, as all the action happens directly in front of it, however, the 2nd cutscene involves the player entering the scene through a door on the left before stopping in the room in front of the main player camera, but even though the camera again does not move, it does turn on the y axis as it follows the player x axis movement to the right as they walk through the door into the scene.  Then play begins as normal, again with no need for a camera switch.  But sometimes, not all the time, when the 2nd scene loads the opening cutscene, the camera is positioned at it's maximum x constraint to the right (based on the maximum distance the player can move across the room in the x axis), a long way from the player, instead of it's default start position, at which point I have to stop playing as the player toon is too far away.

      This never happens in the editor, only now and then in a test build.  Any thoughts on what  is going on here? (Apologies for the wall of writing, hoping it makes sense).  Thanks.
  • Thought I better mention this - I'm using Unity 5.5.0f3 pro, and I haven't downloaded your latest update yet, but while in the editor this afternoon, I went from the inspector back to the AC Editor, and the Scene menu was not showing at all - all the other menu tabs were working fine, but all I had in the Scene menu were the folder buttons.  I ended up having to click one of them for the menu to come back up, which gave me a new default player start, and I had to fill out all the relevant fields again.  Not sure if you've had this happen before, this is a first for me, and I've been using AC 1.55a with this version of Unity for almost 3 weeks without a problem.  Sorry about the new post, but can't see an edit button here.

    Cheers. 
  • In future, please post separate issues in new threads, so that others can search for them more easily.

    The camera issue is too complex to understand without some video or screenshots.  Would you be able to provide some visuals to help explain it?  Also, what platform are you building to?

    The Scene Manager issue would be because it's not detecting your scene as an "AC" one.  This is basically a case of whether or not there is an instance of AC's GameEngine prefab present in the scene.  Was this occuring in an old scene you were working on?
  • Yes, the scene menu disappeared after I had been working in the scene for a couple of hours, and using the AC editor as normal to add various hotspots etc to the scene, when suddenly it wasn't there.

    I have linked 2 images. The close-up of the player is the correct start camera position in the editor,
    the distant pic is the start camera in the build.
    Thanks.
    imageimage
  • Oops, forgot to mention building for default windows mac Linux.  I will remember to start a new post next time, sorry mate.

    Cheers.
  • Ok, you can ignore this whole thread Chris, I figured out what was going on with the camera, and it all works as it should.  At some point I unchecked 'use default player start' in that scene for some reason, and that's why it was way off, I think - no idea why it still worked in the editor though.

    As for the AC Editor menu, I'm going to assume I also deleted the game engine from my hierarchy, based on what you say above, though I don't know how.  Having said that, the scenes are small but busy.

      And re the inventory, I had already dragged the WD Inventory UI into the scene to apply the new slot frames and resize them, so I just resized the item image to 64 x 64, and now it looks better, though the inventory slot frame still disappears for some reason.  I have yet to try it with more than one inventory item, hopefully it will work.

    Thanks for your time mate, and have a Happy New Year!!

    Cheers.
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.