Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void Update()
- {
- if (Input.GetKeyDown(KeyCode.Return))
- {
- CanMove = !CanMove;
- if (!CanMove)
- {
- EventSystem.current.SetSelectedGameObject(chatInputField.gameObject);
- }
- else
- {
- Debug.Log("Test");
- if (chatInputField.text != "")
- {
- myChatManager.SendChatMessage(chatInputField.text, myPlayer.CharacterName);
- AddMessage(chatInputField.text, myPlayer.CharacterName);
- chatInputField.text = "";
- }
- if (Input.GetKeyDown(KeyCode.Return))
- {
- EventSystem.current.SetSelectedGameObject(myPlayer.gameObject);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement