Wouldn’t it be cool if, instead of me having to spend hours checking the exact rules for how “get input focus” works, I could just click a tickbox in the collection proxy that says “get input” ? I know this is something that comes up a lot for beginners (like the “extrude borders” option, which i think many beginners would find useful to have it set to 1).
Would it really help to have a checkbox on the collection factory? You still need to know the input rules and that the proxy needs input focus for any input to propagate down to the game objects of the collection. I also don’t like that it would mean that we have a mix of editor control for input and control of input through code.
Ay Britzl, sorry for never posting these in the right place. Thanks for your edit.
You are right, like many of my suggestions, it’s something that would be useful for beginners but not necessarily Best Practice. I think it comes up a lot for other people (along with the extrude borders problem).
However. I’d say that the instruction manual could be clearer.
It is clear now that in order for any on_input() component code in a dynamically loaded collection to receive input actions, the game object containing the collection proxy must be on the input stack.
Even if the collection proxy’s game object contain no on_input() code at all, it must still send a acquire_input_focus message to itself to be added on top of the input stack. Any game object inside the loaded collection must send “acquire_input_focus” to get added to the collection’s input stack.
I’d write that as:
A dynamically loaded collection (i.e., one that you load using a collection proxy) can’t receive input unless the game object you used to load it has already acquired input.
Then, this part (whilst important in the long run) is not really necessary to explain at this point and could be omitted.
Note that if at any step down the input stack an on_input() function returns true, then it will consume the input. It does not matter where that happens, actions will not be passed on further. If necessary, a loaded collection can therefore consume input and prevent objects further down the main collection input stack from receiving any actions.
A collection is just a container. It doesn’t handle input. Scripts handle input, and you may have several scripts inside a collection. They may also be used at different scenarios. I don’t think a generic check box should be added to a collection
Also, while trying to strike a balance between flexibility and ease-of-use, we don’t want to encourage behaviour that is in fact bad for the end result, the game, in terms of performance and memory.
In this case, we don’t want the textures to take more memory than necessary. Our belief is that it’s better that beginners learn and understand the reasoning behind the options and their ramifications.