質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

Oculus Rift

Oculus Riftは、ゲームに特化した広視野角バーチャルリアリティヘッドマウントディスプレイ です。そのため、バーチャルリアリティ・ゲームで使用するのを第一目的として開発されています。

Q&A

0回答

228閲覧

unityにoculus rift dk2 をインポートした際のエラーについて

karuizawanibeso

総合スコア14

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

Oculus Rift

Oculus Riftは、ゲームに特化した広視野角バーチャルリアリティヘッドマウントディスプレイ です。そのため、バーチャルリアリティ・ゲームで使用するのを第一目的として開発されています。

0グッド

0クリップ

投稿2018/07/30 03:03

現在unityのバージョンが5.6.1f1でovr_unity_Utilities_1.3.2をインポートしたのですが以下のエラーが出てしまいました。
イメージ説明
自分なりに調べたのですが解決できなかったので申し訳ありませんが協力お願いします、、、

OVRScreeenFade.cs
/************************************************************************************

Copyright : Copyright 2014 Oculus VR, LLC. All Rights reserved.

Licensed under the Oculus VR Rift SDK License Version 3.3 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.

You may obtain a copy of the License at

http://www.oculus.com/licenses/LICENSE-3.3

Unless required by applicable law or agreed to in writing, the Oculus VR SDK
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

************************************************************************************/

using UnityEngine;
using System.Collections; // required for Coroutines

/// <summary>
/// Fades the screen from black after a new scene is loaded.
/// </summary>
public class OVRScreenFade : MonoBehaviour
{
/// <summary>
/// How long it takes to fade.
/// </summary>
public float fadeTime = 2.0f;

/// <summary> /// The initial screen color. /// </summary> public Color fadeColor = new Color(0.01f, 0.01f, 0.01f, 1.0f); private Material fadeMaterial = null; private bool isFading = false; private YieldInstruction fadeInstruction = new WaitForEndOfFrame(); /// <summary> /// Initialize. /// </summary> void Awake() { // create the fade material fadeMaterial = new Material(Shader.Find("Oculus/Unlit Transparent Color")); } /// <summary> /// Starts the fade in /// </summary> void OnEnable() { StartCoroutine(FadeIn()); } /// <summary> /// Starts a fade in when a new level is loaded /// </summary> void OnLevelWasLoaded(int level) { StartCoroutine(FadeIn()); } /// <summary> /// Cleans up the fade material /// </summary> void OnDestroy() { if (fadeMaterial != null) { Destroy(fadeMaterial); } } /// <summary> /// Fades alpha from 1.0 to 0.0 /// </summary> IEnumerator FadeIn() { float elapsedTime = 0.0f; fadeMaterial.color = fadeColor; Color color = fadeColor; isFading = true; while (elapsedTime < fadeTime) { yield return fadeInstruction; elapsedTime += Time.deltaTime; color.a = 1.0f - Mathf.Clamp01(elapsedTime / fadeTime); fadeMaterial.color = color; } isFading = false; } /// <summary> /// Renders the fade overlay when attached to a camera object /// </summary> void OnPostRender() { if (isFading) { fadeMaterial.SetPass(0); GL.PushMatrix(); GL.LoadOrtho(); GL.Color(fadeMaterial.color); GL.Begin(GL.QUADS); GL.Vertex3(0f, 0f, -12f); GL.Vertex3(0f, 1f, -12f); GL.Vertex3(1f, 1f, -12f); GL.Vertex3(1f, 0f, -12f); GL.End(); GL.PopMatrix(); } }

}

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問