예제 #1
0
        private void InitWatermarks()
        {
            // catch the first time Studio is loaded, when MixCastManageApp has not yet assigned the path causing the watermark to fail to show
            if (string.IsNullOrEmpty(MixCast.Settings.persistentDataPath))
            {
                MixCast.Settings.persistentDataPath = Application.persistentDataPath;
            }

            var textureLoader = gameObject.AddComponent <FileTextureLoader>();

            // only show arcade branding if not free license type
            if (!MixCast.SecureSettings.IsFreeLicense)
            {
                brandingBlit = new BlitTexture();
                brandingBlit.SetTexturePosition(BlitTexture.Position.BottomRight);
                brandingBlit.Material = new Material(Shader.Find("Hidden/MixCast/Watermark"));

                // arcade branding logo
                string brandingFilepath = Path.Combine(MixCast.Settings.persistentDataPath, "branding.png");
                textureLoader.AddJob(brandingFilepath, (texture) =>
                {
                    brandingBlit.Texture = texture;
                });
            }

            // show our MixCast watermark
            logoBlit = new BlitTexture();
            logoBlit.SetTexturePosition(BlitTexture.Position.BottomLeft);
            logoBlit.Material = new Material(Shader.Find("Hidden/MixCast/Watermark"));
            logoBlit.Texture  = Resources.Load <Texture2D>("MixCast_Logo");

            MixCastCamera.FrameEnded += ApplyWatermarks;
        }
예제 #2
0
 protected virtual void Awake()
 {
     noCamBlit = new BlitTexture();
     noCamBlit.SetTexturePosition(BlitTexture.Position.Middle);
     noCamBlit.Material = new Material(Shader.Find("Hidden/MixCast/Watermark"));
     noCamBlit.Texture  = Resources.Load <Texture2D>("icon_camera_missing");
     noCamBlit.fullSize = true;
 }