本文整理匯總了C#中UnityEngine.CanvasRenderer.GetComponentInChildren方法的典型用法代碼示例。如果您正苦於以下問題:C# CanvasRenderer.GetComponentInChildren方法的具體用法?C# CanvasRenderer.GetComponentInChildren怎麽用?C# CanvasRenderer.GetComponentInChildren使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類UnityEngine.CanvasRenderer
的用法示例。
在下文中一共展示了CanvasRenderer.GetComponentInChildren方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: showJob
public void showJob()
{
jobshown = true;
shownJobBtn.GetComponentInChildren<Text>().text = "Hide Job";
renderedJob = Instantiate(jobPrefab);
renderedJob.gameObject.transform.SetParent(canvasTrans, false);
renderedJob.GetComponentInChildren<Text>().text = job.title + " \n\n " + job.description;
}
示例2: acceptCurrentCandidate
public void acceptCurrentCandidate() {
contractshown = true;
Score scorer = new Score(cvList[currentCV], job);
renderedContract = Instantiate(contractPrefab);
renderedContract.gameObject.transform.SetParent(canvasTrans, false);
renderedContract.GetComponentInChildren<Text>().text = "Contract for "+job.title + " \n\n " + "New Hire: "+cvList[currentCV].candidate.getName()+"\n\n"+ scorer.getNormalisedScoreBreakdown(cvList);
TotalScore.totalScore += scorer.normalisedScore;
refreshHUD();
Button accept = renderedContract.GetComponentInChildren<Button>();
accept.onClick.AddListener(() => btnNextJob());
stamp.Play();
StartCoroutine(waitAndDisplay(renderedContract.transform.Find("Hired").gameObject, 1.7f));
}
示例3: renderCV
public void renderCV() {
renderedCV = Instantiate(cvPrefab);
renderedCV.gameObject.transform.SetParent(canvasTrans, false);
renderedCV.GetComponentInChildren<Text>().text = cvList[currentCV].candidate.getName()+" \n\n"+ cvList[currentCV].getCVText();
Button accept = renderedCV.GetComponentInChildren<Button>();
accept.onClick.AddListener(() => btnAccept());
// Set Portrait
Image mug = renderedCV.transform.Find("CV Mug").GetComponent<Image>();
mug.sprite = cvList[currentCV].candidate.getCVPic();
}