Quantcast
Channel: Questions in topic: "build"
Viewing all articles
Browse latest Browse all 4084

How to fix AddComponent(UnityEngine.GameObject, string, string)' is obsolete

$
0
0
string first = "Assets/X-UniTMX/Code/Map.cs (2684,5)"; string second = obj.GetPropertyAsString(Property_AddComponent + c); UnityEngineInternal.APIUpdaterRuntimeServices.AddComponent(gameObject, first, second); I'm using a tiled loader ([X_UniTMX][1]) and it has some obsolete code which is preventing me to build the project. I get this error : Assets/X-UniTMX/Code/Map.cs(2685,63): error CS0619: `UnityEngineInternal.APIUpdaterRuntimeServices.AddComponent(UnityEngine.GameObject, string, string)' is obsolete: `Method is not meant to be used at runtime. Please, replace this call with GameObject.AddComponent()/GameObject.AddComponent(Type).' Any help would be appreciated. [full code map.cs][2] [1]: https://bitbucket.org/Chaoseiro/x-unitmx/wiki/Home [2]: https://pastebin.com/810mcbt5

Viewing all articles
Browse latest Browse all 4084

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>