For example, I want the Escape key, or a gamepad's 'Start' button to invoke the in-game Pause Menu. The way I am approaching it for this first pass is, I'm going to implement a RewiredGameInputManager for capturing Rewired input Action events, and then use my event system to fire off events to all my other systems. So, having accepted that, I am turning my attention to all other controllers that are NOT the mouse. I have the discussion in the Rewired thread here. It's the damn mouse that's the oddball, and I have to manage my absolute screen position separately from all other input. When I started to integrate Rewired, I noticed that there are only bindings for delta movement on GetAxis(), which is understandable, since this is what controllers can generically generate. I chose Rewired because I wanted to support gamepads and keyboard-only play. It's a turn-based board game, so I am opting to use the system hardware cursor rather than relying on a software cursor. So, I'm using NGUI's UICamera event handlers to capture mouse movement, buttons, and keyboard input. Well, I suppose I'm going to use this thread as a platform for me to talk about my trials during this process, at least until I formulate a solution that's suitable for a blog entry. Thanks for your input (pun not originally intended). That means I'll have to uncouple my input from the UICamera events, and create an intermediate event manager for Rewired specifically, and hope that forwarding these events to NGUI is enough to not break things. How do you prevent the input state from getting out of sync? Typically, that would be to have a single source of input, which every system draws from. Like, if you have a Rewired input manager, and forward those events to UICamera, surely there will be other systems in the game that consume the Rewired input. is enough to do a full-fledged implementation. absolute coordinates, so, I guess my questions are more geared towards mouse input, but overall, UICamera is so loaded with functionality, that I'm not sure if swapping every instance of Input. There are numerous systems that are at play here, like hit detection, dragging, and mouse relative vs. Thoughts and advice would be greatly appreciated.Ĭlick to expand.I'm looking more from an architectural standpoint, and I'm curious about what some projects did to design their Rewired Input system to work with NGUI. Have you felt that NGUI has been invaluable with its performance and relative ease of development, and felt that it had good-enough controller support for your needs and felt that integrating Rewired was not worth the time and effort to integrate? Have you felt that Rewired was more valuable and chosen a different UI asset/Unity GUI, or had to scrap NGUI and integrate something else? Have you built your game with Rewired first and now have difficulty using NGUI? Have you built your game on NGUI and have difficulty integrating Rewired as I am? I would like to hear from other developers that have integrated or plan/planned to integrate these two assets. NGUI's existing delegates and entire event system in UICamera have so much going under the hood, that swapping in Rewired seems to be a task that defeats the purpose of using both assets together for convenience. The most helpful recommendations I've seen are to override the NGUI UICamera input delegates with Rewired behavior, but that's a severe over simplification of the actual problem. I've been having a hell of a time trying to figure out the best way to integrate the two packages.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |