public override void OnInspectorGUI() { // get the target object SVGCanvasBehaviour canvasBehaviour = target as SVGCanvasBehaviour; if ((canvasBehaviour != null) && (canvasBehaviour.UIAtlas != null)) { Canvas canvas = canvasBehaviour.GetComponent <Canvas>(); if (canvas != null) { base.OnInspectorGUI(); // maintain the canvas scale factor synched between Canvas an SVGUIAtlas! canvasBehaviour.EnsureCanvasAssigned(); bool isDirty = this.DrawInspector(canvasBehaviour.UIAtlas, canvas); if (isDirty) { SVGUtils.MarkObjectDirty(canvasBehaviour.UIAtlas); SVGUtils.MarkSceneDirty(); } } } }