Hey Hive!
Today I want to share a cool and challenging I’ve been working on lately for a client. It’s a simple idea, but with huge creative and social potential:
Drawing on a tablet and instantly seeing your creation displayed on a giant screen.
Perfect for museums, events, art installations, or just having fun creating something together with others.
The Challenge
The idea was to build two applications connected over a local network:
- On an Android tablet, users can freely draw with their finger.
- On a PC connected to a big screen, those drawings are received and displayed instantly.
All of this without internet, no external servers—just Unity, some code, and a lot of trial and error.
How it works
The flow is simple in theory, but technically it had a few tricky parts.
Client app(tablet or phone):
- Lets users paint freely on a texture.
- When pressing a button, the drawing is turned into a PNG using
EncodeToPNG()
. - It’s sent over HTTP to the PC’s IP using
UnityWebRequest
.
Server app (PC):
- Runs a local HTTP server built with
HttpListener
(this was an awesome achivement for me because i didn't know that unity allows that). - Listens at the PC ip and the port and endpoint you want.
- When it receives an image:
- Loads it as a texture.
- Displays it centered on screen using a
RawImage
.
Obstacles i faced and how i solve them
As with any project, things didn’t work on the first try. But each issue helped me learn something new.
Android blocking the connection
When testing both apps on the same PC, it worked perfectly.
But when sending from the tablet… nothing happened.
Turns out Android blocks unencrypted HTTP connections by default.
How I fixed it:
- Enabled “Allow HTTP” in Unity’s Player Settings.
- Made sure the Internet permission was set in the AndroidManifest.xml.
Corrupted or incomplete images
Sometimes the image would arrive broken, or just wouldn’t load at all.
What was wrong?
I was using stream.Read(...)
, which doesn’t always read the entire data stream.
The fix:
Switched to stream.CopyTo()
+ MemoryStream
, and that solved the issue completely.
Final Result
A user draws on the tablet.
With one tap, the drawing appears instantly on the big screen.
No internet required—just local network.
And it’s scalable: perfect for games, galleries, workshops, live exhibits and more.
Here is a quick video on how its going so far:
What else can we do with it?
The idea is to make the big screen like a book where you can turn pages and see all the drawings made. Also i'm planning on adding colors you can pick from and brush sizes so stay tuned for more updates!
Can you see this at an event?
I’d love to expand on this idea.
If you can think of a creative way to use this kind of system, let me know in the comments!
ESPAÑOL
¡Hola Hive!
Hoy quiero compartir un proyecto muy interesante (y desafiante) en el que estuve trabajando últimamente para un cliente. Es una idea simple, pero con un enorme potencial creativo y social:
Dibujar en una tablet y ver tu creación aparecer al instante en una pantalla gigante.
Perfecto para museos, eventos, instalaciones artísticas o simplemente para divertirse creando algo entre varias personas.
El desafío
La idea era construir dos aplicaciones conectadas por red local:
- En una tablet Android, los usuarios pueden dibujar libremente con el dedo.
- En una PC conectada a una pantalla grande, esos dibujos se reciben y se muestran al instante.
Todo esto sin internet, sin servidores externos—solo Unity, algo de código y mucha prueba y error.
¿Cómo funciona?
En teoría el flujo es simple, pero técnicamente tuvo varios detalles.
App cliente (tablet o celular):
- Permite pintar libremente sobre una textura.
- Al presionar un botón, el dibujo se convierte en una imagen PNG usando
EncodeToPNG()
. - Se envía por HTTP a la IP de la PC usando
UnityWebRequest
.
App servidor (PC):
- Corre un servidor HTTP local hecho con
HttpListener
(esto fue un logro personal porque no sabía que Unity lo permitía). - Escucha en la IP de la PC y en el puerto y endpoint que definas.
- Cuando recibe una imagen:
- La carga como una textura.
- La muestra centrada en pantalla usando un
RawImage
.
Obstáculos que enfrenté y cómo los resolví
Como en todo proyecto, las cosas no funcionaron a la primera. Pero cada problema fue una oportunidad para aprender algo nuevo.
Android bloqueando la conexión
Probando ambas apps en la misma PC, todo funcionaba perfecto.
Pero cuando enviaba desde la tablet… no pasaba nada.
Resulta que Android bloquea por defecto las conexiones HTTP sin cifrado.
¿Cómo lo solucioné?
- Activé “Allow HTTP” en los Player Settings de Unity.
- Me aseguré de que el permiso de Internet estuviera incluido en el AndroidManifest.xml.
Imágenes corruptas o incompletas
A veces la imagen llegaba dañada, o directamente no se cargaba.
¿Cuál era el problema?
Estaba usando stream.Read(...)
, que no siempre lee todo el flujo de datos.
La solución:
Reemplacé eso por stream.CopyTo()
junto con MemoryStream
, y eso resolvió el problema completamente.
Resultado final
Un usuario dibuja en la tablet.
Con un solo toque, el dibujo aparece al instante en la pantalla grande.
No se necesita internet—solo red local.
Y es un sistema escalable: perfecto para juegos, galerías, talleres, expos y mucho más.
Aquí les dejo un video rápido de cómo va quedando:
¿Qué más se puede hacer?
La idea es que la pantalla grande funcione como un libro donde se puedan pasar páginas y ver todos los dibujos realizados.
También estoy pensando en agregar selección de colores y tamaños de pincel, ¡así que se vienen más novedades!
¿Te imaginás esto en un evento?
Me encantaría seguir desarrollando esta idea.
Si se te ocurre alguna forma creativa de usar este sistema, contámelo en los comentarios.