Hey all
I basically have a c# script that let me rotate objects...I'd like to turn at the begin at the begin of the game this script off so the object stay in place and then awake the script trough action list when I turn one menu so I can examinate the object rotating it...how can I achieve this? ty
Comments
I have a bottle...attached to the bottle two scripts; one called ENABLEDISABLE and one called ROTATEWITHMOUSE.
the first script control the second one trough an integer called canRotate...if the integer is 0 the rotatewithmouse script is disabled...if the integer is 1 the rotatewithmouse script is enabled...
all working trough the inspector window of unity
but if I try to run the action trough send object message is not working...I did like this...maybe I'm doing something wrong...
Action type Object : Send Message
Object to affect: Bottle
Message to send : custom
Method name: canRotate
Pass integer to method : cheked
Integer to send: 1
after running continue
where am I doing wrong?
In JS:
function SetValue (_newValue : int)
{
canRotate = _newValue;
}
In C-sharp:
void SetValue (int _newValue)
{
canRotate = _newValue;
}
Then set the Method name as "SetValue".
P.S.: I putted the void update between the void start and the void update...is the right place? :P