简体   繁体   English

Unity 5不断给我错误

[英]Unity 5 keeps giving me errors

since I've downloaded Unity 5. I have encountered countless errors. 自从我下载Unity 5以来,我遇到了无数错误。 All are alike so I googled it. 都一样,所以我用谷歌搜索。 I found a common answer but I don't know what they mean by it. 我找到了一个常见的答案,但我不知道它们的含义。

errors: 错误:

Assets/6by7/ProGrids/Scripts/Editor/ProGrids_Base.js(5,42): BCE0144: 'UnityEngine.Resources.LoadAssetAtPath(String, System.Type)' is obsolete. 资产/6by7/ProGrids/Scripts/Editor/ProGrids_Base.js(5,42):BCE0144:'UnityEngine.Resources.LoadAssetAtPath(String,System.Type)'已过时。 Use AssetDatabase.LoadAssetAtPath instead (UnityUpgradable) 请改用AssetDatabase.LoadAssetAtPath(UnityUpgradable)

Assets/6by7/ProGrids/Scripts/Editor/ProGrids_Base.js(6,40): BCE0144: 'UnityEngine.Resources.LoadAssetAtPath(String, System.Type)' is obsolete. 资产/6by7/ProGrids/Scripts/Editor/ProGrids_Base.js(6,40):BCE0144:'UnityEngine.Resources.LoadAssetAtPath(String,System.Type)'已过时。 Use AssetDatabase.LoadAssetAtPath instead (UnityUpgradable) 请改用AssetDatabase.LoadAssetAtPath(UnityUpgradable)

Assets/6by7/ProGrids/Scripts/Editor/ProGrids_Base.js(7,41): BCE0144: 'UnityEngine.Resources.LoadAssetAtPath(String, System.Type)' is obsolete. 资产/6by7/ProGrids/Scripts/Editor/ProGrids_Base.js(7,41):BCE0144:'UnityEngine.Resources.LoadAssetAtPath(String,System.Type)'已过时。 Use AssetDatabase.LoadAssetAtPath instead (UnityUpgradable) 请改用AssetDatabase.LoadAssetAtPath(UnityUpgradable)

Assets/6by7/ProGrids/Scripts/Editor/ProGrids_Base.js(8,46): BCE0144: 'UnityEngine.Resources.LoadAssetAtPath(String, System.Type)' is obsolete. 资产/6by7/ProGrids/Scripts/Editor/ProGrids_Base.js(8,46):BCE0144:'UnityEngine.Resources.LoadAssetAtPath(String,System.Type)'已过时。 Use AssetDatabase.LoadAssetAtPath instead (UnityUpgradable) 请改用AssetDatabase.LoadAssetAtPath(UnityUpgradable)

This is the common answer: It basically tells you what to do, instead of blahblah.renderer you now need to do, blahblah.GetComponent(Renderer) . 这是常见的答案:它主要是告诉你做什么,而不是blahblah.renderer你现在需要做的, blahblah.GetComponent(Renderer) It looks a little more work, but it is more generalised for all components now, and more obvious what the code used to do in the background. 它看起来需要做更多的工作,但是现在它对所有组件都具有更广泛的通用性,并且更明显地证明了代码在后台执行的操作。

I don't know what it's telling me to do. 我不知道这告诉我做什么。

It's telling you exactly what you already said. 它告诉您您已经说了什么。 You should write and use 你应该写和使用

blahblah.GetComponent<Renderer>()

instead of 代替

blahblah.renderer

You should check out UNITY 5: API CHANGES and this . 您应该查看UNITY 5:API更改以及this

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM