This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Update() | |
{ | |
Move += MoveVel; | |
if (Move >= 0.5 || | |
Move <= -4) | |
{ | |
MoveVel = 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Update() | |
{ | |
Move += Vel; | |
if (Move >= 0.5 || | |
Move <= -4) | |
{ | |
Vel = 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Update() | |
{ | |
if (transform.position.x >= 0.5 || | |
transform.position.x <= -4) | |
{ | |
Vel = 0; | |
} | |
#region キー入力 | |
//右が押されたら |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (AssetDatabase.FindAssets("t:script SteamVR").Length > 0) | |
{ | |
var nowSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); | |
var addSymbol = "EXSISTENCE_STEAM_VR"; | |
if(nowSymbols.IndexOf(addSymbol) < 0) | |
{ | |
addSymbol = ";" + addSymbol + ";"; | |
var newSymbols = nowSymbols + addSymbol; | |
PlayerSettings.SetScriptingDefineSymbolsForGroup( | |
EditorUserBuildSettings.selectedBuildTargetGroup, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StandaloneInputModule : PointerInputModule | |
{ | |
//更新処理 | |
public override void Process() | |
{ | |
//1. 更新処理や入力処理(割愛) | |
//2. 入力によるイベント呼び出し | |
ExecuteEvents.Execute(イベントを送る対象, 対象に送るイベントデータ, 送信するイベントのタイプ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected virtual PointerEventData GetMousePointerEventData() | |
{ | |
//ポインタのデータ作成 | |
PointerEventData pointerData; | |
var created = GetPointerData (kMouseId, out pointerData, true); | |
//データ初期化 | |
pointerData.Reset (); | |
//マウスの諸々の情報をポインタの情報として渡す |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI; | |
using UnityEngine.VR; | |
using VRDebug; | |
namespace VRDebug | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEngine.UI; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
using UnityEngine.EventSystems; | |
using UnityEngine.Events; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class PlayerRotate : MonoBehaviour { | |
private GameObject mainAimObj; | |
public float rotateSpeed = 1; | |
public Constrain constrainX; | |
public Constrain constrainY; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class AimFollow : MonoBehaviour { | |
private GameObject followTarget; | |
private Vector3 offset; | |
void Awake () { |
OlderNewer