Hi Unity Team and Community,
While working with Unity Version 6000.0.34f1, calling WebCamTexture.Play();
triggers the following error:
Missing Profiler.EndSample (Every BeginSample call must have a subsequent EndSample call within the same frame): Gfx.UploadTexture
Previous 5 samples:
Gfx.UploadTexture
RenderLoop
Semaphore.WaitForSignal
Gfx.WaitForGfxCommandsFromMainThread
CustomRenderTextures.Update
In the scope:
Gfx.UploadTexture
RenderLoop
<Root>
Steps to Reproduce:
- Create a new Unity project in version 6000.0.34f1.
- Add a script to a GameObject that initializes and starts a
WebCamTexture
:
using UnityEngine;
using UnityEngine.UI;
public class EasyCamera : MonoBehaviour
{
[SerializeField] private RawImage m_Image = default;
private WebCamTexture m_WebCamTexture = null;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
m_WebCamTexture = new WebCamTexture();
m_WebCamTexture.Play();
}
}
Thank you for your time and consideration.