I have an object with several scripts which are being activated/deactivated at times. I am developing for the iPhone, and one script is a simple selection tool to verify that the touch(mouse) down/up was close enough to consider the object selected.
This script detects the touch/release and preforms the SendMessages: “OnMouseUp” and “OnMouseDown” (both w/ null as the second parameter) to notify the attached script of the action.
The question is: between calling:
SendMessage("OnMouseUp",null);
and the called function
functiton OnMouseUp(){
DoStuff...
}
The material color goes from white to black.
Prior to SendMessage color is RGBA(1.0,1.0,1.0,1.0). The first line in the called function (before DoStuff), the color is RGBA(0.0,0.0,0.0,1.0).
Any ideas as to what would be causing this or a solution/workaround to it?