Skip to main content
3 events
when toggle format what by license comment
Nov 24, 2018 at 14:17 comment added lsauceda Well this function will just return the first component conforming to the protocol, ignoring any other components conforming to the protocol. But you can just make an array (or a set), add any component conforming to the protocol to the array, and return that instead.
Nov 19, 2018 at 3:05 comment added idolize Thanks for sharing! Are there any concerns about having multiple components that all conform to the same protocol on an entity and only getting back one? I'm not sure if the component(ofType) one has similar issues, but it seems like this approach could exacerbate it at the very least.
Jul 16, 2018 at 0:31 history answered lsauceda CC BY-SA 4.0