void UpdateState(string json) { //Debug.Log("Updating State: "+service + "\r\n"+json); this.state = (T)Activator.CreateInstance(typeof(T)); this.state = (T)state.FromJson(json); WTEvents.PublishEvent(this.state.defaultEvent, new WTEvent(this.state)); }
void UpdateImage(Texture2D image, byte[] data) { this.image = new Texture2D(image.width, image.height); this.image.LoadImage(data, false); WTEvents.PublishEvent(updateEvent, new WTEvent(this.image)); }