Browse Source

Only recreate solution file if specified (+3 squashed commit)

Squashed commit:

[5b710af] Adding asset scan begin/end events, new asset event, regenerate C# solution before opening generated C# script/component

[2d90270] Switch C# project generator to use relative paths for source files and post build assembly copy

[16f244c] Binary assemblies in Resources will now be added to generated project assembly, project binary assemblies can be in any path and will be resolved at runtime
Josh Engebretson 9 years ago
parent
commit
274ccb6500

+ 33 - 0
Script/AtomicNET/AtomicNET/Application/PlayerApp.cs

@@ -23,6 +23,39 @@ namespace AtomicEngine
 
 
             AtomicNET.RegisterSubsystem("ResourceCache");
             AtomicNET.RegisterSubsystem("ResourceCache");
             AtomicNET.Cache = AtomicNET.GetSubsystem<ResourceCache>();
             AtomicNET.Cache = AtomicNET.GetSubsystem<ResourceCache>();
+
+            AppDomain currentDomain = AppDomain.CurrentDomain;
+            currentDomain.AssemblyResolve += new ResolveEventHandler(AtomicResolveEventHandler);
+
+        }
+
+        // Resolve assemblies from Resource directories at runtime (todo, assemblies in package files?)
+        static private Assembly AtomicResolveEventHandler(object sender, ResolveEventArgs args)
+        {
+            //This handler is called only when the common language runtime tries to bind to the assembly and fails.
+
+            string assemblyFileName = args.Name.Substring(0, args.Name.IndexOf(",")) + ".dll";
+
+            for (uint i = 0; i < AtomicNET.Cache.NumResourceDirs; i++)
+            {
+                string[] assemblies = Directory.GetFiles(AtomicNET.Cache.GetResourceDir(i), "*.dll", SearchOption.AllDirectories);
+
+                for (int j = 0; j < assemblies.Length; j++)
+                {
+                    if (assemblies[j].Contains(assemblyFileName))
+                    {
+                        //Load the assembly from the specified path.                    
+                        Assembly loadAssembly = Assembly.LoadFrom(assemblies[j]);
+
+                        //Return the loaded assembly.
+                        return loadAssembly;
+
+                    }
+                }
+            }
+
+            return null;
+
         }
         }
 
 
         protected static void ExecuteAtomicMain(string[] args)
         protected static void ExecuteAtomicMain(string[] args)

+ 58 - 2
Source/Atomic/IO/FileSystem.cpp

@@ -1243,8 +1243,8 @@ bool IsAbsoluteParentPath(const String& absParentPath, const String& fullPath)
     if (!IsAbsolutePath(absParentPath) || !IsAbsolutePath(fullPath))
     if (!IsAbsolutePath(absParentPath) || !IsAbsolutePath(fullPath))
         return false;
         return false;
 
 
-    String path1 = AddTrailingSlash(absParentPath);
-    String path2 = AddTrailingSlash(GetPath(fullPath));
+    String path1 = AddTrailingSlash(GetSanitizedPath(absParentPath));
+    String path2 = AddTrailingSlash(GetSanitizedPath(GetPath(fullPath)));
 
 
     if (path2.StartsWith(path1))
     if (path2.StartsWith(path1))
         return true;
         return true;
@@ -1252,7 +1252,63 @@ bool IsAbsoluteParentPath(const String& absParentPath, const String& fullPath)
     return false;
     return false;
 }
 }
 
 
+String GetSanitizedPath(const String& path)
+{
+    String sanitized = GetInternalPath(path);
+
+    StringVector parts = sanitized.Split('/');
+
+    sanitized = String::Joined(parts, "/");
+
+    return sanitized;
+}
+
+bool GetRelativePath(const String& fromPath, const String& toPath, String& output)
+{
+    output = String::EMPTY;
+
+    String from = GetSanitizedPath(fromPath);
+    String to = GetSanitizedPath(toPath);
+
+    StringVector fromParts = from.Split('/');
+    StringVector toParts = to.Split('/');
+
+    if (!fromParts.Size() || !toParts.Size())
+        return false;
+
+    if (fromParts == toParts)
+    {
+        return true;
+    }
+
+    // no common base?
+    if (fromParts[0] != toParts[0])
+        return false;
+
+    int startIdx;
+
+    for (startIdx = 0; startIdx < toParts.Size(); startIdx++)
+    {
+        if (startIdx >= fromParts.Size() || fromParts[startIdx] != toParts[startIdx])
+            break;       
+    }
+
+    if (startIdx == toParts.Size())
+        return false;
+
+    for (int i = 0; i < (int)fromParts.Size() - startIdx; i++)
+    {
+        output += "../";
+    }
+
+    for (int i = startIdx; i < (int) toParts.Size(); i++)
+    {
+        output += toParts[i] + "/";
+    }
+
+    return true;
 
 
+}
 
 
 // ATOMIC END
 // ATOMIC END
 
 

