C# Script Renderer with Tooltips

Hover over highlighted keywords to see educational tooltips. Perfect for annotating Unity scripts for students.

Beginner Level (Basic C# + Unity Basics)

C# Script
1
using UnityEngine;
2
using System.Collections;
3
4
public class PlayerController : MonoBehaviour
5
{
6
[SerializeField]
7
private float moveSpeed = 5.0f;
8
9
private Rigidbody rb;
10
private Vector3 moveDirection;
11
12
void Start()
13
{
14
rb = GetComponent<Rigidbody>();
15
Debug.Log("Player controller initialized");
16
}
17
18
void Update()
19
{
20
HandleInput();
21
MovePlayer();
22
}
23
24
private void HandleInput()
25
{
26
float horizontal = Input.GetAxis("Horizontal"); // Let's see how comments
27
float vertical = Input.GetAxis("Vertical"); // Work out!
28
29
moveDirection = new Vector3(horizontal, 0, vertical).normalized;
30
}
31
32
private void MovePlayer()
33
{
34
if (moveDirection != Vector3.zero)
35
{
36
Vector3 velocity = moveDirection * moveSpeed;
37
rb.velocity = new Vector3(velocity.x, rb.velocity.y, velocity.z);
38
}
39
}
40
}

Advanced Level (All Tooltips)

C# Script
1
using UnityEngine;
2
using System.Collections;
3
4
public class PlayerController : MonoBehaviour
5
{
6
[SerializeField]
7
private float moveSpeed = 5.0f;
8
9
private Rigidbody rb;
10
private Vector3 moveDirection;
11
12
void Start()
13
{
14
rb = GetComponent<Rigidbody>();
15
Debug.Log("Player controller initialized");
16
}
17
18
void Update()
19
{
20
HandleInput();
21
MovePlayer();
22
}
23
24
private void HandleInput()
25
{
26
float horizontal = Input.GetAxis("Horizontal"); // Let's see how comments
27
float vertical = Input.GetAxis("Vertical"); // Work out!
28
29
moveDirection = new Vector3(horizontal, 0, vertical).normalized;
30
}
31
32
private void MovePlayer()
33
{
34
if (moveDirection != Vector3.zero)
35
{
36
Vector3 velocity = moveDirection * moveSpeed;
37
rb.velocity = new Vector3(velocity.x, rb.velocity.y, velocity.z);
38
}
39
}
40
}

Available Tooltip Sets:

  • beginnerTooltips - Basic C# concepts
  • unityBasicsTooltips - Essential Unity concepts
  • unityIntermediateTooltips - Intermediate Unity features
  • unityAdvancedTooltips - Advanced Unity topics
  • csharpFundamentalsTooltips - Advanced C# concepts
  • gameDevPatternsTooltips - Game development patterns

Pre-combined Sets:

  • beginnerUnityTooltips - Perfect for new Unity developers
  • intermediateUnityTooltips - For students with some experience
  • advancedUnityTooltips - For advanced topics and editor scripting
  • gameDevTooltips - Focus on game development patterns
  • comprehensiveTooltips - Everything combined