#UIToolKit Data Binding "by type" : How does it work?

1 messages · Page 1 of 1 (latest)

novel rune
#

Hi there. I'm trying to understand how this (see attached 1) works : i put a binding by type of my c# class (plain class, system.serializable, that's it)
From what i understand, i selected a type of object i can put in my datasource, in my object, and then i can, at runtime, put an instance of my class as the datasource via script.

However, i'm getting spammed with warnings (see attached 2) that my datasource is empty and that unity can't bind it ? This is making me think that i cannot do it that way, or that i'm misconcepting how it works. Anyone might guiding me to ressources on this topic specifically? I sadly did not find anything on the docs for that.
Then, as a test, i did add a contextmenu to my start function to be able to execute it out of play mode, and the warnings stop. Though when i open my UIBuilder back up they come back and my datasource is set at empty. I supposed we're not supposed to do this out of playmode.

viral plume