+ 5 - 0
Source/Atomic/IO/FileSystem.h

@@ -166,6 +166,11 @@ ATOMIC_API bool IsAbsolutePath(const String& pathName);
 
 
 // ATOMIC BEGIN
 // ATOMIC BEGIN
 ATOMIC_API bool IsAbsoluteParentPath(const String& absParentPath, const String& fullPath);
 ATOMIC_API bool IsAbsoluteParentPath(const String& absParentPath, const String& fullPath);
+ATOMIC_API String GetSanitizedPath(const String& path);
+
+/// Given two absolute directory paths, get the relative path from one to the other
+/// Returns false if either path isn't absolute, or if they are unrelated
+ATOMIC_API bool GetRelativePath(const String& fromPath, const String& toPath, String& output);
 // ATOMIC END
 // ATOMIC END
 
 
 }
 }

+ 9 - 0
Source/Atomic/Resource/ResourceCache.h

@@ -210,6 +210,15 @@ public:
     /// Returns a formatted string containing the memory actively used.
     /// Returns a formatted string containing the memory actively used.
     String PrintMemoryUsage() const;
     String PrintMemoryUsage() const;
 
 
+    // ATOMIC BEGIN
+    
+    /// Get the number of resource directories
+    unsigned GetNumResourceDirs() const { return resourceDirs_.Size(); }
+    /// Get resource directory at a given index
+    const String& GetResourceDir(unsigned index) const { return index < resourceDirs_.Size() ? resourceDirs_[index] : String::EMPTY; }
+
+    // ATOMIC END
+
 private:
 private:
     /// Find a resource.
     /// Find a resource.
     const SharedPtr<Resource>& FindResource(StringHash type, StringHash nameHash);
     const SharedPtr<Resource>& FindResource(StringHash type, StringHash nameHash);

+ 26 - 3
Source/ToolCore/Assets/AssetDatabase.cpp

@@ -42,7 +42,8 @@
 namespace ToolCore
 namespace ToolCore
 {
 {
 
 
-AssetDatabase::AssetDatabase(Context* context) : Object(context)
+AssetDatabase::AssetDatabase(Context* context) : Object(context),
+    assetScanDepth_(0)
 {
 {
     SubscribeToEvent(E_LOADFAILED, ATOMIC_HANDLER(AssetDatabase, HandleResourceLoadFailed));
     SubscribeToEvent(E_LOADFAILED, ATOMIC_HANDLER(AssetDatabase, HandleResourceLoadFailed));
     SubscribeToEvent(E_PROJECTLOADED, ATOMIC_HANDLER(AssetDatabase, HandleProjectLoaded));
     SubscribeToEvent(E_PROJECTLOADED, ATOMIC_HANDLER(AssetDatabase, HandleProjectLoaded));
@@ -229,7 +230,7 @@ String AssetDatabase::GetDotAssetFilename(const String& path)
 
 
 }
 }
 
 
-void AssetDatabase::AddAsset(SharedPtr<Asset>& asset)
+void AssetDatabase::AddAsset(SharedPtr<Asset>& asset, bool newAsset)
 {
 {
 
 
     assert(asset->GetGUID().Length());
     assert(asset->GetGUID().Length());
@@ -242,6 +243,13 @@ void AssetDatabase::AddAsset(SharedPtr<Asset>& asset)
     asset->UpdateFileTimestamp();
     asset->UpdateFileTimestamp();
 
 
     VariantMap eventData;
     VariantMap eventData;
+
+    if (newAsset)
+    {        
+        eventData[AssetNew::P_GUID] = asset->GetGUID();
+        SendEvent(E_ASSETNEW, eventData);
+    }
+
     eventData[ResourceAdded::P_GUID] = asset->GetGUID();
     eventData[ResourceAdded::P_GUID] = asset->GetGUID();
     SendEvent(E_RESOURCEADDED, eventData);
     SendEvent(E_RESOURCEADDED, eventData);
 }
 }
@@ -316,6 +324,13 @@ void AssetDatabase::PreloadAssets()
 
 
 void AssetDatabase::Scan()
 void AssetDatabase::Scan()
 {
 {
+    if (!assetScanDepth_)
+    {
+        SendEvent(E_ASSETSCANBEGIN);
+    }
+
+    assetScanDepth_++;
+
     PruneOrphanedDotAssetFiles();
     PruneOrphanedDotAssetFiles();
 
 
     FileSystem* fs = GetSubsystem<FileSystem>();
     FileSystem* fs = GetSubsystem<FileSystem>();
@@ -358,7 +373,9 @@ void AssetDatabase::Scan()
             SharedPtr<Asset> asset(new Asset(context_));
             SharedPtr<Asset> asset(new Asset(context_));
 
 
             if (asset->SetPath(path))
             if (asset->SetPath(path))
-                AddAsset(asset);
+            {
+                AddAsset(asset, true);
+            }
         }
         }
         else
         else
         {
         {
@@ -389,6 +406,12 @@ void AssetDatabase::Scan()
     if (ImportDirtyAssets())
     if (ImportDirtyAssets())
         Scan();
         Scan();
 
 
+    assetScanDepth_--;
+
+    if (!assetScanDepth_)
+    {
+        SendEvent(E_ASSETSCANEND);
+    }
 }
 }
 
 
 void AssetDatabase::GetFolderAssets(String folder, PODVector<Asset*>& assets) const
 void AssetDatabase::GetFolderAssets(String folder, PODVector<Asset*>& assets) const

+ 3 - 1
Source/ToolCore/Assets/AssetDatabase.h

@@ -75,7 +75,7 @@ private:
     void HandleFileChanged(StringHash eventType, VariantMap& eventData);
     void HandleFileChanged(StringHash eventType, VariantMap& eventData);
     void HandleResourceLoadFailed(StringHash eventType, VariantMap& eventData);
     void HandleResourceLoadFailed(StringHash eventType, VariantMap& eventData);
 
 
-    void AddAsset(SharedPtr<Asset>& asset);
+    void AddAsset(SharedPtr<Asset>& asset, bool newAsset = false);
 
 
     void PruneOrphanedDotAssetFiles();
     void PruneOrphanedDotAssetFiles();
 
 
@@ -95,6 +95,8 @@ private:
 
 
     Vector<String> usedGUID_;
     Vector<String> usedGUID_;
 
 
+    unsigned assetScanDepth_;
+
 };
 };
 
 
 }
 }

+ 13 - 0
Source/ToolCore/Assets/AssetEvents.h

@@ -43,6 +43,19 @@ ATOMIC_EVENT(E_ASSETIMPORTERROR, AssetImportError)
     ATOMIC_PARAM(P_ERROR, Error);                  // string
     ATOMIC_PARAM(P_ERROR, Error);                  // string
 }
 }
 
 
+ATOMIC_EVENT(E_ASSETSCANBEGIN, AssetScanBegin)
+{
+}
+
+ATOMIC_EVENT(E_ASSETSCANEND, AssetScanEnd)
+{
+}
+
+ATOMIC_EVENT(E_ASSETNEW, AssetNew)
+{
+    ATOMIC_PARAM(P_GUID, GUID);                  // string
+}
+
 ATOMIC_EVENT(E_ASSETRENAMED, AssetRenamed)
 ATOMIC_EVENT(E_ASSETRENAMED, AssetRenamed)
 {
 {
     ATOMIC_PARAM(P_ASSET, Asset);                  // asset ptr
     ATOMIC_PARAM(P_ASSET, Asset);                  // asset ptr

+ 67 - 6
Source/ToolCore/NETTools/NETProjectGen.cpp

@@ -108,9 +108,17 @@ namespace ToolCore
             for (unsigned j = 0; j < result.Size(); j++)
             for (unsigned j = 0; j < result.Size(); j++)
             {
             {
                 XMLElement compile = igroup.CreateChild("Compile");
                 XMLElement compile = igroup.CreateChild("Compile");
+                
+                String path = sourceFolder + result[j];
+
+                String relativePath;
+                
+                if (GetRelativePath(projectPath_, GetPath(path), relativePath))
+                {
+                    path = relativePath + GetFileName(path) + GetExtension(path);
+                }
 
 
                 // IMPORTANT: / Slash direction breaks intellisense :/
                 // IMPORTANT: / Slash direction breaks intellisense :/
-                String path = sourceFolder + result[j];
                 path.Replace('/', '\\');
                 path.Replace('/', '\\');
 
 
                 compile.SetAttribute("Include", path.CString());
                 compile.SetAttribute("Include", path.CString());
@@ -183,11 +191,38 @@ namespace ToolCore
                 continue;
                 continue;
             }
             }
 
 
-            String refpath = ref + ".dll";
             xref = igroup.CreateChild("Reference");
             xref = igroup.CreateChild("Reference");
             xref.SetAttribute("Include", ref);
             xref.SetAttribute("Include", ref);
 
 
         }
         }
