- Home /
Enter For Chat
Hello,
Im using the Photon bootcamp demo, When you press enter during the game the chat textbox is visable on the lower left corner (See the project) and you can type things, but when you press enter it wont do anything, you have to click Send, how can i make it if you press enter(On the keyboard) it will submit it instead of clicking Send.
Can someone help me if it's not too much trouble.
Thanks
When you click enter the textbox shows up, but it has the send button you have to click to send it, I need a way you can press enter ins$$anonymous$$d of send, Not sure why it doesnt work
Answer by syclamoth · Dec 14, 2011 at 08:33 AM
The thing you are looking for is this- Input.eatKeyPressOnTextFieldFocus. If you set this to 'false', then it's easy to create a text-field that you can send by pressing 'enter'- just have something in Update which calls the 'send chat' function using normal key input polling.
Nice... didn't know anything about having some keyPressEaters. Starting to learn quite a bit just hanging around in this forum trying to help a little when I can and then reading all the answers to the stuff I didn't have any clue how to help with.
Thanks for the answer, But where should i add it in the script?, I'm not sure, Thanks anyway
void Awake(){
Input.eat$$anonymous$$eyPressOnTextFieldFocus = false ;
}
...that link is to another question here, and they say put it in the awake function.
Just place that function above line 31 on that script you linked to earlier and see if it works.
Your answer
Follow this Question
Related Questions
Photon Bootcamp Demo 1 Answer
Bootcamp Multiplayer error photon 0 Answers
CANT FIND ANY DEMO 1 Answer
Can anyone explain the decal scripts of the BootCamp Demo? 1 Answer
The other client does not receive chat messages.(Photon Networking) 1 Answer