Skip to content

Instantly share code, notes, and snippets.

View negipoyoc's full-sized avatar

Negishi Takumi negipoyoc

View GitHub Profile
@negipoyoc
negipoyoc / FastImageLoader.cs
Last active June 10, 2018 15:15
Unity と NativePluginの連携について
using UnityEngine;
using System.Collections;
using System;
using System.Runtime.InteropServices;
public class FastImageLoader : MonoBehaviour
{
[DllImport("plugin1")]
private static extern IntPtr setTexturePtr(IntPtr texturePointer);
[DllImport("plugin1")]
@negipoyoc
negipoyoc / ScreenShot.cs
Last active October 1, 2023 08:44
これを適当なGameObjectに貼り付けることで、Shift+Sで通常撮影(透明度ナシ)、Shift+Gで透明度あり撮影を行うことができます。
using System;
using System.Collections;
using System.IO;
using UnityEngine;
namespace Negipoyoc.SS
{
public class ScreenShot : MonoBehaviour
{
void Update()
@negipoyoc
negipoyoc / SwitchControllerMapping.cs
Created October 16, 2018 15:05
Switchコントローラーを自分の環境で使うときに調べたマッピング
using UnityEngine;
public class SwitchControllerMapping : MonoBehaviour {
void Update () {
// Joy-Con(R)
var rh = Input.GetAxis("R_Horizontal");
var rv = Input.GetAxis("R_Vertical");
@negipoyoc
negipoyoc / Swing.cs
Created December 16, 2018 02:45
モデルを左右に揺らすだけのスクリプト
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Swing : MonoBehaviour
{
public float speed = 200;
public float range = 0.1f;
void Update()
{
key ja en cn
First_NewRelease_Label 新バージョンのLuppetがリリースされています A new version of Luppet has been released.
First_NewRelease_Get 最新版へ Download
First_NewRelease_UseAsIt このまま使う Dismiss
First_CheckTerms_Label_Left Luppetの Updated
First_CheckTerms_Label_Center 利用規約 Terms
First_CheckTerms_Label_Right が更新されています。 of Luppet. Please Check.
First_CheckTerms_Check 利用規約を確認しました。 Confirmed.
First_CheckTerms_StartApp アプリを開始する Start Luppet
@negipoyoc
negipoyoc / RollCamera.cs
Last active March 12, 2023 00:51
AI学習用データの作成向けに、1つのポーズに対して複数の角度から撮影するためのスクリプト
using System.Collections;
using System.IO;
using Negipoyoc.SS;
using UnityEngine;
/// <summary>
/// ポーズそれぞれに対して分割数を指定して撮影するスクリプト
/// </summary>
public class RollCamera : MonoBehaviour
{
@negipoyoc
negipoyoc / ChatGptCodeReviewerWindow.cs
Created March 23, 2023 12:18
ChatGPTに自分のコードのパフォーマンス改善やテストコードの生成などをお願いするUnity Editor拡張です。
using System;
using System.Collections.Generic;
using System.Text;
using Cysharp.Threading.Tasks;
using UnityEditor;
using UnityEngine;
using UnityEngine.Networking;
using Object = UnityEngine.Object;
namespace LuppetEditor