Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance #18

Open
TanninOne opened this issue Aug 7, 2021 · 1 comment
Open

Performance #18

TanninOne opened this issue Aug 7, 2021 · 1 comment

Comments

@TanninOne
Copy link

for (int x = 0; x < TempMap.width; x++)
{
for (int y = 0; y < TempMap.height; y++)
{
theColour.r = TextureRed == null ? TextureRed.GetPixel(x, y).grayscale : new Texture2D(TempMap.width,TempMap.height).GetPixel(x,y).grayscale;
theColour.g = TextureGreen == null ? TextureGreen.GetPixel(x, y).grayscale : new Texture2D(TempMap.width, TempMap.height).GetPixel(x, y).grayscale;
theColour.b = TextureBlue == null ? TextureBlue.GetPixel(x, y).grayscale : new Texture2D(TempMap.width, TempMap.height).GetPixel(x, y).grayscale;

That's not the most efficient way of setting static color values as fallback for missing textures... ;)

@finepointcgi
Copy link
Owner

finepointcgi commented Aug 7, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants