diff --git a/03_RoyalGallery/Unity-19050-03_RoyalGallery_Portrait_PC/19050-03_RoyalGallery_Portrait_PC/Assets/RoyalGalleryPortrait.unity b/03_RoyalGallery/Unity-19050-03_RoyalGallery_Portrait_PC/19050-03_RoyalGallery_Portrait_PC/Assets/RoyalGalleryPortrait.unity index 5324f05..270706c 100644 --- a/03_RoyalGallery/Unity-19050-03_RoyalGallery_Portrait_PC/19050-03_RoyalGallery_Portrait_PC/Assets/RoyalGalleryPortrait.unity +++ b/03_RoyalGallery/Unity-19050-03_RoyalGallery_Portrait_PC/19050-03_RoyalGallery_Portrait_PC/Assets/RoyalGalleryPortrait.unity @@ -3389,6 +3389,7 @@ MonoBehaviour: onStateChanged: m_PersistentCalls: m_Calls: [] + overrideHost: 192.168.60.220 interval: 1 onTextureReceived: m_PersistentCalls: diff --git a/03_RoyalGallery/Unity-19050-03_RoyalGallery_Portrait_PC/19050-03_RoyalGallery_Portrait_PC/Assets/RoyalGalleryPortrait/Script/ResourceClient.cs b/03_RoyalGallery/Unity-19050-03_RoyalGallery_Portrait_PC/19050-03_RoyalGallery_Portrait_PC/Assets/RoyalGalleryPortrait/Script/ResourceClient.cs index 60ea605..6b1b18b 100644 --- a/03_RoyalGallery/Unity-19050-03_RoyalGallery_Portrait_PC/19050-03_RoyalGallery_Portrait_PC/Assets/RoyalGalleryPortrait/Script/ResourceClient.cs +++ b/03_RoyalGallery/Unity-19050-03_RoyalGallery_Portrait_PC/19050-03_RoyalGallery_Portrait_PC/Assets/RoyalGalleryPortrait/Script/ResourceClient.cs @@ -11,6 +11,9 @@ namespace UltraCombos.Frozen.RoyalGallery [RequireComponent(typeof(RorayGalleryGrpcServer))] public class ResourceClient : GrpcClientBase { + [Configuration.Config] + public string overrideHost = "192.168.60.220"; + public float interval = 1.0f; float stamp = 0.0f; Queue data_pool; @@ -29,15 +32,29 @@ namespace UltraCombos.Frozen.RoyalGallery data_pool = new Queue(); + /* var options = new List { new ChannelOption(ChannelOptions.MaxSendMessageLength, int.MaxValue) }; Connect(options); + */ server = GetComponent(); server.onMessageReceived += OnMessageReceived; } + private void Init() + { + host = overrideHost; + var options = new List { new ChannelOption(ChannelOptions.MaxSendMessageLength, int.MaxValue) }; + Connect(options); + } + private void Update() { + if (channel == null || host.Equals(overrideHost) == false) + { + Init(); + } + if (Time.time - stamp > interval && data_pool.Count > 0) { stamp = Time.time;