Update modelview from another thread (Unity3D)
Hi all,
I've got a seperate thread for loading data from an USB stick. This thread should update the user interface with the current filename.
This crashes the Unity Editor (and the standalone application) almost immediately.
In the modelview:
From within the thread:
Did I make a mistake or is this just not possible - or not the right way..?
I've got a seperate thread for loading data from an USB stick. This thread should update the user interface with the current filename.
This crashes the Unity Editor (and the standalone application) almost immediately.
In the modelview:
Code: Select all
private object _LockObject = new object();
protected string _progressString;
public string progressString
{
get {
lock (_LockObject) {
return _progressString;
}
}
set {
lock (_LockObject) {
_progressString = value;
NotifyPropertyChanged ("progressString");
}
}
}
Code: Select all
_mainWindow.progressString = filename;
Re: Update modelview from another thread (Unity3D)
NoesisGUI API can only be accessed from the main Unity thread in the current version. We are working in 1.3 to support several UIs in several threads but this is mainly for the native SDK, I don't think it will apply for the Unity integration. We will also try to support loading XAML's in worker thread, but that is a different thing.
Who is online
Users browsing this forum: No registered users and 5 guests