Jump to content
Unity Insider Forum

Error(s) when "switching platform" to Android or IOS


hapythereal

Recommended Posts

These are the errors:

 

(YELLOW)

You are trying to create a MonoBehaviour using the 'new' keyword.  This is not allowed.  MonoBehaviours can only be added using AddComponent(). Alternatively, your script can inherit from ScriptableObject or no base class at all
UnityEngine.MonoBehaviour:.ctor ()
UnityStandardAssets.Utility.PlatformSpecificContent:.ctor () (at Assets/General Things/Standard Assets/Utility/PlatformSpecificContent.cs:30)
UnityEditor.Build.BuildPipelineInterfaces:InitializeBuildCallbacks (UnityEditor.Build.BuildPipelineInterfaces/BuildCallbacks)
 

 

 

 

(YELLOW)

UnityEngine.MonoBehaviour:.ctor ()
UnityStandardAssets.CrossPlatformInput.MobileControlRig:.ctor ()
UnityEditor.Build.BuildPipelineInterfaces:InitializeBuildCallbacks (UnityEditor.Build.BuildPipelineInterfaces/BuildCallbacks)
 

 

 

 

(RED)

NullReferenceException
UnityStandardAssets.CrossPlatformInput.MobileControlRig.EnableControlRig (System.Boolean enabled) (at Assets/General Things/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs:89)
UnityStandardAssets.CrossPlatformInput.MobileControlRig.CheckEnableControlRig () (at Assets/General Things/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs:80)
UnityStandardAssets.CrossPlatformInput.MobileControlRig.OnActiveBuildTargetChanged (UnityEditor.BuildTarget previousTarget, UnityEditor.BuildTarget newTarget) (at Assets/General Things/Standard Assets/CrossPlatformInput/Scripts/MobileControlRig.cs:98)
UnityEditor.Build.BuildPipelineInterfaces.OnActiveBuildTargetChanged (UnityEditor.BuildTarget previousPlatform, UnityEditor.BuildTarget newPlatform) (at <fc4e84dee5004858ad88e6706bb25889>:0)
UnityEditor.Build.BuildPipelineInterfaces:OnActiveBuildTargetChanged(BuildTarget, BuildTarget)

 

 

 

How can I fix them? I am a newbie when it comes to scripting.

Link zu diesem Kommentar
Auf anderen Seiten teilen

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Gast
Auf dieses Thema antworten...

×   Du hast formatierten Text eingefügt.   Formatierung jetzt entfernen

  Only 75 emoji are allowed.

×   Dein Link wurde automatisch eingebettet.   Einbetten rückgängig machen und als Link darstellen

×   Dein vorheriger Inhalt wurde wiederhergestellt.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Lädt...
×
×
  • Neu erstellen...