Can I add my Component to Custom Types

NodeCanvas Forums General Discussion Can I add my Component to Custom Types

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #8966
    Matt Newcombe
    Participant

    Hi There,

    I’m trying to execute my own method on a GameObject I’m instantiating in a BT with a component of MyComponentType.

    The issue is the execute method script allows me to ‘change type’ however MyComponentType isn’t in the list, nor can I see a way to add it in the Type Configure dialogue window. Is this actually possible / am I missing some obvious way to add my own Components into that type list?

    Thanks,

    Matt

    #8968
    Gavalakis
    Keymaster

    Hello,

    You are able to add any type in the Type Configurator editor window. Your type will most probably be under the “Assembly-CSharp/No Namespace” category. Once you add it, it will be listed in the “Change Type” button dropdown.
    Can you please double check for your type under the “Assembly-CSharp” category?

    Furthermore, if the agent of the ExecuteFunction task is set (for example you override it and assign the game object on which the MyComponentType is), then there will be no need to select type and instead all components on the agent game object will be shown for a method selection. Of course depending on your design, that is not always the case.

    Thanks

    Join us on Discord: https://discord.gg/97q2Rjh

    #8967
    Matt Newcombe
    Participant

    Ah awesome yeah it was in the Assembly-CSharp category, thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.