Skip to content

Instantly share code, notes, and snippets.

View nekomimi-daimao's full-sized avatar

nekomimi-daimao nekomimi-daimao

View GitHub Profile
@nekomimi-daimao
nekomimi-daimao / RER.cs
Last active February 12, 2019 13:55
PUN2のRaiseEventのラッパー.
using System;
using ExitGames.Client.Photon;
using Photon.Pun;
using Photon.Realtime;
using UnityEngine;
/// <summary>
/// RaiseEventのラッパー.
///
using System;
using System.Threading.Tasks;
using PolyToolkit;
using UnityEngine;
namespace NekomimiDaimao.Poly
{
public static class PolyTasker
{
public static Task<PolyListAssetsResult> SearchListAssetsAsync(PolyListAssetsRequest assetsRequest)
using System.Collections.Generic;
using System.Text;
using UnityEngine;
using UnityEngine.UI;
namespace NekomimiDaimao
{
/// https://gist.github.com/nekomimi-daimao/48938c1de1e91550a34984cdfc03b702
public class XRLogger : MonoBehaviour
{
@nekomimi-daimao
nekomimi-daimao / TextFileWriter.cs
Last active December 8, 2021 03:03
Unity, write text file.
using System;
using System.IO;
using System.Text;
namespace NekomimiDaimao
{
/// https://gist.github.com/nekomimi-daimao/ee205e6d3949aa672913474107f542d1
public class TextFileWriter : IDisposable
{
private readonly StreamWriter _streamWriter;
@nekomimi-daimao
nekomimi-daimao / WhoStopsUI.cs
Created May 22, 2019 18:02
check => heavy method stops ui
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.UI;
public class WhoStopsUI : MonoBehaviour
{
private void Suspect()
{
// something heavy...
}
@nekomimi-daimao
nekomimi-daimao / MicRecorder.cs
Last active July 20, 2020 12:04
Unity, recording mic Sequentially
using System;
using System.Collections;
using System.IO;
using UnityEngine;
namespace NekomimiDaimao
{
/// https://gist.github.com/nekomimi-daimao/a14301d7008d0a1c7e55977d6d9e2cc1
public class MicRecorder : MonoBehaviour
{
@nekomimi-daimao
nekomimi-daimao / PrimitiveCreator.cs
Last active July 16, 2019 22:24
Unity, Create Primitive Object
using System.Collections.Generic;
using UnityEngine;
namespace NekomimiDaimao
{
public class PrimitiveCreator
{
private const float DefaultScale = 0.2f;
private readonly PrimitiveType _type;
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using MQTTnet;
using MQTTnet.Client.Receiving;
using MQTTnet.Server;
@nekomimi-daimao
nekomimi-daimao / lib.rs
Created November 28, 2019 21:12
Unity Rust multiply_point
fn multiple_float(a: f32, b: f32) -> f64 {
((a as f64) * (b as f64))
}
#[no_mangle]
pub extern fn multiply_point(m: Matrix4x4, v: Vector3) -> Vector3 {
let x = multiple_float(m.m00, v.x) + multiple_float(m.m01, v.y) + multiple_float(m.m02, v.z) + m.m03 as f64;
let y = multiple_float(m.m10, v.x) + multiple_float(m.m11, v.y) + multiple_float(m.m12, v.z) + m.m13 as f64;
let z = multiple_float(m.m20, v.x) + multiple_float(m.m21, v.y) + multiple_float(m.m22, v.z) + m.m23 as f64;
let a = multiple_float(m.m30, v.x) + multiple_float(m.m31, v.y) + multiple_float(m.m32, v.z) + m.m33 as f64;
@nekomimi-daimao
nekomimi-daimao / CommitHashGenerator.cs
Last active March 8, 2021 07:25
Unity, auto generate Commit hash
using System;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEngine;