Ejemplo n.º 1
0
        public static void OnWillCreateAsset(string path)
        {
            if (!path.Contains("Assets/Scripts/"))
            {
                return;
            }

            FilePathProcessor.ComplexFilePaths paths = FilePathProcessor.CheckAndGetPath(path);
            if (paths != null)
            {
                NamespaceCorrector.CorrectNamespace(paths);
            }
        }
Ejemplo n.º 2
0
        public static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths)
        {
            for (int i = 0; i < movedFromAssetPaths.Length; i++)
            {
                if (!movedAssets[i].Contains("Assets/Scripts/"))
                {
                    continue;
                }

                FilePathProcessor.ComplexFilePaths paths = FilePathProcessor.CheckAndGetPath(movedAssets[i]);
                if (paths != null)
                {
                    NamespaceCorrector.CorrectNamespace(paths);
                }
            }
        }