Skip to main content
added 266 characters in body
Source Link

I've been working with MVVM in WPF for agesa long time and I'm now trying out Unity3D for a GUI-driven application.

Can I work with view models and bind them to properties in GUI-components? I guess the attached script-instance would be the "data context"? But how do I for instance bind (two-way) a text-property in my script to the text-property of a GUIText?

If Unity3D doesnt support this out of the box, could I implement a "bindable GUIText" myself somehow?

I know there are a few GUI frameworks for Unity3D out there allready and some of them seem to "support" MVVM as well. But I havent been able to find out many details about this. For instance the "data binding" support in NGUI/NData seem to be only between view-components and not between view and viewmodel, which is what MVVM is all about.

UPDATE

Apparently, the guy behind Durandal and Caliburn.Micro is working on a binding-framework for Unity3D which looks very promising. I guess this answers my question basically.

I've been working with MVVM in WPF for ages and I'm now trying out Unity3D for a GUI-driven application.

Can I work with view models and bind them to properties in GUI-components? I guess the attached script-instance would be the "data context"? But how do I for instance bind (two-way) a text-property in my script to the text-property of a GUIText?

If Unity3D doesnt support this out of the box, could I implement a "bindable GUIText" myself somehow?

I know there are a few GUI frameworks for Unity3D out there allready and some of them seem to "support" MVVM as well. But I havent been able to find out many details about this. For instance the "data binding" support in NGUI/NData seem to be only between view-components and not between view and viewmodel, which is what MVVM is all about.

I've been working with MVVM in WPF for a long time and I'm now trying out Unity3D for a GUI-driven application.

Can I work with view models and bind them to properties in GUI-components? I guess the attached script-instance would be the "data context"? But how do I for instance bind (two-way) a text-property in my script to the text-property of a GUIText?

If Unity3D doesnt support this out of the box, could I implement a "bindable GUIText" myself somehow?

I know there are a few GUI frameworks for Unity3D out there allready and some of them seem to "support" MVVM as well. But I havent been able to find out many details about this. For instance the "data binding" support in NGUI/NData seem to be only between view-components and not between view and viewmodel, which is what MVVM is all about.

UPDATE

Apparently, the guy behind Durandal and Caliburn.Micro is working on a binding-framework for Unity3D which looks very promising. I guess this answers my question basically.

Source Link

Going from WPF to Unity3D, how to implement the MVVM-pattern?

I've been working with MVVM in WPF for ages and I'm now trying out Unity3D for a GUI-driven application.

Can I work with view models and bind them to properties in GUI-components? I guess the attached script-instance would be the "data context"? But how do I for instance bind (two-way) a text-property in my script to the text-property of a GUIText?

If Unity3D doesnt support this out of the box, could I implement a "bindable GUIText" myself somehow?

I know there are a few GUI frameworks for Unity3D out there allready and some of them seem to "support" MVVM as well. But I havent been able to find out many details about this. For instance the "data binding" support in NGUI/NData seem to be only between view-components and not between view and viewmodel, which is what MVVM is all about.