schragnasher
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

Tools and Workflow

08 Mar 2015, 01:56

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
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

Re: Tools and Workflow

08 Mar 2015, 06:07

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 :)
 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: Tools and Workflow

13 Mar 2015, 12:42

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?
I normally use Kaxaml for simple xaml files, without custom controls or viewmodels in there.

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.
[*]How do I setup a DataContext without blend freaking out and no longer showing my ui in the preview?
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.
[*]Iv gotten the binding to work, but I really was hoping to get a workflow that i can use easily.[/list]
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 ;)
 
schragnasher
Topic Author
Posts: 33
Joined: 07 Mar 2015, 01:58

Re: Tools and Workflow

13 Mar 2015, 13:10

Ah! The if sections is a good idea. Thanks for suggesting.
 
movra
Posts: 70
Joined: 02 Apr 2014, 20:35

Re: Tools and Workflow

13 Mar 2015, 19:33

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:
My Unity Project Folder
-- Assets
---- Game 
------- MVVM (symlink source)
---------- Model
---------- ViewModels
---------- Views
-- Blend
---- BlendGame
------ BlendGame
---------- MVVM (symlink target)
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.
 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: Tools and Workflow

13 Mar 2015, 19:47

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.
+1 to the UNITY symbol :D

I don't understand why Unity team didn't think about it.

Who is online

Users browsing this forum: No registered users and 0 guests