You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
361 B
14 lines
361 B
using UnityEngine; |
|
using UnityEngine.UI; |
|
using System.Collections; |
|
|
|
public class GetName : MonoBehaviour { |
|
public int m_Index = 0; |
|
void Start () { |
|
Text text = GetComponent<Text> (); |
|
ExamplesController controller = transform.parent.parent.GetComponent<ExamplesController> (); |
|
|
|
if (controller) |
|
text.text = controller.m_Examples [m_Index].Name; |
|
} |
|
}
|
|
|