- XaeroDegreaz
- Posts: 29
- Joined:
Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty
When I change out the XAML to use on the NoesisView, the scene doesn't act like anything has changes. That means when i save my scene, the scene doesn't capture the view changes. I have to mess with something else in the scene, then save it, and the NoesisView settings are reflected in the scene state.
-
sfernandez
Site Admin
- Posts: 2983
- Joined:
Re: Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty
Thanks for reporting this, we will fix it for the next release.
Re: Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty
Same, made this script for a quick edit-reload-editback of all xaml-files.
Code: Select all
using UnityEngine;
using UnityEditor;
using System.IO;
public class ReloadXamlViews : MonoBehaviour
{
[MenuItem("Tools/Reload Xaml Views")]
static void ReloadXamlViewsAction()
{
// Modify
ScanDir(Path.Combine(Application.dataPath, "Views"));
// Reload
AssetDatabase.Refresh(ImportAssetOptions.ForceSynchronousImport);
// Modify back
ScanDir(Path.Combine(Application.dataPath, "Views"));
}
private static void ScanDir(string dir)
{
foreach (var subdir in Directory.GetDirectories(dir))
{
ScanDir(subdir);
}
foreach (var file in Directory.GetFiles(dir, "*.xaml"))
{
using (var stream = File.Open(file, FileMode.Open, FileAccess.ReadWrite))
{
stream.Seek(-1, SeekOrigin.End);
if (stream.ReadByte() == 32)
{
// Last character of file is space, decrease file size by 1
stream.SetLength(stream.Length - 1);
}
else
{
// Last character is not space, add space to end
stream.Seek(0, SeekOrigin.End);
stream.WriteByte(32);
}
}
}
}
}
Re: Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty
This shouldn't be happening in the last stable version (2.1.0f1), it was fixed long time ago. What version are you using?
Re: Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty
I have 2.1.0f1 version and this problem too.
Re: Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty
Ops, could you please file a report in the tracker? Betas for 2.2 will start to roll very soon and this should be investigated.
Re: Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty
We are trying to fix this issue. It seems to be the same as
https://www.noesisengine.com/bugs/view.php?id=1369
but we need your help. Please, comment here, in that ticket or a new ticket. We need exact steps to reproduce this, if possible not using git.
Thanks!
https://www.noesisengine.com/bugs/view.php?id=1369
but we need your help. Please, comment here, in that ticket or a new ticket. We need exact steps to reproduce this, if possible not using git.
Thanks!
Who is online
Users browsing this forum: Google [Bot], vinick and 59 guests