Can I use platform-specific UIs

Short version:
Is it possible to make separate UIs for each platform natively so that I can show real Windows Phone / iOS / Android UI elements while still using Unity?

Long Version:
I started a project a few months ago where I was attempting to use a native UI for each of the mobile platforms and have the platform-specific code talk back and forth with the Unity code. I had this working in a Windows Universal App by modifying the main XAML and XAML.cs files. I mostly used UnityEngine to do the communication.

So now it has been a few months and it is no longer working. I get errors about not being able to call some of the UnityEngine methods on a non-main thread. I used a dispatcher to invoke my code on a UI thread and that still does not seem to be helping.

Is there a way that I can accomplish what I’m explaining? Like I mentioned, I did have this working for a Windows Universal App at some point, but something has changed. I did not do much with iOS or Android yet.

Edit: I am using a very similar method to what is described in the docs for communication between a Windows Phone 8 app and Unity.

You will find this quite handy: Unity - Scripting API: RuntimePlatform

Make a script that is called DisableOnPlatformMismatch.cs

public class DisableOnPlatformMismatch : Monobehaviour
public RuntimePlatform runtimePlatform;
void OnEnable()
if(Application.platform != runtimePlatform)

Make a UI for each platform and place this script on them all. Set the runtimeplatform to the corresponding match and you should be good to go.

The downside to this approach is all the versions of your UI will be included in the build which depending on the complexity of your UIs could cause longer load times. On the plus side you don’t have to have multiple copies of your project with a different UI on it.