public void RespondWithBytes(byte[] bytes, Coherent.UI.ResourceResponse response)
        {
            IntPtr buffer = response.GetBuffer((uint)bytes.Length);

            if (buffer == IntPtr.Zero)
            {
                response.SignalFailure();
                return;
            }

            Marshal.Copy(bytes, 0, buffer, bytes.Length);

            response.SignalSuccess();
        }
        public void ReadFileFromFilesystem(string cleanUrl, Coherent.UI.ResourceResponse response)
        {
                #if COHERENT_UNITY_UNSUPPORTED_PLATFORM
            throw new ApplicationException("Coherent UI doesn't support the target platform!");
                #else
            if (!File.Exists(cleanUrl))
            {
                response.SignalFailure();
                return;
            }

            byte[] bytes = File.ReadAllBytes(cleanUrl);

            RespondWithBytes(bytes, response);
                #endif
        }