Пример #1
0
        private static void generateSourceFromType(string file, Type type)
        {
            var    generator   = new WrapperGenerator();
            string guiFileText = generator.getWrappedFile(type);

            //Debug.Log(guiFileText);

            FileUtil.DeleteFileOrDirectory(file);
            File.WriteAllText(file, guiFileText);
            AssetDatabase.SaveAssets();
            AssetDatabase.ImportAsset(file);
            AssetDatabase.Refresh();
        }
        private static void generateSourceFromType(string file, Type type)
        {
            var generator = new WrapperGenerator();
            string guiFileText = generator.getWrappedFile(type);

            //Debug.Log(guiFileText);

            FileUtil.DeleteFileOrDirectory(file);
            File.WriteAllText(file, guiFileText);
            AssetDatabase.SaveAssets();
            AssetDatabase.ImportAsset(file);
            AssetDatabase.Refresh();
        }