Blend & Unity Workflow
Hey Guys:
I've got a project setup that can be compiled in Unity and Blend, but adding new UserControls is a pain.
The code for the controls lives in the Assets folder, but the Visual Studio projects live elsewhere. I don't know an easy way to add a new file to a project that lives outside the projects dir structure.
Also, I've tried creating a new UserControl with the Visual Studio template, but a chunk of code needs to be changed in both the code (xaml.vs) and layout (xaml) files to get it to compile in both environments.
Do you guys have an easier way of doing this?
Thanks.
-Erik
I've got a project setup that can be compiled in Unity and Blend, but adding new UserControls is a pain.
The code for the controls lives in the Assets folder, but the Visual Studio projects live elsewhere. I don't know an easy way to add a new file to a project that lives outside the projects dir structure.
Also, I've tried creating a new UserControl with the Visual Studio template, but a chunk of code needs to be changed in both the code (xaml.vs) and layout (xaml) files to get it to compile in both environments.
Do you guys have an easier way of doing this?
Thanks.
-Erik
Re: Blend & Unity Workflow
To clarify things a bit, I've used the Visual Studio addon to generate a Noesis project for Unity, but the solution/project it creates assumes that everything exists under that project's dir structure.
I'm trying to get something working that looks more like this:
In order to add a new custom UserControl, I have to:
1. Open a template I created for new UserControls that has all the header guards in it (#ifdef NOESIS, etc).
2. Save that as a new file in the Assets folder.
3. Manually edit the project file to include the new UserControl as a reference in a subdir outside of the project folder.
4. Open the project in Blend.
5. Edit the control within Blend.
I'm thinking of writing a couple of simple scripts to generate the VS project from my Asset structure and generate a new UserControl, but wanted to ask you guys about it first.
I'm trying to get something working that looks more like this:
Code: Select all
project root
|==> Assets
| |==> UI
| |==> UserControls .xaml/.xaml.cs
|==> UITest
| |==> Blend Project .sln/.prj
1. Open a template I created for new UserControls that has all the header guards in it (#ifdef NOESIS, etc).
2. Save that as a new file in the Assets folder.
3. Manually edit the project file to include the new UserControl as a reference in a subdir outside of the project folder.
4. Open the project in Blend.
5. Edit the control within Blend.
I'm thinking of writing a couple of simple scripts to generate the VS project from my Asset structure and generate a new UserControl, but wanted to ask you guys about it first.
-
sfernandez
Site Admin
- Posts: 2991
- Joined:
Re: Blend & Unity Workflow
Hi,
One of the benefits of having Assets folder inside Blend project is you can directly work on Blend project and new controls will automatically be compiled and usable by Unity. This is why our project template for Visual Studio builds the project like that.
If you see our samples always follow the same folder structure:
And using #if to define the corresponding namespaces for Blend and Unity.
In case you want to have separate folders, in your Blend project you can use "Add > Existing Item... > Add As Link" (this option appears in the dropdown of the Add button), instead of modifying the project manually. But we don't recommend this approach because it is harder to make images or font resources that live inside Assets folder to properly work in Blend.
One of the benefits of having Assets folder inside Blend project is you can directly work on Blend project and new controls will automatically be compiled and usable by Unity. This is why our project template for Visual Studio builds the project like that.
If you see our samples always follow the same folder structure:
Code: Select all
Project/
Project.sln
<blend-only files>
Assets/
<blend-unity shared files>
In case you want to have separate folders, in your Blend project you can use "Add > Existing Item... > Add As Link" (this option appears in the dropdown of the Add button), instead of modifying the project manually. But we don't recommend this approach because it is harder to make images or font resources that live inside Assets folder to properly work in Blend.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 14 guests