Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class Test : MonoBehaviour {
- Object nullObject;
- bool secondError = false;
- // Use this for initialization
- void Start () {
- Debug.Log("Regular Log Line");
- Debug.LogWarning("This is a log warning");
- Debug.LogError("This is a log error");
- FunctionA ();
- nullObject.name = "this will fail!";
- }
- void FunctionA() {
- FunctionB(1);
- }
- void FunctionB(int n) {
- FunctionC();
- }
- void FunctionC() {
- Debug.Log ("This line is a few functions deep");
- }
- // Update is called once per frame
- void Update () {
- if (!secondError)
- {
- secondError = true;
- FunctionD ();
- }
- }
- void FunctionD() {
- FunctionE();
- }
- void FunctionE() {
- nullObject.name = "this will fail too!";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment