// Start is called before the first frame update protected override void Start() { base.Start(); if (CameraFollowComp == null) { //Try to get the canvas for background by ConfigBackgroundCamera var cameraComps = Resources.FindObjectsOfTypeAll(typeof(CameraFollow)); foreach (var comp in cameraComps) { //Suppose we only have one CameraFollowComp = (CameraFollow)comp; break; } } if (MoveToPositionComp == null) { MoveToPositionComp = GetComponent <MoveToPosition>(); } jsComp = GetComponent <JsExtBehaviour>(); }
public override void Start() { base.Start(); itemHolder = GetComponent <T>(); jsComponent = GetComponent <JsExtBehaviour>(); }