Application.CaptureScreenshot() won't capture?

if (GUILayout.Button("Foo"))
            Application.CaptureScreenshot("foo.png");

I’m using the above code in an editor script… yet I cannot get it to actually output a file? I searched my entire PC and the file was not created? Is there anything else needed for this to work?

thanks! :slight_smile:

you can find the image in the root folder of your project

hey apples - well, as I mentioned, I’ve searched my entire computer (all HDD’s, external drives… etc) in case it went to some odd location… cannot find it!

I’m using the function inside a editor toolwindow.

then you would find it in the editor directory.

sorry, in the root of your project you have actualy loaded in the editor.
next to the asset and library folders

sorry maybe I wasn’t being clear enough… :slight_smile:
I did an entire search of my entire system including all internal and external storage devices that are currently connected to the system…
ie) everywhere :stuck_out_tongue:

but yeh, seems strange it’s not outputting the file
as mentioned, I’m using it in a custom editor tool window, will this command work here?
it seemed in other threads about Application.CaptureScreenshot() that it’s usually used whilst the application is running?

hmmm yes, that might be it