void OnEnable( ) { // instantiate a new instance of log proxy for use by viewer logProxy = new LogProxy( ); logProxy.Init(); // setup initial filter parms and their previous values if (levelColours == null) { category = (Log.Category) 0xFFFFFF; prevCategory = category; level = Log.Level.Trivial; prevLevel = level; logLevel = 0; pauseFrame = null; keyword = ""; Log.SetListener(OnLogChange); scrollPosition = 0f; activeMessage = null; stylesInitialized = false; logSize = Log.Instance.Count; isDirty = true; levelColours = new Dictionary <Log.Level, StateColour>( ); LoadSettings( ); } // assign application hook to register callbacks for console output and log them if needed Application.RegisterLogCallback(HandleLog); }