Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Unity 5.4.3 - OverflowError utilizando System.Drawing.Graphics - DrawImage

$
0
0
Estimados, Buenos días, espero me puedan ayudar. Estoy con un problema al querer usar la librería System.Drawing.Graphics. La idea original era crear una DLL en C# y utilizarla desde Unity, ya lo hice varias veces y funcionan correctamente. Esta nueva DLL es para generar un PDF, el mismo posee imágenes sobre las que dibujo disparos en diferentes posesiones. La DLL si la utilizo por fuera de Unity funciona perfecto, pero desde Unity me salta un Overflow Error cuando quiere realizar "DrawImage" El código es este: System.Drawing.Bitmap objBitmap = new Bitmap(backImg, new Size(452, 452)); System.Drawing.Graphics g = System.Drawing.Graphics.FromImage(objBitmap); int cantDisparos = 0; for (int z = 0; z < player.shoots.Count; z++) { if (player.shoots[z].disparo == 1) { positions.Add(z); g.DrawImage(mrkImg, (player.shoots[z].x - 850) * (500 / 219), (player.shoots[z].y - 434) * (500 / 219)); g.DrawImage(DrawText((cantDisparos + 1).ToString()), (player.shoots[z].x - 850) * (500 / 219), (player.shoots[z].y - 434) * (500 / 219)); cantDisparos++; } } El Overflow Error aparece cuando ejecuta cualquier DrawImage Espero su respuesta. Desde ya muchas gracias!!

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>