Common Patterns and Structure
Error handling
public List<Transform> FindAThing(int arg){
...
if (notFound) {
throw new NotFoundException();
}
}public List<Transform> FindAThing(int arg){
...
if (notFound) {
Debug.LogError("Thing not found");
return null;
}
}Finding references
RequireComponent
Properties with backing fields
Last updated
Was this helpful?