![]() ![]() ![]() If someone ever thinks of doing this type of menu at runtime here is how i did:Ģ)Add a vertical layout group to it (or horizontal.).ģ)Add a content size fitter to it, it's going to resize our panel automatically. And if OnGui() is the correct way to do this how can I accomplish the result I showed in the first picture.ĭoes anyone have an idea of how I could realize that menu ? I don't know if I can use OnGui() for this kind of stuff. The way I tried with the basic menu setup is not a good way. Here's the way I made the menu right now (I cant use the scroll wheel or mouse in it actually):Ī door as these options: Open, LockPick, Blowing itĪ pile of cash have only one option: Take.Ī way to create a custom menu while in game with a number of options I can change, options name that changes, scroll up to select above option, scroll down to select under and left click to validate. I don't see how to change the number of buttons and their positions on the fly, since every interactable object can have a number of options. What I have: When I aim at an object close enough, a little menu (panel with buttons) opens ( SetActive(true)), but I made it with the editor. If you have not played SWAT4 the menu look as follow: you can use the scroll wheel to select the option and press the Left mouse button to validate. I would like to make an interaction system that use a small context menu to choose what to do. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |