Function from CodeMonkey not being found.

Hi I’m new to unity game designing and I’m trying to do a follow along video (

) on making mine sweeper made by Code Monkey and around timestamp 5:20 he instructs the viewer to download the CodeMonkey Utilities from their website and import it into the project. I did as instructed but when I proceed with my code it comes to my attention that typing " using CodeMonkey.Utils ;" the system does not register CodeMonkey.Utils. Since the script cant find the function I cant access any classes which is a crucial part of the tutorial if I don’t want to build the entire function by scratch. My biggest problem is I don’t know where my mistake is due to my lack of knowledge I don’t know if the issue is through Code Monkey, Unity, Microsoft Visual Studio, or just might be my code. I’ll attach my code itself and the organization of my files to try and make a clear picture to find my error.

This is the code that was written out in the video that worked

6456029–723578–CodeMonkeyUtilities.unitypackage (31.7 KB)

I see in your Unity screenshot there is a compile error: “Color does not contain a definition for ‘White’”.

It seems like you have made a typo in your code, which is causing the code to fail to compile (White should be white).

That may be blocking Unity from being able to compile the CodeMonkey utilities and thus blocking Visual studio from being able to recognize them.

2 Likes

Wow that simple huh? Thank you so much for spotting my mistake I didn’t know that was case sensitive but everything is running smoothly now Visual Studio is now recognizing them. Thank you again !!!

Yep, that simple.

Everything in C#, and most programming languages, is case-sensitive, so be careful - and always check your console for compiler errors. Many things in Unity simply will not work if you have compiler errors in your scripts.

3 Likes

@slywolf101 I would say if you are not sure how to work out an error like this, that you probably should not be following a video about heatmap, grid pathfinding etc. Probably should be starting with the basics if this sort of thing is tripping you up.

You wont learn anything by simply copying everything they do in the video, which it seems you are doing.

@slywolf101 You should really start with this set of videos instead of that one you are using Create with Code - Unity Learn

1 Like

Sorry i never saw this reply and I 100% understand what you’re saying. I figured since I previously had computer programing knowledge that it would translate to game programing and I was equipped enough to jump into a simpler project that for the most part is pure coding rather than game design. Clearly I do need to fill in the gaps in my knowledge. I just guess this error is one of those times where you stare at your code too long and you can’t find nothing wrong with it yourself. I first tried some other tutorials for beginners, and found them a little too simply and served as almost a refresher on the fundamentals of coding in general but I’m very excited to try the tutorial you’ve provided me to actually obtain the full grasp of coding games. Thank You Very Much @MadeFromPolygons_1 !!!

1 Like

i get the same issue but i dont have any other compiler errors except the one i get from it not recognizing codemonkey utils

Color is a UnityEngine Struct so if you are using Visual studio you write Color,then select it and press F12 then you can see what colors you can call.Just make sure you using UnityEngine namespace