Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

This parameter has to be of type: [UNREGISTERED]

Discussion in 'iOS and tvOS' started by LazloBonin, Nov 24, 2017.

  1. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    795
    I'm getting the following errors when building for iOS:

    Code (CSharp):
    1. Script error: OnTriggerEnter2D
    2. This message parameter has to be of type: [UNREGISTERED]
    3. The message will be ignored.
    4. (Filename: /Users/builduser/buildslave/unity/build/Runtime/Mono/MonoScriptCache.cpp Line: 248)
    5.  
    6. Script error: OnTriggerExit2D
    7. This message parameter has to be of type: [UNREGISTERED]
    8. The message will be ignored.
    9. (Filename: /Users/builduser/buildslave/unity/build/Runtime/Mono/MonoScriptCache.cpp Line: 248)
    10.  
    11. Script error: OnTriggerStay2D
    12. This message parameter has to be of type: [UNREGISTERED]
    13. The message will be ignored.
    My methods for this are defined like this:

    Code (CSharp):
    1.      private void OnTriggerEnter2D(Collider2D other)
    2.      {
    3.          // ...
    4.      }
    5.      private void OnTriggerExit2D(Collider2D other)
    6.      {
    7.          // ...
    8.      }
    9.      private void OnTriggerStay2D(Collider2D other)
    10.      {
    11.          // ...
    12.      }
    I had seen these errors before when the method signature was wrong (e.g. wrong parameter type), but never [UNREGISTERED]. What am I doing wrong?

    Note: Collider2D refers to UnityEngine.Collider2D, not another custom type.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Perhaps it's prompting you to use the fully qualified name (as in your note)
     
  3. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    795
    At the IL level, after compilation, how I qualified the type in C# initially doesn't matter.
    My note was just to indicate that indeed, there wasn't for example another colliding type called Collider2D.
     
  4. LazloBonin

    LazloBonin

    Joined:
    Mar 6, 2015
    Posts:
    795
    Any other idea @JeffDUnity3D?
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Sorry no, hopefully another user might.
     
  6. nick-morhun

    nick-morhun

    Joined:
    May 12, 2015
    Posts:
    47
    I have a similar error. But the project code does not contain the method in the message.