- schragnasher
- Posts: 33
- Joined:
Tools and Workflow
I recently started working with Noesis and it seems cool, but i'm having big issues with workflow when using Unity. I have kaxaml and Blend, I am trying to workout a workflow for one of them.
- How do people usually work with Noesis? Kaxaml? Blend?
- How can i get blend/Kaxaml to see my UserControls?
- How do I setup a DataContext without blend freaking out and no longer showing my ui in the preview?
- Iv gotten the binding to work, but I really was hoping to get a workflow that i can use easily.
- schragnasher
- Posts: 33
- Joined:
Re: Tools and Workflow
Iv made some more progress tonight, iv figured the UserControls in blend, they show up and work ok, just get a nice Exclamation mark when i use them in another file
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Tools and Workflow
I normally use Kaxaml for simple xaml files, without custom controls or viewmodels in there.I recently started working with Noesis and it seems cool, but i'm having big issues with workflow when using Unity. I have kaxaml and Blend, I am trying to workout a workflow for one of them.
- How do people usually work with Noesis? Kaxaml? Blend?
- How can i get blend/Kaxaml to see my UserControls?
If I need to use them, then I move to Blend, where I can create the required classes to show the xaml exactly as it would be shown in NoesisGUI. If you have a UserControl in NoesisGUI, you have to create the corresponding UserControl in Blend with the same namespace and name, the same properties, etc. In fact, you can share almost the same .cs file in both frameworks and wrap incompatible code with #if sections.
As I said before, you need to create the same class in Blend, with same properties. And again, 90% of class code can be shared with NoesisGUI 1.2.[*]How do I setup a DataContext without blend freaking out and no longer showing my ui in the preview?
You probably have to find the workflow that best fits you. I feel comfortable by creating a Blend project inside the Unity project, and design everything (xaml+cs) from Blend, wrapping the incompatible code with #if sections, so the same cs can work in Blend and Unity. Edit in Blend, switch back to Unity and Play[*]Iv gotten the binding to work, but I really was hoping to get a workflow that i can use easily.[/list]
- schragnasher
- Posts: 33
- Joined:
Re: Tools and Workflow
Ah! The if sections is a good idea. Thanks for suggesting.
Re: Tools and Workflow
I have a Blend folder next to the Asset folder of the Unity project. Then I create a symlink to share the files between Unity and Blend. Structure would look something like this:
Also you can do some nifty tricks such as copying the UserControlSourceAttribute.cs file into a shared C# project. Then you can add that project to the Blend solution. Other files you might want to share are DelegateCommand.cs and a custom UnityEngine.Debug class.
On a sidenote, I wish there was a UNITY symbol, now you have to be 'creative' with your ifdefs. "#if UNITY_EDITOR || UNITY_ANDROID || UNITY_IOS || ad infinitum". Or you have to define your own custom symbols in the Unity editor.
Code: Select all
My Unity Project Folder
-- Assets
---- Game
------- MVVM (symlink source)
---------- Model
---------- ViewModels
---------- Views
-- Blend
---- BlendGame
------ BlendGame
---------- MVVM (symlink target)
On a sidenote, I wish there was a UNITY symbol, now you have to be 'creative' with your ifdefs. "#if UNITY_EDITOR || UNITY_ANDROID || UNITY_IOS || ad infinitum". Or you have to define your own custom symbols in the Unity editor.
-
sfernandez
Site Admin
- Posts: 2984
- Joined:
Re: Tools and Workflow
+1 to the UNITY symbolOn a sidenote, I wish there was a UNITY symbol, now you have to be 'creative' with your ifdefs. "#if UNITY_EDITOR || UNITY_ANDROID || UNITY_IOS || ad infinitum". Or you have to define your own custom symbols in the Unity editor.
I don't understand why Unity team didn't think about it.
Who is online
Users browsing this forum: Ahrefs [Bot] and 46 guests