# ShareCamera(实验能力)

### 能力介绍

***

由于相机资源本身为独占式.在多个算法/应用中使用时,无法做到共享.所以拥有了share camera的概念.<br>

### Static Public Member Function

***

<table data-header-hidden><thead><tr><th width="616"></th><th></th></tr></thead><tbody><tr><td><strong>ShareCamera.GetCameraColors</strong></td><td><br></td></tr><tr><td>void GetCameraColors(Action&#x3C;int, int, Color32> call)</td><td></td></tr><tr><td><p>获取camera中的图片像素</p><p>ShareCamera.GetCameraColors((int x, int y, Color32 color) =>{</p><p>      ((Texture2D)m_recordBack.texture).SetPixel(x, height - y - 1, color);</p><p>});</p><p>((Texture2D)m_recordBack.texture).Apply(false);</p></td><td></td></tr></tbody></table>

| **ShareCamera.OpenShareCamera** | <p><br></p> |
| ------------------------------- | ----------- |
| Void OpenShareCamera()          |             |
| 开启share camera                  |             |

| **ShareCamera.CloseShareCamera** | <p><br></p> |
| -------------------------------- | ----------- |
| void RayNeoApi\_CloseCamera()    |             |
| 关闭share camera                   |             |

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rayneo.gitbook.io/rayneo-devdoc/x-xi-lie/unity-kai-fa/x2-api-jiu-ban-sdk-zhi-chi/sharecamera-shi-yan-neng-li.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
