burst2flame
Topic Author
Posts: 2
Joined: 11 Mar 2024, 18:04

Sharing Code Between Blend and Unity

13 May 2024, 20:17

Hi!

I'd prefer to be able to define my DataContext class in one place and use it in both unity and in the blend file. Is this possible? If so, how is this accomplished.
 
User avatar
sfernandez
Site Admin
Posts: 3027
Joined: 22 Dec 2011, 19:20

Re: Sharing Code Between Blend and Unity

15 May 2024, 10:52

Hi, you can share the same viewmodel (or code-behind) classes for Blend and Unity, you just need to use some conditional compilation to distinguish between the different types in WPF and Noesis/Unity. We use that approach in some of our examples, like in here: https://github.com/Noesis/Tutorials/blo ... ewModel.cs

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 10 guests