+
+        Project* project = projectGen_->GetAtomicProject();
+
+        if (project)
+        {
+            Vector<String> result;
+            GetSubsystem<FileSystem>()->ScanDir(result, project->GetResourcePath(), "*.dll", SCAN_FILES, true);
+
+            for (unsigned j = 0; j < result.Size(); j++)
+            {
+                String path = project->GetResourcePath() + result[j];
+
+                String relativePath;
+
+                if (GetRelativePath(projectPath_, GetPath(path), relativePath))
+                {
+                    if (projectGen_->GetCSProjectByName(GetFileName(path)))
+                        continue;
+
+                    path = relativePath + GetFileName(path) + GetExtension(path);
+                }
+
+                xref = igroup.CreateChild("Reference");
+                xref.SetAttribute("Include", path);
+            }
+
+        }
+
     }
     }
 
 
     void NETCSProject::CreateProjectReferencesItemGroup(XMLElement &projectRoot)
     void NETCSProject::CreateProjectReferencesItemGroup(XMLElement &projectRoot)
@@ -411,7 +446,16 @@ namespace ToolCore
             afterBuild.SetAttribute("Name", "AfterBuild");
             afterBuild.SetAttribute("Name", "AfterBuild");
             XMLElement copy = afterBuild.CreateChild("Copy");
             XMLElement copy = afterBuild.CreateChild("Copy");
             copy.SetAttribute("SourceFiles", "$(TargetPath)");
             copy.SetAttribute("SourceFiles", "$(TargetPath)");
-            copy.SetAttribute("DestinationFolder", projectPath_ + "../../../Resources/");
+
+            String destPath = projectPath_ + "../../../Resources/";
+            String relativePath;            
+
+            if (GetRelativePath(projectPath_, atomicProject->GetResourcePath(), relativePath))
+            {
+                destPath = AddTrailingSlash(relativePath);
+            }
+
+            copy.SetAttribute("DestinationFolder", destPath);
 
 
             // Create the AtomicProject.csproj.user file if it doesn't exist
             // Create the AtomicProject.csproj.user file if it doesn't exist
             String userSettingsFilename = projectPath_ + name_ + ".csproj.user";
             String userSettingsFilename = projectPath_ + name_ + ".csproj.user";
@@ -531,7 +575,8 @@ namespace ToolCore
         return true;
         return true;
     }
     }
 
 
-    NETSolution::NETSolution(Context* context, NETProjectGen* projectGen) : NETProjectBase(context, projectGen)
+    NETSolution::NETSolution(Context* context, NETProjectGen* projectGen, bool rewrite) : NETProjectBase(context, projectGen),
+       rewriteSolution_(rewrite)
     {
     {
 
 
     }
     }
@@ -613,6 +658,13 @@ namespace ToolCore
 
 
         source += "EndGlobal\n";
         source += "EndGlobal\n";
 
 
+        if (!rewriteSolution_)
+        { 
+            FileSystem* fileSystem = GetSubsystem<FileSystem>();
+            if (fileSystem->Exists(slnPath))
+                return;
+        }
+        
         SharedPtr<File> output(new File(context_, slnPath, FILE_WRITE));
         SharedPtr<File> output(new File(context_, slnPath, FILE_WRITE));
         output->Write(source.CString(), source.Length());
         output->Write(source.CString(), source.Length());
         output->Close();
         output->Close();
@@ -644,7 +696,8 @@ namespace ToolCore
         return true;
         return true;
     }
     }
 
 
-    NETProjectGen::NETProjectGen(Context* context) : Object(context)
+    NETProjectGen::NETProjectGen(Context* context) : Object(context),
+        rewriteSolution_(false)
     {
     {
 
 
     }
     }
@@ -704,10 +757,18 @@ namespace ToolCore
         return true;
         return true;
     }
     }
 
 
