Tag Archives: not working

Vuforia: Delayed Initialization Explained

Vuforial is a widely used AR toolkit, and if you use it for some time, you will find “Delayed Initialization” for sure.


You would like to try it, right?

Go and do it, cry please, you will see below errors:

Vuforia cannot be started before it is initialized.Please disable Delayed Initialization in the Vuforia configuration or initialize Vuforia manually with the VuforiaRuntime-class.


You would Google this, frustrated, as you can hardly find good answers, and here is why this article comes into play. Read the rest of this entry »


Posted by on December 11, 2017 in Programming, Unity 3d, Vuforia (QCAR)


Tags: , , , , ,

iTween onComplete event handler example

iTween is a handy library to implement tween/ease type animations. One of the useful callback it provides is the onComplete event. Below is an example code of how to use it:

iTween.MoveTo(lotus_leaf, iTween.Hash(
                      “y”, 80f,
                      “onComplete“, “OnShadeHidden”)

void OnShadeHidden()
        Debug.Log(“The shade is hidden”);

where lotus_leaf is the game object to be tweened in y position, and OnShadeHidden() is the callback function or event handler.

However if you run this code, you will see the callback OnShadeHidden is NOT fired when the tween is completed! The reason is that iTween needs another parameter: onCompleteTarget, to specify which object handles the onComplete event, so the right way to get it done will be like this:

iTween.MoveTo(lotus_leaf, iTween.Hash(
                      “y”, 80f,
                      “onComplete“, “OnShadeHidden”,
                      “onCompleteTarget“, gameObject)

Run the code, the onComplete event handler will be properly addressed. Happy coding!


Posted by on December 14, 2014 in Unity 3d


Tags: , , , , , , , , ,

Unity Apps run well in desktop, but fails on devices

I recently worked with several development groups and found that some junior programmers frequently complain as follows:

The app works well on desktop (unity editor’s game and scene view), but it crashes or fails to function when the app is deployed on Android or iPhone devices 


Read the rest of this entry »

Leave a comment

Posted by on November 19, 2014 in Programming, Unity 3d


Tags: , , , , , , , , ,