void Start ()
{
if (TNManager.isConnected)
{
if (id == 0)
{
mParent = FindParent(transform.parent);
if (mParent == null && Application.isPlaying)
{
Debug.LogError("Objects that are not instantiated via TNManager.Create must have a non-zero ID.", this);
return;
}
}
else
{
Register();
// Have there been any delayed function calls for this object? If so, execute them now.
for (int i = 0; i < mDelayed.size; )
{
DelayedCall dc = mDelayed[i];
if (dc.objID == uid)
{
if (!string.IsNullOrEmpty(dc.funcName)) Execute(dc.funcName, dc.parameters);
else Execute(dc.funcID, dc.parameters);
mDelayed.RemoveAt(i);
continue;
}
++i;
}
}
}
}