Performance between *Assigned Transform* and *Transform.Find("Path/Target")* using absolute path?
Which one of them is more efficient?
Example code:
public class TestA : MonoBehaviour
{
//Transform's assigned in Inspector;
public Transform mTrans;
private void Awake()
{
***//What does Unity do before function Awake?***
//Logic code...
}
}
public class TestB : MonoBehaviour
{
//Transform's dynamicly found in function Awake
private Transform mTrans;
private void Awake()
{
mTrans = transform.Find("Root/Target");
//Logic code...
}
}
↧