public void OnHandWritingStickeySave() { DrawableCanvas drawableCanvas = HandWritingStickeyCanvas.GetComponent <DrawableCanvas>(); m_OnHandWritingStickeyComplete.OnNext(drawableCanvas.GetTexture2D()); drawableCanvas.ResetCanvas(); }
public void GetRawTextureDataRPC(PhotonMessageInfo info) { //ホワイトボードの場合は最新のテクスチャを取得する。 if (m_DrawableCanvas != null) { texture = m_DrawableCanvas.GetTexture2D(); } byte[] rawTextureData = texture.EncodeToPNG(); int width = texture.width; int height = texture.height; int dataSize = rawTextureData.Length; int viewId = m_PhotonView.ViewID; Debug.Log("*************************"); Debug.Log(" GetRawTextureDataRPC"); Debug.Log(" RPC sender: " + info.Sender); Debug.Log(" Texture size: " + width + "x" + height + " = " + width * height + "px"); Debug.Log(" RawTextureData: " + rawTextureData.Length + "bytes"); Debug.Log("*************************"); StreamTextureDataToRequestSender(rawTextureData, width, height, dataSize, viewId, info.Sender); }
public void StartTextureSharing() { textureSharingComponent.SetDrawableCanvas(drawableCanvas); textureSharingComponent.GetRawTextureDataFromMasterClient(drawableCanvas.GetTexture2D()); }