Page 1 of 1

Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty

Posted: 18 Mar 2017, 05:38
by XaeroDegreaz
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.

Re: Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty

Posted: 20 Mar 2017, 19:27
by sfernandez
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

Posted: 17 Jul 2018, 20:06
by Casette
Edit.

Re: Unity - Changing the XAML on the NoesisView doesn't mark the scene as dirty

Posted: 28 Aug 2018, 22:55
by tedd
Same, made this script for a quick edit-reload-editback of all xaml-files.
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

Posted: 28 Aug 2018, 23:54
by jsantos
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

Posted: 03 Sep 2018, 02:07
by KIVI
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

Posted: 04 Sep 2018, 20:48
by jsantos
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

Posted: 18 Jan 2019, 15:36
by jsantos
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!