public void initMe() { script = new SerializedObject(target); bl = ((BoardLayout)target); if (bl.gm == null) { bl.gm = bl.GetComponent <GameManager>(); // assign gm ref if needed } // scripts to use scripts = bl.gm.panelManager.GetComponents <PanelDefinition>(); pieces = bl.gm.pieceManager.GetComponents <PieceDefinition>(); // visual textures panelEditVisuals = script.FindProperty("panelEditVisuals"); pieceEditVisuals = script.FindProperty("pieceEditVisuals"); // weights colorWeight = script.FindProperty("colorWeight"); // random on start boolean randomOnStart = script.FindProperty("randomOnStart"); // show hex grid arrangement showHexGrid = script.FindProperty("showHexGrid"); // use Selector boolean useSelector = script.FindProperty("useSelector"); // max panels during randomization randomPanelLimit = script.FindProperty("randomPanelLimit"); randomPanelCount = script.FindProperty("randomPanelCount"); // gui usage booleans hidePanel1 = script.FindProperty("hidePanel1"); hidePanel2 = script.FindProperty("hidePanel2"); hidePanel3 = script.FindProperty("hidePanel3"); // board GUI setups panelArray = script.FindProperty("panelArray"); // for the button arrays pStrength = script.FindProperty("pStrength"); // for the strength fields pieceArray = script.FindProperty("pieceArray"); // for the piece types colorArray = script.FindProperty("colorArray"); // for the piece color type scrollPos = script.FindProperty("scrollPos"); // for the scrollbar to conpensate for big boards scrollPos2 = script.FindProperty("scrollPos2"); // for the scrollbar to conpensate for big boards scrollPos3 = script.FindProperty("scrollPos3"); // for the scrollbar to conpensate for big boards }