Accessing MonoBehaviour Properties through Custom Classes in Unity!
Hiya,
so while working on a personal project, i kinda ran into a small problem when trying to run a coroutine in a custom class, and that was that i couldn't run it as it is a monobehaviour owned method. I looked up solutions online and none were really super clear to me how it would be done but was able to come up with my own. its a pretty niche problem, but i decided to create a tutorial so that it might help someone who's fighting this battle too in the future.
I enjoyed making this and I hope you guys enjoyed watching, so if there's any types of videos you guys want to see in the future or if you have any feedback on things that I could improve on, let me know too in the comments. otherwise chuck it a like if you enjoyed :)
Here's some relevant links that I mentioned in the video or got my information from.
Monobehaviour Properties: https://docs.unity3d.com/530/Documentation/ScriptReference/MonoBehaviour.html#:~:text=MonoBehaviour%20is%20the%20base%20class,to%20explicitly%20derive%20from%20MonoBehaviour
Classes in C#: https://www.tutorialsteacher.com/csharp/csharp-class
Constructors in Programming: https://www.knowledgehut.com/tutorials/csharp/csharp-constructors#:~:text=Constructors%20in%20C%23-,Constructors%20are%20special%20methods%20in%20C%23%20that%20are%20automatically%20called,creates%20a%20default%20constructor%20automatically
Music: https://www.youtube.com/watch?v=S24ozLSZ94o&ab_channel=melunfiltered
Chapters:
0:00 Intro
1:02 What are Custom Classes and MonoBehaviour?
3:35 Main Tutorial
19:57 Outro
Other Videos By Game Dev Garnet
2023-01-17 | A week of Development on my Dream Game! | devlog 1 |
2023-01-09 | Making Bloons Tower Defence 6 in UNITY in under 12 hours! |
2023-01-02 | Random Map Generator in UNITY! [Tutorial] |
2022-12-29 | Games I Made at University | Short Version |
2022-12-28 | Getting Started in Game Development |
2022-12-23 | I'm remaking my dream game after 2 years | devlog 0 |
2022-12-13 | more games I made in a game dev degree |
2022-11-27 | was my degree in game development worth it...? |
2022-11-16 | a 2023 guide to game development in under 10 minutes |
2022-10-31 | What Games look like at University in a Game Development Degree! |
2022-10-24 | Accessing MonoBehaviour Properties through Custom Classes in Unity! |
2021-11-25 | Colosseum | GAME TRAILER |
2021-11-17 | Power Usage Data Visualisation | UTS Building 11 |
2021-11-17 | Perseverance | 3D ANIMATION |
2021-06-24 | Thaum | GAME TRAILER |
2021-06-24 | Coffee Rush | GAME TRAILER |