Ah sorry i didnt see that
strangely one of my buttons is also not visible
by user 1013817853725646862
in the game view one UI element ( blue and white button ) is in front of another, but in the build it is behind for some reason
by user 1013817853725646862
do they have the same z value?
not anymore😆
by user 1013817853725646862
they did but I have changed them so that one is physically in front instead of just heirachically
by user 1013817853725646862
Are you trying to generate car paints with AI?
How would I go about making a screenshot and downloading it? I was previously doing something like this: //if WebGL, download file
if (Application.platform == RuntimePlatform.WebGLPlayer)
{
var texture = UnityEngine.ScreenCapture.CaptureScreenshotAsTexture();
byte[] textureBytes = texture.EncodeToPNG();
DownloadFile(textureBytes, textureBytes.Length, "screenshot" + System.DateTime.Now.ToString("MM-dd-yy (HH-mm-ss)") + ".png");
Destroy(texture);
by user 1013817853725646862
There is a helper method, one second
[DllImport(“__Internal”)]
private static extern void DownloadFile(byte array, int byteLength, string fileName);
by user 1013817853725646862
in @needle-tools/engine/engine/engine_utils_screenshot
it has a method called screenshot that you can use, just pass in the context, width and height and it will return the screenshot data that you can download
And I would download it in the same way?
by user 1013817853725646862
it is webp by default, but you can pas in image/png for png
you could do it like this javascript - Download data URL file - Stack Overflow
so somthing like … var texture =ScreenCapture(“.png”,Screen.width, Screen.height);? not sure what you mean by context here
by user 1013817853725646862
screenshot(this.context, 1024, 512)
for example < size that you define
or screenshot(this.context, window.innerWidth, window.innerHeight, "image/png")
< size of your browser window as png
or screenshot(this.context, this.context.domWidth, this.context.domHeight)
< size of your webgl canvas