- Home /
Question by
ZhavShaw · Nov 09, 2015 at 11:11 AM ·
unity 5aiapiaddcomponent
Compilation error, Unity 5
Hello! I got a compilation error with one of my scripts.
Heres the error - 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)
And this is the line of the script with which i got the error with -
UnityEngineInternal.APIUpdaterRuntimeServices.AddComponent(gameObject, "Assests/Ai/Manager.cs (381,5)", FindCorrectVisualCheckString() );
I have an idea that the API Has changed with unity 5 but no idea how to convert this line
Can someone please do it for me and tell how its done? Thanks a tonn!
Comment