From the course: Unity: Integrating GPS and Points of Interest

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Use the real names on prefabs

Use the real names on prefabs

- Okay, guys welcome back. So, it's now time to actually populate this information with the correct titles. Now what I've done is I've expanded the content div and dragged in a prefab to make this a little bit easier to actually explain. So, on the prefab you can see that we have the icon which is actually an image and then as children of the prefab, we have the two text elements. So, the easiest way I thought to grab a hold of this was to create a text array and then swap out the titles for the actual text that's written inside. Okay, so let's just switch back to Visual Studio for a second. So, in order to use the text user interface, I need to be using, from the Unity engine, the UI library, okay, and then because we've got the library we can now create a text array which I will call the text. So, and then make that equal the prefabs child components, so get compon, sorry, get components, plural, there we go. So get components in children, because this isn't array, it's more of a…

Contents