-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit c6ed8c1
Showing
52 changed files
with
4,971 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# This .gitignore file should be placed at the root of your Unity project directory | ||
# | ||
# Get latest from https://github.com/github/gitignore/blob/main/Unity.gitignore | ||
# | ||
/[Ll]ibrary/ | ||
/[Tt]emp/ | ||
/[Oo]bj/ | ||
/[Bb]uild/ | ||
/[Bb]uilds/ | ||
/[Ll]ogs/ | ||
/[Uu]ser[Ss]ettings/ | ||
|
||
# MemoryCaptures can get excessive in size. | ||
# They also could contain extremely sensitive data | ||
/[Mm]emoryCaptures/ | ||
|
||
# Recordings can get excessive in size | ||
/[Rr]ecordings/ | ||
|
||
# Uncomment this line if you wish to ignore the asset store tools plugin | ||
# /[Aa]ssets/AssetStoreTools* | ||
|
||
# Autogenerated Jetbrains Rider plugin | ||
/[Aa]ssets/Plugins/Editor/JetBrains* | ||
|
||
# Visual Studio cache directory | ||
.vs/ | ||
|
||
# Gradle cache directory | ||
.gradle/ | ||
|
||
# Autogenerated VS/MD/Consulo solution and project files | ||
ExportedObj/ | ||
.consulo/ | ||
*.csproj | ||
*.unityproj | ||
*.sln | ||
*.suo | ||
*.tmp | ||
*.user | ||
*.userprefs | ||
*.pidb | ||
*.booproj | ||
*.svd | ||
*.pdb | ||
*.mdb | ||
*.opendb | ||
*.VC.db | ||
|
||
# Unity3D generated meta files | ||
*.pidb.meta | ||
*.pdb.meta | ||
*.mdb.meta | ||
|
||
# Unity3D generated file on crash reports | ||
sysinfo.txt | ||
|
||
# Builds | ||
*.apk | ||
*.aab | ||
*.unitypackage | ||
*.app | ||
|
||
# Crashlytics generated file | ||
crashlytics-build.properties | ||
|
||
# Packed Addressables | ||
/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin* | ||
|
||
# Temporary auto-generated Android Assets | ||
/[Aa]ssets/[Ss]treamingAssets/aa.meta | ||
/[Aa]ssets/[Ss]treamingAssets/aa/* | ||
|
||
# Custom Rules | ||
/[Aa]ssets/* | ||
/[Pp]ackages/com.vrchat.*/* | ||
/[Pp]rojectSettings/* | ||
Packages/vpm-manifest.json | ||
Packages/packages-lock.json | ||
Packages/manifest.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"version": "1.0", | ||
"components": [ | ||
"Microsoft.VisualStudio.Workload.ManagedGame" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
112 changes: 112 additions & 0 deletions
112
Packages/jp.sh0uroom.vrcid-gimmick/Editor/UserIDLoaderEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
using UnityEngine; | ||
using UnityEditor; | ||
using UdonSharpEditor; | ||
|
||
namespace sh0uRoom.VRCIDGimmick | ||
{ | ||
[CustomEditor(typeof(UserIDLoader))] | ||
public class UserIDLoaderEditor : Editor | ||
{ | ||
private bool isOutputText; | ||
|
||
private SerializedProperty isInputURL; | ||
private SerializedProperty targetURL; | ||
private SerializedProperty isOutputLog; | ||
private SerializedProperty textUI; | ||
private SerializedProperty userIDs; | ||
|
||
public override void OnInspectorGUI() | ||
{ | ||
if (UdonSharpGUI.DrawDefaultUdonSharpBehaviourHeader(target)) return; | ||
|
||
serializedObject.Update(); | ||
|
||
GetProperties(); | ||
ShowBaseGUI(); | ||
|
||
serializedObject.ApplyModifiedProperties(); | ||
} | ||
|
||
private void GetProperties() | ||
{ | ||
isInputURL = serializedObject.FindProperty("isInputURL"); | ||
isOutputLog = serializedObject.FindProperty("isOutputLog"); | ||
textUI = serializedObject.FindProperty("textUI"); | ||
|
||
targetURL = serializedObject.FindProperty("targetURL"); | ||
userIDs = serializedObject.FindProperty("userIDs"); | ||
} | ||
|
||
private void ShowBaseGUI() | ||
{ | ||
//URLで指定するか、手動で指定するか選択するボタン | ||
EditorGUILayout.BeginHorizontal(); | ||
{ | ||
EditorGUILayout.PrefixLabel("IDの設定方法"); | ||
if (isInputURL.boolValue) | ||
{ | ||
if (GUILayout.Button("URLから取得する")) | ||
{ | ||
isInputURL.boolValue = false; | ||
} | ||
} | ||
else | ||
{ | ||
if (GUILayout.Button("手動で指定する")) | ||
{ | ||
isInputURL.boolValue = true; | ||
} | ||
} | ||
} | ||
EditorGUILayout.EndHorizontal(); | ||
|
||
//URLから取得する場合 | ||
if (isInputURL.boolValue) | ||
{ | ||
ShowURLInputGUI(); | ||
} | ||
else | ||
{ | ||
ShowManualInputGUI(); | ||
} | ||
|
||
//Textに出力するかどうか | ||
if (isOutputText || textUI.objectReferenceValue != null) | ||
{ | ||
EditorGUILayout.BeginHorizontal(); | ||
{ | ||
EditorGUILayout.PropertyField(textUI, new GUIContent("出力先のTextMeshPro")); | ||
if (GUILayout.Button("x", GUILayout.Width(40))) | ||
{ | ||
textUI.objectReferenceValue = null; | ||
isOutputText = false; | ||
} | ||
} | ||
EditorGUILayout.EndHorizontal(); | ||
} | ||
else | ||
{ | ||
if (GUILayout.Button("IDをTextUIへ出力する")) | ||
{ | ||
isOutputText = true; | ||
} | ||
} | ||
} | ||
|
||
private void ShowURLInputGUI() | ||
{ | ||
EditorGUILayout.HelpBox("VRChatIDが記載されたテキストファイルのURLを指定して下さい\nIDはカンマ(,)区切りで複数指定できます\n取得したデータはuserIDsから参照できます", MessageType.Info, true); | ||
EditorGUILayout.PropertyField(targetURL, new GUIContent("URL")); | ||
isOutputLog.boolValue = EditorGUILayout.Toggle("取得したIDをログに出力する?", isOutputLog.boolValue); | ||
} | ||
|
||
private void ShowManualInputGUI() | ||
{ | ||
//Headerに記載してた内容を表示する | ||
EditorGUILayout.HelpBox("VRChatIDを手動で指定して下さい\n取得したデータはuserIDsから参照できます", MessageType.Info, true); | ||
|
||
//配列の要素数を指定する | ||
EditorGUILayout.PropertyField(userIDs, new GUIContent("IDリスト"), true); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Packages/jp.sh0uroom.vrcid-gimmick/Editor/UserIDLoaderEditor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
89 changes: 89 additions & 0 deletions
89
Packages/jp.sh0uroom.vrcid-gimmick/Editor/VerifyUserColliderTeleporterEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
using UnityEngine; | ||
|
||
using UnityEditor; | ||
using UdonSharpEditor; | ||
|
||
namespace sh0uRoom.VRCIDGimmick | ||
{ | ||
[CustomEditor(typeof(VerifyUserColliderTeleporter))] | ||
public class VerifyUserColliderTeleporterEditor : Editor | ||
{ | ||
private SerializedProperty targetColliders; | ||
private SerializedProperty targetBone; | ||
private SerializedProperty teleportPos; | ||
private SerializedProperty checkInterval; | ||
|
||
private SerializedProperty loader; | ||
private SerializedProperty isWhiteList; | ||
public override void OnInspectorGUI() | ||
{ | ||
if (UdonSharpGUI.DrawDefaultUdonSharpBehaviourHeader(target)) return; | ||
|
||
serializedObject.Update(); | ||
|
||
GetProperties(); | ||
ShowGUI(); | ||
|
||
serializedObject.ApplyModifiedProperties(); | ||
} | ||
|
||
private void GetProperties() | ||
{ | ||
targetColliders = serializedObject.FindProperty("targetColliders"); | ||
targetBone = serializedObject.FindProperty("targetBone"); | ||
teleportPos = serializedObject.FindProperty("teleportPos"); | ||
checkInterval = serializedObject.FindProperty("checkInterval"); | ||
|
||
loader = serializedObject.FindProperty("loader"); | ||
isWhiteList = serializedObject.FindProperty("isWhiteList"); | ||
} | ||
|
||
private void ShowGUI() | ||
{ | ||
EditorGUILayout.HelpBox("プレイヤーがCollider範囲内に接触するとテレポートします\nColliderのisTriggerにチェックをつけてください", MessageType.Info); | ||
EditorGUILayout.PropertyField(targetColliders, new GUIContent("対象Collider")); | ||
EditorGUILayout.PropertyField(teleportPos, new GUIContent("テレポート先")); | ||
|
||
if (targetColliders.arraySize == 0) | ||
{ | ||
EditorGUILayout.HelpBox("対象のコライダーが設定されていません", MessageType.Error); | ||
} | ||
else | ||
{ | ||
for (var i = 0; i < targetColliders.arraySize; i++) | ||
{ | ||
var collider = targetColliders.GetArrayElementAtIndex(i); | ||
if (collider.objectReferenceValue == null) | ||
{ | ||
EditorGUILayout.HelpBox($"[Element {i}] 対象のコライダーが設定されていません", MessageType.Error); | ||
return; | ||
} | ||
else | ||
{ | ||
var colliderObj = collider.objectReferenceValue as Collider; | ||
if (!colliderObj.isTrigger) | ||
{ | ||
EditorGUILayout.HelpBox($"[Element {i}] {colliderObj.name}のisTriggerにチェックをつけてください", MessageType.Error); | ||
return; | ||
} | ||
} | ||
} | ||
if (teleportPos.objectReferenceValue == null) | ||
{ | ||
EditorGUILayout.HelpBox("テレポート先が設定されていません", MessageType.Error); | ||
} | ||
else | ||
{ | ||
EditorGUILayout.Space(10); | ||
EditorGUILayout.PropertyField(targetBone, new GUIContent("当たり判定Bone")); | ||
EditorGUILayout.PropertyField(checkInterval, new GUIContent("判定頻度(秒)")); | ||
|
||
EditorGUILayout.Space(10); | ||
EditorGUILayout.HelpBox("UserIDLoaderを指定することで、特定のプレイヤーのみ除外することができます\nホワイトリスト化すると、IDリストに含まれているプレイヤーのみテレポートさせます", MessageType.Info); | ||
EditorGUILayout.PropertyField(loader, new GUIContent("(オプション)除外するIDリスト")); | ||
EditorGUILayout.PropertyField(isWhiteList, new GUIContent("ホワイトリスト化")); | ||
} | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Packages/jp.sh0uroom.vrcid-gimmick/Editor/VerifyUserColliderTeleporterEditor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
55 changes: 55 additions & 0 deletions
55
Packages/jp.sh0uroom.vrcid-gimmick/Editor/VerifyUserObjSwitcherEditor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using UnityEngine; | ||
|
||
using UnityEditor; | ||
using UdonSharpEditor; | ||
|
||
namespace sh0uRoom.VRCIDGimmick | ||
{ | ||
[CustomEditor(typeof(VerifyUserObjSwitcher))] | ||
public class VerifyUserObjSwitcherEditor : Editor | ||
{ | ||
private SerializedProperty loader; | ||
private SerializedProperty targetObj; | ||
private SerializedProperty isNetworking; | ||
private SerializedProperty isOnceOnly; | ||
public override void OnInspectorGUI() | ||
{ | ||
if (UdonSharpGUI.DrawDefaultUdonSharpBehaviourHeader(target)) return; | ||
|
||
serializedObject.Update(); | ||
|
||
GetProperties(); | ||
ShowGUI(); | ||
|
||
serializedObject.ApplyModifiedProperties(); | ||
} | ||
|
||
private void GetProperties() | ||
{ | ||
loader = serializedObject.FindProperty("loader"); | ||
targetObj = serializedObject.FindProperty("targetObj"); | ||
isNetworking = serializedObject.FindProperty("isNetworking"); | ||
isOnceOnly = serializedObject.FindProperty("isOnceOnly"); | ||
} | ||
|
||
private void ShowGUI() | ||
{ | ||
EditorGUILayout.HelpBox("動作にはUserIDNetLoaderが必要です", MessageType.Info); | ||
EditorGUILayout.PropertyField(loader, new GUIContent("IDリスト")); | ||
EditorGUILayout.PropertyField(targetObj, new GUIContent("対象オブジェクト")); | ||
if (loader.objectReferenceValue == null) | ||
{ | ||
EditorGUILayout.HelpBox("UserIDNetLoaderが設定されていません", MessageType.Error); | ||
} | ||
else if (targetObj.objectReferenceValue == null) | ||
{ | ||
EditorGUILayout.HelpBox("対象オブジェクトが設定されていません", MessageType.Error); | ||
} | ||
else | ||
{ | ||
EditorGUILayout.PropertyField(isOnceOnly, new GUIContent("一回だけ動作")); | ||
EditorGUILayout.PropertyField(isNetworking, new GUIContent("表示状態を同期(beta)")); | ||
} | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
Packages/jp.sh0uroom.vrcid-gimmick/Editor/VerifyUserObjSwitcherEditor.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.