- Home /
ScreenCapture.CaptureScreenshotAsTexture is capturing the editor when NOT using Free Aspect
I have a script attached to my character. The script calls ScreenCapture.CaptureScreenshotAsTexture()
from within an IEnumerator
.
I collect a bunch of Texture2D
objects and then at some point, I export each of them to file as a JPG
.
I do this with:
var shots = new List<Texture2D>();
//populate shots
using (var memStream = new MemoryStream())
{
foreach(var shot in shots){
File.WriteAllBytes(filePath, shot.EncodeToJPG());
}
}
For some reason, when I check out the saved files, it is clear that part of the Editor is being captured...
This only occurs when the game view is set to use something other than Free Aspect
Any idea why? Bug?
Answer by LordBelasco · Dec 28, 2018 at 03:04 PM
It seems to a bug with the last release I use the CaptureScreenshotAsTexture since some months, and I get the same problem after installing the 2018.3. It works fine before this release :(
Your answer
Follow this Question
Related Questions
How can I simply record footage of my game in unity? 2 Answers
Merging a Texture of Set Resolution with an Imported Texture 0 Answers
How to correctly save a screenshot in a custom path? 1 Answer
Fraps is not recording Unity builds at certain resolutions 1 Answer
Saving screencap to android gallery 0 Answers