public void CreateControlPanel() { Debug.Log("Creating panel"); sunControlPanel = new GameObject("SunControlPanel").AddComponent <SunControlGUI>(); sunControlPanel.anchor = UIAnchorStyle.Bottom; sunControlPanel.sunControl = sunControl; timeSlider = new GameObject("TimeSlider").AddComponent <TimeSlider>(); timeSlider.anchor = UIAnchorStyle.Bottom; timeSlider.sunControl = sunControl; UIView.GetAView().AttachUIComponent(timeSlider.gameObject); UIView.GetAView().AttachUIComponent(sunControlPanel.gameObject); }
public void CreateControlPanel() { Debug.Log("Creating panel"); sunControlPanel = new GameObject("SunControlPanel").AddComponent<SunControlGUI>(); sunControlPanel.gameObject.transform.localPosition = new Vector3(-1.75f, -0.1f, 0); sunControlPanel.sunControl = sunControl; timeSlider = new GameObject("TimeSlider").AddComponent<TimeSlider>(); timeSlider.gameObject.transform.localPosition = new Vector3(-1.33f, -0.6f, 0); timeSlider.sunControl = sunControl; UIView.GetAView().AttachUIComponent(timeSlider.gameObject); UIView.GetAView().AttachUIComponent(sunControlPanel.gameObject); sunControlPanel.gameObject.SetActive(false); timeSlider.gameObject.SetActive(false); }
public void CreateControlPanel() { Debug.Log("Creating panel"); sunControlPanel = new GameObject("SunControlPanel").AddComponent<SunControlGUI>(); sunControlPanel.anchor = UIAnchorStyle.Bottom; sunControlPanel.sunControl = sunControl; timeSlider = new GameObject("TimeSlider").AddComponent<TimeSlider>(); timeSlider.anchor = UIAnchorStyle.Bottom; timeSlider.sunControl = sunControl; UIView.GetAView().AttachUIComponent(timeSlider.gameObject); UIView.GetAView().AttachUIComponent(sunControlPanel.gameObject); }