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();
    }



没有更多推荐了,返回首页