Skip to content

Instantly share code, notes, and snippets.

@TORISOUP
TORISOUP / AvatarBoneNameFixer.cs
Last active September 4, 2023 14:32
アバター内に含まれている重複したGameObject名を修正するやつ
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace TORISOUP.Editor.AvatarBoneNameFixer
{
public class AvatarBoneNameFixer : EditorWindow
{
[MenuItem("GameObject/AvatarBoneNameFixer", false, 0)]
@TORISOUP
TORISOUP / 賀正!Vブレード権利表記
Created December 26, 2021 10:07
賀正!Vブレード権利表記
UniRx
The MIT License (MIT)
Copyright (c) 2018 Yoshifumi Kawai
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
private class Hoge : IDisposable
{
private readonly CompositeDisposable _compositeDisposable = new CompositeDisposable();
public void Initialize()
{
Observable.EveryUpdate()
.Subscribe()
.AddTo(_compositeDisposable);
}
@TORISOUP
TORISOUP / VRChat Log
Created June 25, 2020 05:09
Client side
2020.06.25 01:11:57 Log - [NetworkManager] OnMasterClientSwitched
2020.06.25 01:11:57 Log - [NetworkManager] OnPlayerLeftRoom
2020.06.25 01:11:57 Log - [NetworkManager] OnPlayerLeft TORISOUP
@TORISOUP
TORISOUP / VRChat Log
Created June 25, 2020 05:07
A log that occurred immediately after the Master leaves the site.
2020.06.25 01:11:57 Log - [VRCFlowManagerVRC] Resetting game flow because "Destination world set": [SkipLogin]
2020.06.25 01:11:57 Log - [RoomManager] Clearing Room Metadata
2020.06.25 01:11:57 Log - [VRCFlowManagerVRC] waiting for UI Manager
using System;
namespace TORISOUP.Samples
{
public interface IResult<L, R>
{
bool IsSuccess { get; }
bool IsFailure { get; }
@TORISOUP
TORISOUP / ComponentRemover.cs
Last active March 1, 2020 12:08
Unity プロジェクトビューで選択中のGameObject以下の自前のComponentを全部消すやつ
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
namespace ComponentRemover.Editor
{
public class ComponentRemover : EditorWindow
{
static ComponentRemover window;
using System;
using System.Collections.Generic;
using UniRx;
using UnityEngine;
namespace BirdStrike.Vista.UI.TitleScene.Model
{
public class MainMenuManager : MonoBehaviour
{
private Subject<ActionCommand[]> _commandSubject = new Subject<ActionCommand[]>();
@TORISOUP
TORISOUP / FloatToShort.cs
Last active August 25, 2019 18:51
C# Float(32bit) to Short(16bit)
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace SerializeFloat
{
public static class FloatConverterExt
{
public static short ToShort(this float value)
{
@TORISOUP
TORISOUP / Expire.cs
Created June 5, 2017 16:03
Expire operator publishes default value after a certain time since published
public class ExpireSample : MonoBehaviour
{
[SerializeField]
private Button button;
void Start()
{
//When this button click, publish "true".
//and after 3 seconds, publish "false".