waypoint.IsPlaceable returns nothing and does not change colors

Hello Everyone,

got this weird bug or rather inactivity of my script.
Let me show you the scripts first:
CoordinateLabeller.cs

Waypoint.cs
bug_waypoint

Expected result is yellow color by default, gray when !IsPlaceable.
But in my game, it’s yellow all along.

Also, interestingly, Debug.Log does not print anything to console, as if it ignored the task.
Looking for any ideas on what might be wrong here.

Hi,

Please note, it’s better to copy/paste your code and apply the code fencing characters, rather than using screenshots. Screenshots are ideal for displaying specific details from within a game engine editor or even error messages, but for code, they tend to be less readable, especially on mobile devices which can require extensive zooming and scrolling.

You also prevent those that may offer to help you the ability to copy/paste part of your code back to you with suggestions and/or corrections, meaning that they would need to type a potentially lengthy response. You will often find that people are more likely to respond to your questions if you make it as easy as possible for them to do so.

Have you already compared your code to the Lecture Project Changes which can be found in the Resources of this lecture? And have you already tried to add Debug.Logs to your code to see what is going on during runtime?

Hope this helps :slight_smile:


See also;

Thank you Nina;

From now on I will post code in a different format.

Back to debugging:
I tried replacing my own .cs files with those provided in Lecture Project Changes.
That’s when I think giving Unity a restart solved my problem, as I am unable to reproduce it anymore.

Anyway thanks for the response. Back to learning now :slight_smile:

Does that mean you fixed the problem? Or is there still an issue that needs to be solved? :slight_smile:


See also:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms