private IEnumerator ShowC(string user, string byteStr) { byte[] bytes = SlimeScreenCapture.StringToByteArray(byteStr); yield return(new WaitForEndOfFrame()); Texture2D tex = new Texture2D(SlimeScreenCapture.Shared.width, SlimeScreenCapture.Shared.height, TextureFormat.ARGB32, false); tex.LoadRawTextureData(bytes); tex.Apply(); if (screens.ContainsKey(user)) { screens[user].SetTexture(tex); } else { Debug.Log("key lost!"); } // viz.texture = tex; }
void Awake() { SlimeScreenCapture.Shared = this; this.camera = this.gameObject.GetComponent <Camera>(); }