Reposting this from Udemy.
Up until now, I’ve been able to preempt what Rick wants me to do in the coding challenges. It’s gratifying that I have enough of an understanding that I complete the challenge successfully before Rick demonstrates his solution.
Well, that ground to a halt in the Public Methods & Return Types video.
I understand the concept of being able to access code from one class in another by making the code public.
That’s basically where my comprehension stops. Even Rick’s “Calling A Method” slide makes no sense to me, because I can’t visualise the context. This is unlike earlier videos, where his illustrations made sense because we’d already been poking around the relevant areas of Unity or c#, so we could determine context.
Rick calls a challenge to Create Public Method, and I have zero idea what to do:
“Create a public method called GetStateStory, that’ll be the name of our method”
I’ve seen public class written before, but what is a method in this context? Have I forgotten some critical detail? This is my third replay of this module.
“Use the string return type”
I’ve been writing strings comfortably now, but I have only a very vague understanding of his instruction here. We’re going to return a string type, because the method we’re returning is written text? I’m finding it really difficult to visualise what he’s asking here, and what I’m supposed to do.
“We’re going to contain one statement, and that statement will be just returning-- it will use the return keyword to return our storyText variable”
I understand that we created the storyText variable as part of our StartingState scriptable object. This is where my understanding ends.
When I did this module before, I just soldiered on, thinking I’d understand later, but it seemed like my lack of understanding here was setting me up for failure. I continued to be confused.
I know Rick mentioned that this section of the course would need more concentration for beginners to wrap their heads around, but is there a chance Rick might be able to take another crack at teaching this section?
I’m going to keep reading the other comments and questions students have left, in hope of understanding what’s going on, but so far I haven’t had much luck.