Code of Unity interface of the educator for activity 1 in computer
Full text
Uses of robotics to improve the instrumental skills of students with Autism Spectrum Disorder through the development of new inclusive contexts (DivInTech) Code of Teacher Control App 1 Teacher’s interface File 1: ControlPane.cs 1 u s i n g System . C o l l e c t i o n s ; 2 u s i n g System . C o l l e c t i o n s . Gene ri c ; 3 u s i n g U ni t yEng ine ; 4 u s i n g U ni t yEng ine . UI ; 5 u s i n g System ; 6 u s i n g TMPro ; 7 u s i n g U ni t yEng ine . SceneManagement ; 8 u s i n g System . Net ; 9 u s i n g System . Net . S o c k e t s ; 10 u s i n g System . Tex t ; 11 u s i n g System . IO ; 12 u s i n g System . T h re ad in g ; 13 u s i n g System . Linq ; 14 15 16 p u b l i c c l a s s Co nt ro lP an e : MonoBehaviour 17 { 18 p r i v a t e s t r i n g GameIP = "GAMEIP" ; 19 20 p r i v a t e s t r i n g rob ot _m es sa ge ; 21 22 / / V a r i a b l e s de l a i n t e r f i c i e 23 p u b l i c TMP_InputField I np ut Fi eld _R ob otM es sa ge ; 24 p u b l i c Bu tton B u t t o n _ P r e s s e d B u t t o n ; 25 p u b l i c But ton Button_LowVoice ; This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
26 p u b l i c But ton Button_HighVoice ; 27 p u b l i c But ton Bu tton _Rep eat ; 28 p u b l i c But ton Button_NotAnswer ; 29 p u b l i c But ton Button_OKAnswer ; 30 p u b l i c But ton Button_KO_Answer ; 31 p u b l i c But ton Button_SendMessage ; 32 p u b l i c Bu tton B u t t o n _ F i n i s h ; 33 p u b l i c But ton Butt on_C lue ; 34 35 / / SOCKET 36 T c p C l i e n t mySocket ; 37 p u b l i c NetworkStream th eSt re am ; 38 St re amW ri te r t h e W r i t e r ; 39 StreamReader t h eR e a de r ; 40 41 i n t m e s s a g e _ r e c i e v e d _ a c t i v i t y ; 42 43 / / Thread 44 p r i v a t e Thread t 1 ; 45 46 / / S t a r t i s c a l l e d b e f o r e t h e f i r s t frame up d at e 47 v o i d S t a r t ( ) 48 { 49 50 / / S o c k e t 51 t h i s . m e s s a g e _ r e c i e v e d _ a c t i v i t y = −1; 52 S t r i n g ip = P l a y e r P r e f s . G e t S tr i n g ( GameIP ) ; 53 t h i s . mySocket = new T c p C l i e n t ( ip , 909 0) ; 54 t h i s . t h e St r e am = mySocket . GetStream ( ) ; 55 t h i s . t h e W r i t e r = new St re am Wr it er ( th eS tre am ) ; 56 t h i s . t h e Re a d e r = new StreamReader ( t h e St r e a m ) ; 57 58 / / Crear t h r e a d 59 t h i s . t 1 = new Thread ( S o c k e t L i s t e n e r ) {Name = " S ock et L i s t e n e r " } ; 60 t h i s . t 1 . S t a r t ( ) ; 61 / / I n i c i a l i z a r v a r i a b l e s 62 t h i s . ro bo t_ me ss ag e = " " ; 63 64 } 65 66 / / Thread t h a t l i s t e n s t o s o c k e t packages 67 private v o i d SocketListener () { 68 s t r i n g a s c i i = " " ; 69 while ( a s c i i != " 0 \0 " ) { 70 ascii = receive_message_from_activity () ; 71 t h i s . m e s s a g e _ r e c i e v e d _ a c t i v i t y = int . P a r s e ( a s c i i ) ; 72 } 73 Debug . Log ( " Comunicaci ón con a c t i v i d a d t e r m i n a d a . " ) ; This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
74 75 76 } 77 78 private string receive_message_from_activity () { 79 L i s t < byte > b y t e L i s t = new L i s t < byte > ( ) ; 80 b y t e [ ] b u f f e r = new b y t e [ 2 ] ; / / Leemos de a un b y t e para e n c o n t r a r e l f i n d e l mensaje 81 82 while ( t r u e ) { 83 t h i s . t h eS t re am . Read ( b u f f e r , 0 , 2) ; / / Leer un b y t e a l a v ez 84 85 s t r i n g hexhex = B i t C o n v e r t e r . T oS t ri ng ( b u f f e r ) . Repla ce ( "−" , s t r i n g . Empty ) . ToLower ( ) ; 86 87 s t r i n g a s c i = c o n v e r t _ h e x _ t o _ a s c i i ( convert_hex_to_ascii (hexhex)); 88 89 i f ( a s c i == " \ 0 " ) { 90 b y t e L i s t . Add ( b u f f e r [ 0 ] ) ; 91 b y t e L i s t . Add ( b u f f e r [ 1 ] ) ; 92 break ;/ / S i encontramos ’ \ 0 ’ , term in am os l a lectura 93 } 94 b y t e L i s t . Add ( b u f f e r [ 0 ] ) ; 95 b y t e L i s t . Add ( b u f f e r [ 1 ] ) ; 96 } 97 98 by t e [ ] myReadBuffer = b y t e L i s t . ToArray ( ) ; 99 100 s t r i n g hexhex_message = B i t C o n v e r t e r . T oS tr in g ( myReadBuffer ) . Repl ace ( "−" , s t r i n g . Empty ) . ToLower ( ) ; 101 102 string ascii = convert_hex_to_ascii ( convert_hex_to_ascii (hexhex_message) ) ; 103 104 Debug . Log ( a s c i i ) ; 105 106 r e t u r n a s c i i ; 107 108 109 } 110 111 p r i v a t e static b yt e [ ] S tr i n g To B y te A r r ay ( s t r i n g hex ) { 112 r e t u r n Enumerable . Range ( 0 , hex . Length ) 113 . Where ( x => x % 2 == 0) 114 . S e l e c t ( x => Conv ert . ToByte ( hex . S u b s t r i n g ( x , 2 ) , 16) ) This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
115 . ToArray ( ) ; 116 } 117 118 p r i v a t e s t r i n g c o n v e r t _ h e x _ t o _ a s c i i ( s t r i n g hex_message ) { 119 120 s t r i n g a s c i i = s t r i n g . Empty ; 121 122 by t e [ ] b y t e s = S tr in gT oB y te Ar ra y ( hex_message ) ; 123 a s c i i = Encoding . UTF8 . G e t S t r i n g ( b y t e s ) ; 124 r e t u r n a s c i i ; 125 126 } 127 128 129 / / Update i s c a l l e d once per frame 130 v o i d Update ( ) 131 { 132 i f ( t h i s . m e s s a g e _ r e c i e v e d _ a c t i v i t y != 0) { 133 E n ab l e Di s a bl e Bu t t on s ( t h i s . m e s s a g e _ r e c i e v e d _ a c t i v i t y ) ; 134 t h i s . m e s s a g e _ r e c i e v e d _ a c t i v i t y = −1; 135 } 136 else { 137 SceneManager . LoadScene ( " IP _Conf ig " ) ; 138 } 139 } 140 141 p r i v a t e v o i d s e n d _ t e x t _ 2 _ s o c k e t ( s t r i n g message ) { 142 by t e [ ] b y t e s = Encoding . UTF8 . GetBytes ( message ) ; 143 s t r i n g hex_message = B i t C o n v e r t e r . T oS tr in g ( b y t e s ) . Repla ce ( "−" , s t r i n g . Empty ) . ToLower ( ) ; 144 t h i s . t h e W r i t e r . Write ( hex_message ) ; 145 t h i s . t h e W r i t e r . F lus h ( ) ; 146 } 147 148 p r i v a t e v o i d E n a b l e D i s a b l e B u t t o n s ( i n t b u t t o n s _ c a s e ) { 149 s w i t c h ( b u t t o n s _ c a s e ) { 150 c a s e 1 : 151 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = t r u e ; 152 t h i s . Button_LowVoice . i n t e r a c t a b l e = f a l s e ; 153 t h i s . Button_HighVoice . i n t e r a c t a b l e = f a l s e ; 154 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = f a l s e ; 155 t h i s . Button_NotAnswer . i n t e r a c t a b l e = f a l s e ; 156 t h i s . Button_OKAnswer . i n t e r a c t a b l e = f a l s e ; 157 t h i s . Button_KO_Answer . i n t e r a c t a b l e = f a l s e ; 158 t h i s . Button_SendMessage . i n t e r a c t a b l e = f a l s e ; 159 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 160 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = f a l s e ; 161 break ; This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
162 c a s e 2 : 163 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = t r u e ; 164 t h i s . Button_LowVoice . i n t e r a c t a b l e = f a l s e ; 165 t h i s . Button_HighVoice . i n t e r a c t a b l e = f a l s e ; 166 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = t r u e ; 167 t h i s . Button_NotAnswer . i n t e r a c t a b l e = f a l s e ; 168 t h i s . Button_OKAnswer . i n t e r a c t a b l e = f a l s e ; 169 t h i s . Button_KO_Answer . i n t e r a c t a b l e = f a l s e ; 170 t h i s . Button_SendMessage . i n t e r a c t a b l e = t r u e ; 171 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 172 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = f a l s e ; 173 break ; 174 c a s e 3 : 175 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = f a l s e ; 176 t h i s . Button_LowVoice . i n t e r a c t a b l e = t r u e ; 177 t h i s . Button_HighVoice . i n t e r a c t a b l e = t r u e ; 178 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = t r u e ; 179 t h i s . Button_NotAnswer . i n t e r a c t a b l e = t r u e ; 180 t h i s . Button_OKAnswer . i n t e r a c t a b l e = t r u e ; 181 t h i s . Button_KO_Answer . i n t e r a c t a b l e = f a l s e ; 182 t h i s . Button_SendMessage . i n t e r a c t a b l e = t r u e ; 183 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 184 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = f a l s e ; 185 break ; 186 187 c a s e 4 : 188 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = f a l s e ; 189 t h i s . Button_LowVoice . i n t e r a c t a b l e = t r u e ; 190 t h i s . Button_HighVoice . i n t e r a c t a b l e = t r u e ; 191 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = t r u e ; 192 t h i s . Button_NotAnswer . i n t e r a c t a b l e = t r u e ; 193 t h i s . Button_OKAnswer . i n t e r a c t a b l e = t r u e ; 194 t h i s . Button_KO_Answer . i n t e r a c t a b l e = t r u e ; 195 t h i s . Button_SendMessage . i n t e r a c t a b l e = t r u e ; 196 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 197 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = f a l s e ; 198 break ; 199 200 c a s e 5 : 201 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = f a l s e ; 202 t h i s . Button_LowVoice . i n t e r a c t a b l e = t r u e ; 203 t h i s . Button_HighVoice . i n t e r a c t a b l e = t r u e ; 204 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = t r u e ; 205 t h i s . Button_NotAnswer . i n t e r a c t a b l e = t r u e ; 206 t h i s . Button_OKAnswer . i n t e r a c t a b l e = t r u e ; 207 t h i s . Button_KO_Answer . i n t e r a c t a b l e = t r u e ; 208 t h i s . Button_SendMessage . i n t e r a c t a b l e = t r u e ; 209 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 210 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = t r u e ; This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
211 break ; 212 213 c a s e 6 : 214 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = f a l s e ; 215 t h i s . Button_LowVoice . i n t e r a c t a b l e = t r u e ; 216 t h i s . Button_HighVoice . i n t e r a c t a b l e = t r u e ; 217 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = t r u e ; 218 t h i s . Button_NotAnswer . i n t e r a c t a b l e = t r u e ; 219 t h i s . Button_OKAnswer . i n t e r a c t a b l e = t r u e ; 220 t h i s . Button_KO_Answer . i n t e r a c t a b l e = f a l s e ; 221 t h i s . Button_SendMessage . i n t e r a c t a b l e = t r u e ; 222 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 223 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = t r u e ; 224 break ; 225 226 c a s e 7 : 227 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = f a l s e ; 228 t h i s . Button_LowVoice . i n t e r a c t a b l e = f a l s e ; 229 t h i s . Button_HighVoice . i n t e r a c t a b l e = f a l s e ; 230 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = t r u e ; 231 t h i s . Button_NotAnswer . i n t e r a c t a b l e = t r u e ; 232 t h i s . Button_OKAnswer . i n t e r a c t a b l e = f a l s e ; 233 t h i s . Button_KO_Answer . i n t e r a c t a b l e = f a l s e ; 234 t h i s . Button_SendMessage . i n t e r a c t a b l e = f a l s e ; 235 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = f a l s e ; 236 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = f a l s e ; 237 break ; 238 239 c a s e 8 : 240 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = f a l s e ; 241 t h i s . Button_LowVoice . i n t e r a c t a b l e = f a l s e ; 242 t h i s . Button_HighVoice . i n t e r a c t a b l e = f a l s e ; 243 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = f a l s e ; 244 t h i s . Button_NotAnswer . i n t e r a c t a b l e = f a l s e ; 245 t h i s . Button_OKAnswer . i n t e r a c t a b l e = f a l s e ; 246 t h i s . Button_KO_Answer . i n t e r a c t a b l e = f a l s e ; 247 t h i s . Button_SendMessage . i n t e r a c t a b l e = f a l s e ; 248 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 249 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = f a l s e ; 250 break ; 251 252 c a s e 9 : 253 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = f a l s e ; 254 t h i s . Button_LowVoice . i n t e r a c t a b l e = f a l s e ; 255 t h i s . Button_HighVoice . i n t e r a c t a b l e = f a l s e ; 256 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = t r u e ; 257 t h i s . Button_NotAnswer . i n t e r a c t a b l e = f a l s e ; 258 t h i s . Button_OKAnswer . i n t e r a c t a b l e = f a l s e ; 259 t h i s . Button_KO_Answer . i n t e r a c t a b l e = f a l s e ; This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
260 t h i s . Button_SendMessage . i n t e r a c t a b l e = t r u e ; 261 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 262 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = f a l s e ; 263 break ; 264 265 c a s e 10: 266 t h i s . B u t t o n _ P r e s s e d B u t t o n . i n t e r a c t a b l e = f a l s e ; 267 t h i s . Button_LowVoice . i n t e r a c t a b l e = f a l s e ; 268 t h i s . Button_HighVoice . i n t e r a c t a b l e = f a l s e ; 269 t h i s . Bu tt on _R ep ea t . i n t e r a c t a b l e = t r u e ; 270 t h i s . Button_NotAnswer . i n t e r a c t a b l e = t r u e ; 271 t h i s . Button_OKAnswer . i n t e r a c t a b l e = f a l s e ; 272 t h i s . Button_KO_Answer . i n t e r a c t a b l e = f a l s e ; 273 t h i s . Button_SendMessage . i n t e r a c t a b l e = t r u e ; 274 t h i s . B u t t o n _ F i n i s h . i n t e r a c t a b l e = t r u e ; 275 t h i s . B utto n_Cl ue . i n t e r a c t a b l e = f a l s e ; 276 break ; 277 278 } 279 } 280 281 / / −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 282 / / CALLBACK FUNCTIONS 283 / / −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 284 p u b l i c v o i d C a l l b a c k F r a s e ( s t r i n g s ) { 285 Debug . Log ( " E s c r i t : " + s ) ; 286 t h i s . ro bo t_ me ss ag e = s ; 287 } 288 / / −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 289 / / BUTTONS FUNCTIONS 290 / / −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 291 p u b l i c v o i d Terminar () { 292 Debug . Log ( " t e r m i n a r " ) ; 293 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "F" ) ; 294 } 295 296 p u b l i c v o i d PulsadorPulsado () { 297 Debug . Log ( " P u l s a d o r p u l s a d o " ) ; 298 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "B" ) ; 299 } 300 301 p u b l i c v o i d RepetirFrase () { 302 Debug . Log ( " r e p e t i r " ) ; 303 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "R" ) ; 304 } 305 306 p u b l i c v o i d RespuestaCorrecta () { 307 Debug . Log ( " c o r r e c t a " ) ; 308 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "C" ) ; This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
309 } 310 311 p u b l i c v o i d R e s p u e s t a I n c o r r e c t a ( ) { 312 Debug . Log ( " i n c o r r e c t a " ) ; 313 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( " I " ) ; 314 } 315 316 p u b l i c v o i d NoResponde () { 317 Debug . Log ( " no re s po n de " ) ; 318 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "M" ) ; 319 } 320 321 p u b l i c v o i d VozBaja ( ) { 322 Debug . Log ( " voz b a j a " ) ; 323 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "L" ) ; 324 } 325 326 p u b l i c v o i d VozAlta ( ) { 327 Debug . Log ( " voz a l t a " ) ; 328 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "H" ) ; 329 } 330 331 p u b l i c v o i d E n v i a r F r a s e ( ) { 332 i f ( t h i s . ro bo t_ me ss age == " " ) { 333 t h i s . I n pu t Fi e ld _ R ob o tM e ss a ge . image . c o l o r = C olor . re d ; 334 } 335 else { 336 t h i s . I n pu t Fi e ld _ R ob o tM e ss a ge . image . c o l o r = C olor . wh it e ; 337 Debug . Log ( " e n v i a r " ) ; 338 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "S"+ t h i s . r obot _me ssag e ) ; 339 } 340 } 341 342 p u b l i c v o i d D a r P i s t a ( ) { 343 Debug . Log ( " d a r P i s t a " ) ; 344 t h i s . s e n d _ t e x t _ 2 _ s o c k e t ( "P" ) ; 345 } 346 347 348 } This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).
File 2: IP_Config.cs 1 u s i n g System . C o l l e c t i o n s ; 2 u s i n g System . C o l l e c t i o n s . Ge ne ri c ; 3 u s i n g U ni t yEng ine ; 4 u s i n g U ni t yEng ine . UI ; 5 u s i n g System ; 6 u s i n g TMPro ; 7 u s i n g U ni t yEng ine . SceneManagement ; 8 u s i n g System . Net ; 9 u s i n g System . Net . S o c k e t s ; 10 u s i n g System . Tex t ; 11 u s i n g System . IO ; 12 13 p u b l i c c l a s s I P_Co nfig : MonoBehaviour 14 { 15 p r i v a t e s t r i n g GameIP = "GAMEIP" ; 16 17 p u b l i c TMP_InputField In pu tF iel d_Ga meIp ; 18 19 p r i v a t e s t r i n g game_ip ; 20 21 22 23 / / S t a r t i s c a l l e d b e f o r e t h e f i r s t frame up d at e 24 v o i d S t a r t ( ) 25 { 26 t h i s . game_ip = " 1 9 2 . 1 6 8 . 3 1 . 1 1 9 " ; 27 } 28 29 / / Update i s c a l l e d once per frame 30 v o i d Update ( ) 31 { 32 33 } 34 35 p u b l i c v o i d CallbackGameIP ( s t r i n g s ) { 36 t h i s . game_ip = s ; 37 } 38 39 / / −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 40 / / BUTTONS FUNCTIONS 41 / / −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− 42 p u b l i c v o i d Continuar () { 43 i f ( t h i s . game_ip == " " ) { 44 t h i s . In pu tF ie ld _G am eI p . image . c o l o r = Color . r e d ; 45 } 46 else { 47 P l a y e r P r e f s . S e t S t r i n g ( GameIP , t h i s . game_ip ) ; This research was supported by the Spanish National Program of Projects of Knowledge Generation 2022 with the reference PID2022-140284OB-I00, of the Program to Boost Scientific and Technical Research and its Transfer, from the Spanish National Plan for Scientific, Technical, and Innovation Research 2021-2023, titled “Uses of robotics to improve the instrumental skills of students with autism spectrum disorder through the development of new inclusive contexts. (DivInTech)”. (AEI/FEDER, UE).