public void SetSettings(DebugMenuSettings settings) { if (settings == null) { return; } this.Settings = settings; }
public void SetSettings(DebugMenuSettings settings) { if (settings == null) { return; } this.Settings = settings; // setting the canvas sorting layer if (SortingLayer.NameToID(this.Settings.SortingLayer) == -1) { Debug.LogErrorFormat(this, "Trying to use DebugMenu without creating a Sorting Layer of name \"{0}\". The debug will not work unless create that layer.", this.Settings.SortingLayer); } else { this.Dialog.Canvas.sortingLayerName = this.Settings.SortingLayer; } this.Dialog.Canvas.sortingOrder = this.Settings.OrderInLayer; this.Dialog.Canvas.planeDistance = this.Settings.PlaneDistance; this.Dialog.IsOverlayCamera = this.Settings.IsOverlayCamera; }