Search Unity

OnMouseDown problem in Windows Phone. Any solution?

Discussion in 'Scripting' started by drlynch, Aug 2, 2014.

  1. drlynch

    drlynch

    Joined:
    Aug 2, 2014
    Posts:
    2
    Hello and thank you for reading this post:

    I have a simple image in the game with a boxcolider component. I have a script added to this image with the following code:

    Code (CSharp):
    1. void OnMouseDown () {
    2. Debug.log ("You touched the object");
    3. Camera.main.backgroundColor = Color.Magenta;
    4. }
    When building my project to Windows Phone 8, shows the following warning:
    Once the project is loaded into Unity, requests file: mouse.cs.
    Once "fixed" this problem manually, the project finally loaded into the emulator, but not working.

    Any solution to my code?, Could use a touch event, but only when I touch this object?.

    Thanks and a greeting.
     
  2. Lex_87

    Lex_87

    Joined:
    Sep 11, 2013
    Posts:
    3