Skip to content

Instantly share code, notes, and snippets.

@takoyakiroom
takoyakiroom / Form1.cs
Created November 25, 2022 12:48
クリップボードを監視してVOICEVOXでテキスト読み上げ
using System.Media;
using System.Runtime.InteropServices;
using System.Text;
using System.Web;
namespace VOICEVOX_test
{
public partial class Form1 : Form
{
[DllImport("user32.dll")]
#include <windows.h>
int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
_In_opt_ HINSTANCE hPrevInstance,
_In_ LPWSTR lpCmdLine,
_In_ int nCmdShow)
{
MessageBox(NULL, L"押して!", L"FirstWindow", MB_OK);
return 0;
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HandText : MonoBehaviour
{
[SerializeField]
private OVRHand.Hand HandType = OVRHand.Hand.HandLeft;
private TextMesh text = null;
@takoyakiroom
takoyakiroom / ColliderChanger.cs
Last active September 15, 2020 07:16
ColliderChanger
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Valve.VR.InteractionSystem
{
public class ColliderChanger : MonoBehaviour
{
private void OnHandHoverBegin(Hand hand)
{
@takoyakiroom
takoyakiroom / Walkable.cs
Last active September 12, 2020 15:00
Walkable
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
using Valve.VR.InteractionSystem;
public class Walkable : MonoBehaviour
{
public Transform bodyCollider;
public SteamVR_Action_Vector2 walkAction;
@takoyakiroom
takoyakiroom / Walkable.cs
Created September 12, 2020 14:40
Walkable
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Valve.VR;
public class Walkable : MonoBehaviour
{
public SteamVR_Action_Vector2 walkAction;
void Start()
@takoyakiroom
takoyakiroom / Walkable.cs
Last active September 12, 2020 12:36
Walkable
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Walkable : MonoBehaviour
{
public Transform head;
public Transform bodyCollider;
// Start is called before the first frame update
@takoyakiroom
takoyakiroom / BodyCollider.cs
Last active September 12, 2020 12:34
BodyCollider
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Collider dangling from the player's head
//
//=============================================================================
using UnityEngine;
using System.Collections;
namespace Valve.VR.InteractionSystem
@takoyakiroom
takoyakiroom / Eraser.cs
Created February 10, 2018 05:45
消しゴム
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Eraser : MonoBehaviour {
void OnTriggerEnter(Collider other)
{
if(other.tag == "Pen")
{
Destroy(other.gameObject);
@takoyakiroom
takoyakiroom / Pen.cs
Created February 10, 2018 05:44
ペン
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using VRTK;
public class Pen : MonoBehaviour {
public float LineDistance = 0.1f; // Trackを置き直す距離
public GameObject track; // 軌跡
VRTK_InteractableObject io; // コントローラ用