// Use this for initialization void Start() { NextScan = Time.realtimeSinceStartup + ScanDelay; var db = GetComponent <DebugFlag>(); DebugLevel = db == null ? 0 : db.Level; }
// Use this for initialization void Start() { NCS = GetComponent <NavigationControlSystem>(); var debugFlag = GetComponent <DebugFlag>(); if (debugFlag != null) { DebugLevel = debugFlag.Level; } }