Skip to content

Instantly share code, notes, and snippets.

@ureishi
ureishi / yttl-v1.txt
Last active March 25, 2024 11:36
yttl-data
://youtube.com
:author
"videoDetails":
"author":
" "
:title
"videoDetails":
"title":
" "
:viewCount
@ureishi
ureishi / gist:556ad353f0acb7d307c509f284140b9d
Created May 25, 2023 09:18
U#でUnityEngine.Rendering.DefaultReflectionModeを扱ったときのコンパイルエラー
TypeResolverException: Type referenced by 'UnityEngineRenderingDefaultReflectionMode' could not be resolved.
VRC.Udon.UAssembly.Assembler.UAssemblyAssembler.CreateUninitializedDataVariable (System.String dataVariableName, System.String typeString) (at <fa1045dbc4ba4fab8d458989eb4c327c>:0)
VRC.Udon.UAssembly.Assembler.UAssemblyAssembler.VisitDataDeclarationStmt (VRC.Udon.UAssembly.Parser.Stmt+DataDeclaration stmt) (at <fa1045dbc4ba4fab8d458989eb4c327c>:0)
VRC.Udon.UAssembly.Parser.Stmt+DataDeclaration.Accept (VRC.Udon.UAssembly.Parser.Stmt+IVisitor visitor) (at <fa1045dbc4ba4fab8d458989eb4c327c>:0)
VRC.Udon.UAssembly.Assembler.UAssemblyAssembler.VisitBlockStmt (VRC.Udon.UAssembly.Parser.Stmt+Block stmt) (at <fa1045dbc4ba4fab8d458989eb4c327c>:0)
VRC.Udon.UAssembly.Parser.Stmt+Block.Accept (VRC.Udon.UAssembly.Parser.Stmt+IVisitor visitor) (at <fa1045dbc4ba4fab8d458989eb4c327c>:0)
VRC.Udon.UAssembly.Assembler.UAssemblyAssembler.Process (VRC.Udon.UAssembly.Parser.Stmt statement) (at <fa1045dbc4ba4fab8d458989eb4c32
[UdonSharp] System.ArgumentNullException: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2[TKey,TValue].FindEntry (TKey key) [0x00008] in <eae584ce26bc40229c1b1aa476bfa589>:0
at System.Collections.Generic.Dictionary`2[TKey,TValue].TryGetValue (TKey key, TValue& value) [0x00000] in <eae584ce26bc40229c1b1aa476bfa589>:0
at UdonSharp.Serialization.UdonVariableStorageInterface.GetElementType (System.String elementKey) [0x00012] in PROJETT_DIRECTORY\Packages\com.vrchat.udonsharp\Editor\Serialization\StorageInterfaces\UdonVariableStorageInterface.cs:111
at UdonSharp.Serialization.UdonVariableStorageInterface.GetElementStorage (System.String elementKey) [0x00001] in PROJETT_DIRECTORY\Packages\com.vrchat.udonsharp\Editor\Serialization\StorageInterfaces\UdonVariableStorageInterface.cs:135
at UdonSharp.Serialization.UdonSharpBehaviourFormatterEmitter+EmittedFormatter`1+UdonSharpBehaviourFormatterManager[T].GetHeapData (VRC.Udon.UdonBehaviour udonBehaviour) [0x0007e] in P
public class SyncString : UdonSharpBehaviour
{
[SerializeField]
private Text textUI;
[SerializeField]
private string text = string.Empty;
[UdonSynced]
private string sendString = string.Empty;
mklink /j "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\###PROJECT_NAME###\Assets\VRChat Examples" "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\CommonAssets\Assets\VRChat Examples"
mklink /j "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\###PROJECT_NAME###\Assets\VRCSDK" "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\CommonAssets\Assets\VRCSDK"
mklink /j "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\###PROJECT_NAME###\Assets\Udon" "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\CommonAssets\Assets\Udon"
mklink /j "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\###PROJECT_NAME###\Assets\UdonSharp" "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\CommonAssets\Assets\UdonSharp"
md "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\###PROJECT_NAME###\Assets\Gizmos" #
mklink /j "D:\Users\%USERNAME%\Documents\Unity\#UnityProjects\###PROJECT_NAME###\Assets\Gizmos\UdonSharp" "D:\Users\%USERNAME%\Documents\Un
@ureishi
ureishi / Monogusa.cs
Last active December 22, 2020 08:15
Monogusaクラスに定義したpublicメソッドをInspector上のボタンで実行できるようになります。ちょっとした作業などに。
#region Monogusa Requires
using System.Reflection;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
#endregion
using System;
@ureishi
ureishi / VRChatLog.ps1
Last active March 10, 2021 12:12
VRCのログからプレーヤのJoin, Leaveを抜き出す[PowerShell]
Select-String -Path "${Env:LOCALAPPDATA}Low\VRChat\VRChat\*.txt" -Pattern "\[Behaviour\] OnPlayer(Joined|Left) "
@ureishi
ureishi / SwitchObjectToggleGlobal.cs
Last active March 19, 2023 08:52
UdonSyncを使わずにGameObjectをOnOffする
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon.Common.Interfaces;
namespace ureishi.Gist
{
public class SwitchObjectToggleGlobal : UdonSharpBehaviour
{
// 初期状態でActiveなオブジェクトはactiveObjectsに
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
namespace ureishi.Gist
{
public class DummyPlug : UdonSharpBehaviour
{
[Header("Settings")]
[SerializeField]
@ureishi
ureishi / GetCanvasSize.cs
Last active March 10, 2021 13:07
U#でスクリーンサイズを取得する関数(Screen関数が扱えないため) @Solphy_A
Vector2 GetScreenSize(RectTransform rectTransform)
{
// Screen Space - Overlay Canvas
return new Vector2(
rectTransform.rect.width / (Networking.LocalPlayer.IsUserInVR() ? 2 : 1),
rectTransform.rect.height);
}