+    void NETProjectGen::SetRewriteSolution(bool rewrite)
+    {
+        rewriteSolution_ = rewrite;
+
+        if (solution_.NotNull())
+            solution_->SetRewriteSolution(rewrite);
+    }
+
     bool NETProjectGen::LoadProject(const JSONValue &root)
     bool NETProjectGen::LoadProject(const JSONValue &root)
     {
     {
 
 
-        solution_ = new NETSolution(context_, this);
+        solution_ = new NETSolution(context_, this, rewriteSolution_);
 
 
         solution_->Load(root["solution"]);
         solution_->Load(root["solution"]);
 
 

+ 12 - 1
Source/ToolCore/NETTools/NETProjectGen.h

@@ -111,7 +111,7 @@ namespace ToolCore
 
 
     public:
     public:
 
 
-        NETSolution(Context* context, NETProjectGen* projectGen);
+        NETSolution(Context* context, NETProjectGen* projectGen, bool rewrite = false);
         virtual ~NETSolution();
         virtual ~NETSolution();
 
 
         bool Load(const JSONValue& root);
         bool Load(const JSONValue& root);
@@ -126,6 +126,10 @@ namespace ToolCore
         // Registers a NuGet package, returns true if the package hasn't been previously registered
         // Registers a NuGet package, returns true if the package hasn't been previously registered
         bool RegisterPackage(const String& package);
         bool RegisterPackage(const String& package);
 
 
+        /// If true, the sln file will rewritten if it exists, default is false
+        void SetRewriteSolution(bool rewrite) { rewriteSolution_ = rewrite; }
+
+
     private:
     private:
 
 
         void GenerateSolution(const String& slnPath);
         void GenerateSolution(const String& slnPath);
@@ -134,6 +138,7 @@ namespace ToolCore
         String outputPath_;
         String outputPath_;
         String solutionGUID_;
         String solutionGUID_;
         Vector<String> packages_;
         Vector<String> packages_;
+        bool rewriteSolution_;
 
 
     };
     };
 
 
@@ -167,12 +172,18 @@ namespace ToolCore
 
 
         String GenerateUUID();
         String GenerateUUID();
 
 
+        /// If true, the sln file will rewritten if it exists, default is false
+        void SetRewriteSolution(bool rewrite);
+
         bool LoadProject(const JSONValue& root);
         bool LoadProject(const JSONValue& root);
         bool LoadProject(const String& projectPath);
         bool LoadProject(const String& projectPath);
         bool LoadProject(Project* project);
         bool LoadProject(Project* project);
 
 
     private:
     private:
 
 
+        // if true, the solution (sln) file will be recreated if it exists
+        bool rewriteSolution_;
+
         String scriptPlatform_;
         String scriptPlatform_;
 
 
         SharedPtr<Project> atomicProject_;
         SharedPtr<Project> atomicProject_;

+ 36 - 1
Source/ToolCore/NETTools/NETProjectSystem.cpp

@@ -30,6 +30,7 @@
 
 
 #include "../ToolSystem.h"
 #include "../ToolSystem.h"
 #include "../Assets/AssetEvents.h"
 #include "../Assets/AssetEvents.h"
+#include "../Assets/AssetDatabase.h"
 #include "../Project/Project.h"
 #include "../Project/Project.h"
 #include "../Project/ProjectEvents.h"
 #include "../Project/ProjectEvents.h"
 
 
@@ -225,6 +226,8 @@ namespace ToolCore
 
 
         if (solutionDirty_)
         if (solutionDirty_)
         {
         {
+            // set to false in case of error, we don't want to keep trying to 
+            // rebuild, TODO: better error handling
             solutionDirty_ = false;
             solutionDirty_ = false;
             GenerateSolution();
             GenerateSolution();
         }
         }
@@ -260,6 +263,22 @@ namespace ToolCore
             projectAssemblyDirty_ = true;
             projectAssemblyDirty_ = true;
 
 
     }
     }
+
+    void NETProjectSystem::HandleAssetScanBegin(StringHash eventType, VariantMap& eventData)
+    {
+
+    }
+
+    void NETProjectSystem::HandleAssetScanEnd(StringHash eventType, VariantMap& eventData)
+    {
+        if (solutionDirty_)
+        {
+            // set to false in case of error, we don't want to keep trying to 
+            // rebuild, TODO: better error handling
+            solutionDirty_ = false;
+            GenerateSolution();
+        }
+    }
     
     
     void NETProjectSystem::HandleProjectUnloaded(StringHash eventType, VariantMap& eventData)
     void NETProjectSystem::HandleProjectUnloaded(StringHash eventType, VariantMap& eventData)
     {
     {
@@ -271,9 +290,21 @@ namespace ToolCore
 
 
     }
     }
 
 
