From the course: Unity: Architectural Visualization Interactivity
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Reading player input and object focusing - Unity Tutorial
From the course: Unity: Architectural Visualization Interactivity
Reading player input and object focusing
- [Instructor] In this video, we'll continue our analysis of the object select a script. We saw that at line 57, when our rake cost intersex and interactable object, the focus object variable is set here. And when that happens right now. The object, the interactive object automatically highlights. Let's take a look at how that happens. When line 57 happens, focus, object is set. And at that very moment the code we'll move right up to the top here to focus object. And this is a C-sharp property. This means that when the value of focus, object changes, it enters this set area here. And when this happens you can see how it interacts and connects with it. Interactive object script here. At this point, it is checking to make sure that the value of focus object is actually changing to something different than what it was previously. If it is, then it determines whether a new object has entered the highlight area whether we're…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.