Workaround for limited userdata type


I need to have a link between an object I detect upon collision and a AI class instance associated with it
so I naively used setUserData on a spatial, but I noticed it only accept simple native objects

is there a common way to pass this limitation ?

otherwise I would have to have a hashmap that I would have to parse or something



[edit: oh yeah just found out about the Savable interface, sorry about this, please void theis thread :frowning:

You can put a Savable in the user data. So you can make any object you want, implement savable, and you’ll then be able to add them in the user data