-    void NETProjectSystem::HandleResourceAdded(StringHash eventType, VariantMap& eventData)
+    void NETProjectSystem::HandleAssetNew(StringHash eventType, VariantMap& eventData)
     {
     {
+        using namespace ResourceAdded;
+
+        const String& guid = eventData[P_GUID].ToString();
 
 
+        Asset* asset = GetSubsystem<AssetDatabase>()->GetAssetByGUID(guid);
+
+        if (asset->GetExtension() == ".cs")
+            solutionDirty_ = true;
+    }
+
+    void NETProjectSystem::HandleResourceAdded(StringHash eventType, VariantMap& eventData)
+    {
+        
     }
     }
 
 
     void NETProjectSystem::HandleResourceRemoved(StringHash eventType, VariantMap& eventData)
     void NETProjectSystem::HandleResourceRemoved(StringHash eventType, VariantMap& eventData)
@@ -302,11 +333,15 @@ namespace ToolCore
         SubscribeToEvent(E_PROJECTLOADED, ATOMIC_HANDLER(NETProjectSystem, HandleProjectLoaded));
         SubscribeToEvent(E_PROJECTLOADED, ATOMIC_HANDLER(NETProjectSystem, HandleProjectLoaded));
         SubscribeToEvent(E_PROJECTUNLOADED, ATOMIC_HANDLER(NETProjectSystem, HandleProjectUnloaded));
         SubscribeToEvent(E_PROJECTUNLOADED, ATOMIC_HANDLER(NETProjectSystem, HandleProjectUnloaded));
 
 
+        SubscribeToEvent(E_ASSETSCANBEGIN, ATOMIC_HANDLER(NETProjectSystem, HandleAssetScanBegin));
+        SubscribeToEvent(E_ASSETSCANEND, ATOMIC_HANDLER(NETProjectSystem, HandleAssetScanEnd));
+
         SubscribeToEvent(E_FILECHANGED, ATOMIC_HANDLER(NETProjectSystem, HandleFileChanged));
         SubscribeToEvent(E_FILECHANGED, ATOMIC_HANDLER(NETProjectSystem, HandleFileChanged));
 
 
         SubscribeToEvent(E_RESOURCEADDED, ATOMIC_HANDLER(NETProjectSystem, HandleResourceAdded));
         SubscribeToEvent(E_RESOURCEADDED, ATOMIC_HANDLER(NETProjectSystem, HandleResourceAdded));
         SubscribeToEvent(E_RESOURCEREMOVED, ATOMIC_HANDLER(NETProjectSystem, HandleResourceRemoved));
         SubscribeToEvent(E_RESOURCEREMOVED, ATOMIC_HANDLER(NETProjectSystem, HandleResourceRemoved));
 
 
+        SubscribeToEvent(E_ASSETNEW, ATOMIC_HANDLER(NETProjectSystem, HandleAssetNew));
         SubscribeToEvent(E_ASSETRENAMED, ATOMIC_HANDLER(NETProjectSystem, HandleAssetRenamed));
         SubscribeToEvent(E_ASSETRENAMED, ATOMIC_HANDLER(NETProjectSystem, HandleAssetRenamed));
         SubscribeToEvent(E_ASSETMOVED, ATOMIC_HANDLER(NETProjectSystem, HandleAssetMoved));
         SubscribeToEvent(E_ASSETMOVED, ATOMIC_HANDLER(NETProjectSystem, HandleAssetMoved));
 
 

+ 4 - 0
Source/ToolCore/NETTools/NETProjectSystem.h

@@ -76,6 +76,10 @@ namespace ToolCore
         void HandleAssetRenamed(StringHash eventType, VariantMap& eventData);
         void HandleAssetRenamed(StringHash eventType, VariantMap& eventData);
         void HandleAssetMoved(StringHash eventType, VariantMap& eventData);
         void HandleAssetMoved(StringHash eventType, VariantMap& eventData);
 
 
+        void HandleAssetNew(StringHash eventType, VariantMap& eventData);
+        void HandleAssetScanBegin(StringHash eventType, VariantMap& eventData);
+        void HandleAssetScanEnd(StringHash eventType, VariantMap& eventData);
+
         void HandleProjectLoaded(StringHash eventType, VariantMap& eventData);
         void HandleProjectLoaded(StringHash eventType, VariantMap& eventData);
         void HandleProjectUnloaded(StringHash eventType, VariantMap& eventData);
         void HandleProjectUnloaded(StringHash eventType, VariantMap& eventData);