Пример #1
0
        public override void ProcessFrame(Playable playable, FrameData info, object playerData)
        {
            Holoplay holoplay = playerData as Holoplay;

            if (holoplay == null)
            {
                Debug.LogError("HoloPlay is null");
                return;
            }
            if (!holoplay.gameObject.activeInHierarchy || !holoplay.enabled)
            {
                return;
            }
            holoplay.fov = clipData.fov;
            holoplay.transform.localPosition = clipData.localPosition;
            holoplay.nearClipFactor          = clipData.nearParam;
            holoplay.farClipFactor           = clipData.farParam;
            holoplay.size = clipData.size;
            #if UNITY_EDITOR
            if (!UnityEditor.EditorApplication.isPlaying)
            {
                holoplay.RenderQuilt();
            }
            #endif
        }
Пример #2
0
 private void Awake()
 {
     if (holoplay == null)
     {
         holoplay = GetComponentInChildren <Holoplay>();
     }
 }
Пример #3
0
        protected override void OnLoadStart()
        {
            if (holoplay == null)
            {
                holoplay = GetComponentInChildren <Holoplay>();
            }

            holoplaySize = holoplay.size;
            vec3Holoplay = holoplay.transform.localPosition;

            var sm = Model.First <SettingModel>();

            if (!sm.UseLookingGless)
            {
                holoplay.gameObject.SetActive(false);
            }

            SetResourceLoadComplete();
        }
Пример #4
0
    // Use this for initialization
    void Start()
    {
        // ファイルドロップなどを扱うためのWindowControllerインスタンスを取得
        window = FindObjectOfType <WindowController>();
        window.OnFilesDropped += Window_OnFilesDropped;

        // Quiltのインスタンスを取得
        holoplay      = FindObjectOfType <Holoplay>();
        defaultTiling = holoplay.quiltSettings;
        //defaultTiling = Quilt.GetPreset(Quilt.Preset.Custom, holoplay.cal);   // Tilingの初期設定を記憶しておく
        holoplay.background = new Color(0, 0, 0, 0);             // 背景は透明にする

        // VideoPlayerのインスタンスを取得
        videoPlayer = FindObjectOfType <VideoPlayer>();
        if (videoPlayer)
        {
            //videoRenderTexture = new RenderTexture(4096, 4096, 24);
            videoRenderTexture        = new RenderTexture(4096, 4096, 32);
            videoPlayer.targetTexture = videoRenderTexture;

            videoPlayer.seekCompleted += VideoPlayer_seekCompleted;
        }

        // フレームレートを指定
        Application.targetFrameRate = frameRateForStill;

        // 操作に対する表示は非表示にしておく
        if (nextIndicator)
        {
            nextIndicator.SetActive(false);
        }
        if (prevIndicator)
        {
            prevIndicator.SetActive(false);
        }

        // TextMeshがあれば複製して影とする
        InitializeTextShadow();

        // サンプルの画像を読み込み
        LoadFile(defaultImagePath);

        // メッセージ欄を最初に消去
        ShowMessage("");
        ShowFileInfo("");

        // 保存された設定を読込
        LoadSettings();

        // スライドショーが行われるならその間隔を最初に表示
        if (slideShowInterval > 0)
        {
            ShowMessage("Slideshow: " + slideShowInterval + " s");
        }

        // バックグラウンドでのボタン管理
        SetupButtonListener();

        // カーソルを表示するか否かを記憶
        isCursorVisible = Cursor.visible;
    }