public Step GetCurrentStep() { Transform currPart = transform.GetChild(currPartIdx); Step currentStep = currPart.GetComponent <Step>(); if (currentStep != null) { return(currentStep); } SubModel currentSubModel = currPart.GetComponent <SubModel>(); if (currentSubModel != null) { return(currentSubModel.GetCurrentStep()); } return(null); }
// Public methods public Step GetCurrentStep() { return(rootModel.GetCurrentStep()); }