- Home /
iTween problem - oncompleteparams
I have this function I want to pass a "false" to using oncompleteparams. I'm doing something simple wrong.
public void DisableFreeCam(bool trueorfalse)
{
RightClickFreeCam.disableFreeCam = trueorfalse;
}
DisableFreeCam(true) works elsewhere in the script, but this iTween code won't work:
iTween.LookTo(Main.PLAYER, iTween.Hash("looktarget", lookToTarget.transform.position, "time", lookTime, "oncomplete", DisableFreeCam, "oncompleteparams", false ));
I get 4 errors:
The best overloaded method match for 'iTween.Hash(params object[])' has some invalid arguments
Argument #6' cannot convert method group' expression to type 'object'
The best overloaded method match for 'iTween.LookTo(UnityEngine.GameObject, System.Collections.Hashtable)' has some invalid arguments
Argument #2' cannot convert 'object' expression to type 'System.Collections.Hashtable'
Answer by vanduc · Aug 31, 2015 at 09:50 PM
iTween.LookTo(Main.PLAYER, iTween.Hash("looktarget", lookToTarget.transform.position, "time", lookTime, "oncomplete", "DisableFreeCam", "oncompleteparams", false ));
Your answer
Follow this Question
Related Questions
iTween OnComplete question. 1 Answer
iTween on complete target 1 Answer
itween: firing oncomplete AFTER ONE LOOP 0 Answers
iTween Parenting oncomplete issue 2 Answers
iTween Native Support OnComplete 0 Answers