private void Start() { if (!CommandLineArgs.IsPresent(UseLabelString)) { EnableRoot.SetActive(false); return; } foreach (var roundLabel in GameObject.FindObjectsOfType <RoundLabelBehaviour>()) { roundLabel.DisabledByAbnormal = true; } var text = string.Empty; if (CommandLineArgs.IsPresent("useRoundAsRoundLabel")) { text = CommandLineArgs.GetArgumentValue("round"); } if (string.IsNullOrEmpty(text)) { text = CommandLineArgs.GetArgumentValue("roundLabel"); } TextComponent.text = text ?? string.Empty; if (string.IsNullOrEmpty(text)) { EnableRoot.SetActive(false); } }
private void Start() { var text = string.Empty; if (CommandLineArgs.IsPresent(ArgumentName)) { text = CommandLineArgs.GetArgumentValue(ArgumentName); } TextComponent.text = text ?? string.Empty; if (string.IsNullOrEmpty(text)) { EnableRoot.SetActive(false); } }
private void UpdateRoundLabel() { if (DisabledByAbnormal) { EnableRoot.SetActive(false); return; } var text = string.Empty; if (CommandLineArgs.IsPresent("useRoundAsRoundLabel")) { text = CommandLineArgs.GetArgumentValue("round"); } if (string.IsNullOrEmpty(text)) { text = CommandLineArgs.GetArgumentValue("roundLabel"); } TextComponent.text = text ?? string.Empty; EnableRoot.SetActive(!string.IsNullOrEmpty(text)); }