Unity中保存简单数据到prefab的meta文件中

原文:http://www.xuanyusong.com/archives/4227

[MenuItem("1/1")]
    static public void Test()
    {
        string path = AssetDatabase.GetAssetPath(Selection.activeObject);
        AssetImporter  import = AssetImporter.GetAtPath(path);
        import.userData = "user data";
        import.SaveAndReimport();
    }



你可能感兴趣的:(Unity中保存简单数据到prefab的meta文件中)