June 23 - Zodiac completed

Today I completed the functionality required to “draw” the Zodiac sign on the 2d plane.

Lessons learned today:

  • GameObjects components are what allow them to be seen in Unity hierarchy;
  • GameObjects can be created by the static methods (i.e. LineRenderer) if you use the syntax:
LineRenderer thisLine = gameObject.AddComponent<LineRenderer>();

But GameObjects can also be created and then add components in this way as well:

GameObject thisLine = new GameObject();
thisLine.AddComponent<LineRenderer>();
  • Pink results in the game window means that there is not a proper material assigned to the gameObject; in this case I had to give it a Default/Sprite material for the color I chose to appear properly.
  • RayCasters are specific to 2d and 3d; and 3d ones don’t look at 2d ones. So my stars had to have a 3d box collider on them, the 2d collider was not being detected by the Raycast I chose.

DCDE Zodiac Completed