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

Question "method arguments are incompatible" i cant solve this error

Discussion in 'Scripting' started by JEONGISME, May 9, 2021.

  1. JEONGISME

    JEONGISME

    Joined:
    May 9, 2021
    Posts:
    2
    i just want to add my prefabs in other scenes
    im making 2d game in unity , i make a movement button to move a character
    i wanted to use it in other scenes, so i prefabs it,
    but it doesnt work, and error says "method argument are incompatible"
    i cant solve this problem.. what is that means?
    i need your help
     
  2. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,144
    idk. What are you doing when you get this error?
     
  3. JEONGISME

    JEONGISME

    Joined:
    May 9, 2021
    Posts:
    2
    i just added prefabs
     
  4. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    36,756
  5. Brathnann

    Brathnann

    Joined:
    Aug 12, 2014
    Posts:
    7,144
    Ok, so you have a gameObject in your scene. You drag it from your heirarchy down into your project window, which would normally turn it into a prefab and it isn't working and throws the error? Or it creates the prefab and throws the error? What are you trying to make a prefab out of? Can you show a screenshot of your hierarchy and what you are trying to make into a prefab?

    Also, I'm trying to get more info because the error almost suggest you're trying to call a method with the wrong arguments. Or, that's what I'm assuming it means. Did you try to Google it?
     
    Last edited: May 9, 2021
  6. PraetorBlue

    PraetorBlue

    Joined:
    Dec 13, 2012
    Posts:
    7,722
    Sounds like the function you are assigning as OnClick for your button does not accept the appropriate number or type of parameters. hard to say more without you sharing some screenshots and some code.
     
    Bunny83 likes this.