Prefab动态修改无效的解决方案

来源:互联网 发布:西门子200plc编程实例 编辑:程序博客网 时间:2024/05/16 14:14

To save anything on a prefab it must be done from an editor script, where you assign it to the array and then use the SetDirty function to tell the editor that the data has changed and requires saving。

EditorUtility.SetDirty(asset)
Mark:当在代码中修改其他的一些资源文件如"scriptableObject","NGUI 's Atlas" 等也需要这样处理。

0 0
原创粉丝点击