Unity C#

Write to console: Debug.Log(“Hello World”);

more exemples here: https://gamedevbeginner.com/how-to-use-debug-log-in-unity-without-affecting-performance/



Read parent’s script variable:


public GameObject objectToCheck;
parentComp comp= objectToCheck.GetComponentInParent<parentComp >();
then use comp.var as needed (with var a variable set in parents component (script))



Array, List:


PDF: How to use Arrays in Unity – Game Dev Beginner



Unity Vector3 Guide for Newbies

Shortforms of Vector3

Vector Shortform
Vector3(0, 0, -1) Vector3.back
Vector3(0, -1, 0) Vector3.down
Vector3(0, 0, 1) Vector3.forward
Vector3(-1, 0, 0) Vector3.left
Vector3(1, 1, 1) Vector3.one
Vector3(1, 0, 0) Vector3.right
Vector3(0, 1, 0) Vector3.up
Vector3(0, 0, 0) Vector3.zero