Hi sorry if I posted this in the wrong place. I am looking to find a solution to making a rpg inventory system. Problems im having is I can't seem to get the keyboard to work with scroll rect. I've googled myself out on the problem and hoping there is an asset out there that could accomplish this task. Please let me know I will be forever grateful if I can find a solution.
You can check the asset store but why would you give up? If you can't finish that thing you wont finish harder things.
True you maybe right. But I feel like it's a limitation of the engine. Maybe I just don't understand it. I haven't given up im just looking for ideas. I need an inventory that's manageable via keyboard and it seems difficult to implement or impossible. Using the GUI system.
You want an Inventory like the pokemon gameboy games? If so it's doable and there have been tutorials on it since 2014 if you keep looking.
The basic idea is to set your canvas from constant pixel size to scale with screen. Then set up your scroll rect the way you want it to look. Use Layouts on it to make sure the content of it is properly put in order. In you code you'll want to reference your Event System. Event System has the ability to SetSelectedObject. In your code, set this to your first button in the scroll rect. as long as each button has navigation set correctly, you'll be able to navigate your menu with a GamePad or Keyboard like how Pokemon would allow. This is how I would accomplish this.
Another way would be to handle it all completely in code. Have each item be referenced in a list. Then set it up to say If you press an axis a certain way it goes to the next item in the list. From there you can set it to say change the color of the selected object and you would get the same visual results as what I said above except it's all handled by code. This would ignore the event system all together and to activate the buttons you could use buttonReference,onClick.Invoke() to call whatever function you had on the button.
Thank you I think I may do alot of it in code. Also I found an example game I might look into how they did it. I feel like it's doable I just had to rearrange the GUI a little. I got it working in a scollable format with the keys now. So am pretty happy. Now just to make it dynamic like a real inventory system. Thanks for the encouragement
It's definitely the latter. You're nowhere near running into the limitations of the engine. A quick search for creating Pokémon inventories turned up the following framework on Github. It's incomplete but it appears to have entries for the player's bag if you wanted some reference material for building your own solution. https://github.com/PokemonUnity/PokemonUnity
Yes I did find that. That's when I got hope. It seemed really complicated to me. But it is using the old gui system.