This commit is contained in:
YangHua 2024-01-26 11:20:32 +08:00
parent 8a06a15be6
commit 7cc9db8d7d
1 changed files with 5 additions and 2 deletions

View File

@ -14,10 +14,12 @@ public class PostureController : MonoBehaviour
public DeviceBtnItem deviceBtnItem;
public RawImage redShowImage;
public RawImage blueShowImage;
public DroneViewDisplay droneViewDisplay;
// Start is called before the first frame update
void Awake()
{
deviceManager = DeviceManager.Instance;
droneViewDisplay = DroneViewDisplay.Instance;
}
// Update is called once per frame
@ -74,11 +76,12 @@ public class PostureController : MonoBehaviour
if (string.IsNullOrEmpty(id)) return;
if (redOrBlue == 0)
{
redShowImage.texture = DroneViewDisplay.Instance.renderTextureTo(id);
RenderTexture t = droneViewDisplay.renderTextureTo(id);
redShowImage.texture = t;
}
else
{
blueShowImage.texture = DroneViewDisplay.Instance.renderTextureTo(id);
blueShowImage.texture = droneViewDisplay.renderTextureTo(id);
}
Debug.Log(id);