Unity4 update to Unity5 Update note, unity4unity5
For a Bug, the game project was upgraded from Unity4.6 to Unity5 for testing. There were some problems in the middle. Note.
(1) usage changes of Plugin
In Unity5.0, each imported DLL, SO, and Jar file that looks like a plug-in file has an option to set its function platform. When Unity4.6 is upgraded to Unity5.0, some files cannot be correctly judged on the Platform, and are set to all on the Platform option. The following error occurs.
We only need to find the corresponding file and set the platform for its function to solve this BUG.
If the DLL file is not a Plugin file, deselect the Platform check box.
(2) The AddComponent (string) interface is discarded.
Update from Unity4.6 to Unity5.0. After opening the project, Unity automatically detects the code and converts the code to the new API. AddComponent (string) is converted to the following format.
addedComponent = UnityEngineInternal.APIUpdaterRuntimeServices.AddComponent(go, "Assets/PlayMaker/Actions/AddComponent.cs (56,21)", component.Value);
It works normally in the UnityEditor environment, but an error is returned when exporting the Xcode project:
Assets/PlayMaker/Actions/AddComponent.cs(56,88): 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<T>()/GameObject.AddComponent(Type).'
That is to say, this API is obsolete, and now only AddComponent (T) can be used.
Therefore, the System. Type. GetType (string) is used to obtain the Type, and then in AddComponet.
However, this may cause problems in IL2CPP, because IL2CPP will crop the code, so AOT compilation may cause a BUG that the type cannot be found during runtime.
If this happens, the previous article provides a solution:
http://blog.csdn.net/huutu/article/details/43986079