永发信息网

unityeditorbuildsettings.asset何时被修改

答案:2  悬赏:50  手机版
解决时间 2021-04-07 10:43
  • 提问者网友:你独家记忆
  • 2021-04-06 16:01
unityeditorbuildsettings.asset何时被修改
最佳答案
  • 五星知识达人网友:天凉才是好个秋
  • 2020-07-13 07:08
现在需要在Unity编辑器中下载,而且需要较新版的Unity,否则没法下载。 在Unity中的Window菜单栏打开Asset Store,登陆之后就可以下载了,直接下载到电脑上,也可以下载后直接导入到当前的工程中。 win7下载到C:\Users\你的电脑名\AppData\Roami
全部回答
  • 1楼网友:廢物販賣機
  • 2020-11-18 09:52
  • description 这是一个很容易的创建一个新的派生类实例的方法scriptableobject资产文件。该资产是唯一命名,并放置在当前选定的项目路径,scriptableobject资产文件用于存储数据,不适合自然monobehaviour /对象预制系统内。因为他们使用unity内置的序列化,他们是保证完全映射到一个现有的类;因此,scriptableobject资产工作在unity比xml,csv文件或其他传统的存储这些数据的方法更容易.
  • usage scriptableobjectutility.cs复制到您的项目。然后创建一个类yourclassasset.cs scriptableobjectutility.cs using unityengine; using unityeditor; using system.io; public static class scriptableobjectutility { /// // this makes it easy to create, name and place unique new scriptableobject asset files. /// public static void createasset () where t : scriptableobject { t asset = scriptableobject.createinstance (); string path = assetdatabase.getassetpath (selection.activeobject); if (path == "") { path = "assets"; } else if (path.getextension (path) != "") { path = path.replace (path.getfilename (assetdatabase.getassetpath (selection.activeobject)), ""); } string assetpathandname = assetdatabase.generateuniqueassetpath (path + "/new " + typeof(t).tostring() + ".asset"); assetdatabase.createasset (asset, assetpathandname); assetdatabase.saveassets ();         assetdatabase.refresh(); editorutility.focusprojectwindow (); selection.activeobject = asset; } } youreditorasset.cs using unityengine; using unityeditor; public class youreditorasset { [menuitem("assets/create/yourclass")] public static void createasset () { scriptableobjectutility.createasset (); } } yourclassasset.cs
  • using unityengine; using unityeditor; public class yourclassasset : scriptableobject {      //写上各种变量 }
  • 之后就可以生成出像这样高大上的*.asset文件
  • 我要举报
    如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
    点此我要举报以上问答信息
    大家都在看
    推荐资讯