Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

how to set a oncollisionenter to gameobject ?

Discussion in 'Getting Started' started by selkeer, Feb 6, 2019.

  1. selkeer

    selkeer

    Joined:
    Sep 20, 2017
    Posts:
    7
    Hello,
    i've created several objects in my script and i would like them to have oncollisionenter function but how can i do this ? As usually we put it directly in the MonoBehaviour class.

    Thanks,

    Selkeer
     
  2. selkeer

    selkeer

    Joined:
    Sep 20, 2017
    Posts:
    7
    Ok sorry i've just found that i had to link the script... thanks anyway