Git Product home page Git Product logo

Comments (9)

builder-main avatar builder-main commented on May 19, 2024 1

I have multiple watchers set, not tested yet if it faills, I'll keep an eye on it.

from fastscriptreload.

handzlikchris avatar handzlikchris commented on May 19, 2024 1

I'd start looking in FastScriptReload.Editor.FastScriptReloadManager.OnWatchedFileChange and see if file changes are correctly calling that method.

Probably just by making some islolated changes to file-watcher 1, then 2 then 3 and see if method is called.

Ideally it'd be which would mean issue is somewhere in that method when it tries to mark files for hot-reload.

If it's not called then issue will be down to either

  1. File Watcher initialization which is done in FastScriptReload.Editor.FastScriptReloadManager.StartWatchingDirectoryAndSubdirectories - finding bug there should be fairly straight forward, if it's not setting properly
  2. Some issue with FileWatcher - it actually has quite a few issues (Unity implementation) - so wouldn't be that surprised if it's down to that.

Would be good to hear what you have found, thanks!

from fastscriptreload.

handzlikchris avatar handzlikchris commented on May 19, 2024 1

I think in general bugged in Unity implementation. I've seen some odd issues with that for a while now. On some editor versions file watcher will just give you file-name without actual part (even relative to project root).

Probably only real solution is to implement different file-watching mechanism

from fastscriptreload.

builder-main avatar builder-main commented on May 19, 2024

Ii was working but now it isn't anymore, I have 3 file watchers specified, only the files watch by the 1st one are hot reloaded. Pretty sure it was working prior to unknown 😄

You could indicate me what I should check for

from fastscriptreload.

builder-main avatar builder-main commented on May 19, 2024

FastScriptReload.Editor.FastScriptReloadManager.OnWatchedFileChange is indeed not called. And the file watcher seems fine after initialization.
So it seems to lie in the file watcher itself.

from fastscriptreload.

builder-main avatar builder-main commented on May 19, 2024

Could be this :
dotnet/runtime#17626
I will try the solution and let you know
NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName,

from fastscriptreload.

builder-main avatar builder-main commented on May 19, 2024

Could be this : dotnet/runtime#17626 I will try the solution and let you know NotifyFilter = NotifyFilters.LastWrite | NotifyFilters.FileName,

No, not working !

from fastscriptreload.

builder-main avatar builder-main commented on May 19, 2024

Does nothing more :

 fileWatcher.NotifyFilter = NotifyFilters.Attributes
                                       | NotifyFilters.CreationTime
                                       | NotifyFilters.DirectoryName
                                       | NotifyFilters.FileName
                                       | NotifyFilters.LastAccess
                                       | NotifyFilters.LastWrite
                                       | NotifyFilters.Security
                                       | NotifyFilters.Size;
            fileWatcher.Changed += OnWatchedFileChange;
            fileWatcher.Created += OnWatchedFileChange;
            fileWatcher.Deleted += OnWatchedFileChange;
            fileWatcher.Renamed += OnWatchedFileChange;
            fileWatcher.Error += (object sender, ErrorEventArgs e) => Debug.LogError(e.GetException());

from fastscriptreload.

builder-main avatar builder-main commented on May 19, 2024

It's terribly weird.

  1. <Application.dataPath>/3rdParties/GPUInstancer alone works
  2. <Application.dataPath>/Scripts alone works.
  3. 1 + 2 only triggers files in 2.
  4. 2 + 1 only triggers files in 2
  5. <Application.dataPath> alone is too slow on recompile and enter play mode.

What is going on !?

My random guess : internally the filewatcher impl might order the path and have some savy mechanism to avoid concurrent watching and which is bugged in this case ?

from fastscriptreload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.