public void SetTool(int idx) { if (activeToolUI != null) { activeToolUI.SetActive(false); } if (activeTool != null) { activeTool.OnToolDeselect(); } activeTool = tools[idx]; activeTool.OnToolSelect(selectedObject); activeTool.OnBrushRadiusChange(toolRadius); if (toolUI[idx] != null) { activeToolUI = toolUI[idx]; activeToolUI.SetActive(true); } selectedToolText.text = "SELECTED:\n" + activeTool.toolName; }
public void SetTool(int idx) { if (tool != null) { tool.OnToolDeselect(); } tool = tools[idx]; tool.OnToolSelect(placeablePrefab); tool.OnBrushRadiusChange(toolRadius); if (tool.usesTargetCylinder) { targetCircle.gameObject.SetActive(true); } else { targetCircle.gameObject.SetActive(false); } }