[Unity] A couple of questions
Posted: 30 May 2014, 10:28
I already posted this in the Unity forums thread, but since the response is probably also interesting to everybody here... here it goes:
I got a couple of questions: What are XAML files exactly in the unity world? Are they some kind of customasset that sits in the assets folder and can be loaded by your planelcomponent? If that is so, can those xaml files be dynamically replaced at runtime, even with xaml files loaded from the users harddisk?
The use case woult be that my main XAML has a ContentControl somewhere that is databound to a UserControl that I specify and that a modder could potentially replace in a usermod directory to change the look of the UI.
Another thing is that you write in your docs that images are not treated as resources yet like fonts e.g. What if an image is databound? Let's say my XAML has a databinding for the image source path that is bound to a string property in my ViewModel. Can I still specify any path on the users hard disk or even the web to make XAML dynamically load that image and display it?
Use cases would again be modding and/or the user being able to use a custom avatar image or a squadron batch or stuff like that.
The new Unity GUI comes with the possibility to asign shaders to any sprite control. That makes me ask: Is there any control you have that could render something with a custom Unity shader? Like a canvas control maybe? Or could I even assign a shader to the entire UI somehow or any control? For postprocessing stuff e.g. Unity showed stuff like refraction and lighting influenced shaders in their GUI demos. How easy or at all possible would that be with your XAML solution?
And finally, can I render any Unity mesh in your UI. From what I can remember you can render 3D meshes in WPF. I have never done that though. Is that possible in your UI and how would one go about that?
What about dialog/popup windows, is that possible?
How does the UI handle mouse clicks. Does it prevent them from tickling through? meaning if I click on a control that occludes a gameobject in 3d space, will that 3d object still get a MouseDown event or will the GUI correctly swallow that up? If so, based on what 'shape', the bounding rect of the control?
Thanks
I got a couple of questions: What are XAML files exactly in the unity world? Are they some kind of customasset that sits in the assets folder and can be loaded by your planelcomponent? If that is so, can those xaml files be dynamically replaced at runtime, even with xaml files loaded from the users harddisk?
The use case woult be that my main XAML has a ContentControl somewhere that is databound to a UserControl that I specify and that a modder could potentially replace in a usermod directory to change the look of the UI.
Another thing is that you write in your docs that images are not treated as resources yet like fonts e.g. What if an image is databound? Let's say my XAML has a databinding for the image source path that is bound to a string property in my ViewModel. Can I still specify any path on the users hard disk or even the web to make XAML dynamically load that image and display it?
Use cases would again be modding and/or the user being able to use a custom avatar image or a squadron batch or stuff like that.
The new Unity GUI comes with the possibility to asign shaders to any sprite control. That makes me ask: Is there any control you have that could render something with a custom Unity shader? Like a canvas control maybe? Or could I even assign a shader to the entire UI somehow or any control? For postprocessing stuff e.g. Unity showed stuff like refraction and lighting influenced shaders in their GUI demos. How easy or at all possible would that be with your XAML solution?
And finally, can I render any Unity mesh in your UI. From what I can remember you can render 3D meshes in WPF. I have never done that though. Is that possible in your UI and how would one go about that?
What about dialog/popup windows, is that possible?
How does the UI handle mouse clicks. Does it prevent them from tickling through? meaning if I click on a control that occludes a gameobject in 3d space, will that 3d object still get a MouseDown event or will the GUI correctly swallow that up? If so, based on what 'shape', the bounding rect of the control?
Thanks