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.

MouseEvents for instantiated prefab not called

Discussion in 'Physics' started by xXPancakeXx, Dec 5, 2017.

  1. xXPancakeXx

    xXPancakeXx

    Joined:
    Mar 14, 2015
    Posts:
    54
    Hello,

    after some hours of research i will finally post here :)
    My problem is that I am not able to receive any MouseEvents on newly instantiated prefabs unless i modify them in any way in the unity editor while the game is running. I've already checked possible issues with UI but I can exclude that.

    Prefab looks like that:


    Script on the Prefab (EntityHandler deriving from MonoBehaviour):



    Is there anything the internet didnt tell me yet or am I just blind?
    Any suggestions appreciated :)
     
    Last edited: Dec 6, 2017