XaeroDegreaz
Topic Author
Posts: 29
Joined: 26 Nov 2013, 04:47

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

18 Mar 2017, 05:38

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.

Tags:
 
User avatar
sfernandez
Site Admin
Posts: 1610
Joined: 22 Dec 2011, 19:20

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

20 Mar 2017, 19:27

Thanks for reporting this, we will fix it for the next release.
 
Casette
Posts: 1
Joined: 17 Jul 2018, 20:04

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

17 Jul 2018, 20:06

Edit.
 
tedd
Posts: 2
Joined: 27 Jun 2017, 23:50

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

28 Aug 2018, 22:55

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);
                }
            }
        }

    }
}
 
User avatar
jsantos
Site Admin
Posts: 2538
Joined: 20 Jan 2012, 17:18
Contact:

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

28 Aug 2018, 23:54

This shouldn't be happening in the last stable version (2.1.0f1), it was fixed long time ago. What version are you using?
 
KIVI
Posts: 1
Joined: 29 Aug 2018, 12:15

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

03 Sep 2018, 02:07

I have 2.1.0f1 version and this problem too.
 
User avatar
jsantos
Site Admin
Posts: 2538
Joined: 20 Jan 2012, 17:18
Contact:

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

04 Sep 2018, 20:48

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.
 
User avatar
jsantos
Site Admin
Posts: 2538
Joined: 20 Jan 2012, 17:18
Contact:

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

18 Jan 2019, 15:36

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!

Who is online

Users browsing this forum: No registered users and 4 guests