Programming in VRChat

VRChat でのプログラミングについて調べたことの書き溜め

Client Starter

This Unity editor extension starts VRChat client automatically after world publishing is completed. You can go directly into published world and start to test it.

in Japanese: このエディタ拡張は、ワールドのアップロード(publish)が完了すると自動的に VRChat クライアントを起動します。 アップロードされたワールドに直ぐに入りテストを開始できます。


README (English)

This Unity editor extension starts VRChat client automatically after world publishing is completed. You can go directly into published world and start to test it.

Motivation

In some means, this is similar to local test that is one of a VRChat SDK feature. I can't completely trust with local test. I also do tests in ordinary client. And selecting my world from quick menu operation is a pain. So I made this tool.

How to use

  • Install unitypackage. That's all.
    • When Publishing world process is completed, VRChat client starts automatically.
    • By default, it runs on desktop mode.
  • If you want change setup, open setting window via Unity menu Window > VRC_Iwsd > Client Starter
  • Setup window also serves other features. For example
    • Open world manage page at vrchat.com
    • Open another world specified by world ID

features detail

Simple UI mode features detail

simple UI mode sample

  • Start After Publish checkbox
    • If on, this tool starts VRChat client automatically after publish process completed.
    • This works even if setting window isn't opened. Once set up, you can close it.
    • This tool close "Content Successfully Uploaded! / Manage World in Browser" window showed by VRChat SDK.
      • internally, the appearance of this window is a trigger to start client.
      • If you need to use this window, turn off this Start After Publish option.
  • Access selection
    • Select access level from invite, invite+ ...
  • Start Published World button
    • If on, starts VRChat client manually
    • Non public Access selection requires being logged in. If not, open VRChat SDK Setting window.
  • Open Manage Page button
    • Open world management page at vrchat.com
  • Advanced checkbox
    • Show advanced settings and features.

Advanced UI mode features detail

advanced UI mode sample

  • World ID (read only) field
    • Automatically filled with editing scene's ID after some operation
    • You can copy this string to clip board
  • Copy Launch Link button
    • Copy launch link (a URI formatted vrchat://...) string of the world to clip board.
  • Start another world section
    • This section treats a world selected by what you manually type in ID field.
    • Used to refer to a different world than the one being edited for comparison or so on
  • World ID field
    • Type world ID to select.
    • "world ID" is a string formatted like wrld_b51f016d-1073-4c75-930d-9f44222c7fc3
    • accepts extra characters. It will be just ignored.
      • For example, you can input shared link itself formatted like https://vrchat.com/home/launch?worldId=wrld_b51f016d-1073-4c75-930d-9f44222c7fc3 You need not to delete heading part.
  • Use SDK's 'Client Path' checkbox
    • On: Use a program specified Installed Client Path to start.
      • It is in VRChat SDK Setting window. You can change it Edit button in it.
      • If you installed Occurs client only (in other words, you don't have Steam version) and you don't setup specific path to Installed Client Path (in other words, leave it as default), it will fail to start.
        • This is because I don't have information that I need to write codes handling this case.
        • Workaround: set Installed Client Path where VRChat.exe is
    • Off: Open launch link (vrchat://...) to start
      • By default, Windows runs {VRChat installed folder}/launch.bat and it runs VRChat.exe
  • Desktop mode checkbox
    • Start VRChat in desktop mode if on.
    • This option is available only when Use SDK's 'Client Path' is on.

Acknowledgments

Thanks VRCPrefabs and iwashi farm people for testing and suggestions.

License and misc.


README (日本語)

このエディタ拡張は、ワールドのアップロード(publish)が完了すると自動的に VRChat クライアントを起動します。 アップロードされたワールドに直ぐに入りテストを開始できます。

作成背景

これはある意味で、VRChat SDK の機能であるローカルテストと同じではある。 ローカルテストは信用ならない場合があり、通常のクライアントでのテストも必要。 そしてクイックメニューからワールドを選択するのは苦痛。というわけでこれを作りました。

使い方

  • Unity パッケージをインストールする。それだけ。
    • ワールドのアップロード処理が完了すると、VRChat クライアントが自動的に起動する
    • 初期状態では、デスクトップモードで起動する
  • 設定を変更したい場合は、Unity メニュー Window > VRC_Iwsd > Client Starter から設定画面を開く
  • 設定画面は他の機能も提供している。例えば:
    • vrchat.com のにあるワールド管理ページを開く
    • ワールド ID で指定された他のワールドを開く

機能詳細

簡易UIモードでの機能詳細

simple UI mode sample

  • Start After Publish チェックボックス
    • 有効の場合、ワールドのアップロード(publish)処理が完了すると自動的に VRChat クライアントを起動する
    • 設定画面を開いていなくても動作する。設定が終わった後は閉じて良い。
    • VRChat SDK が表示する "Content Successfully Uploaded! / Manage World in Browser" のウィンドウをこのツールは閉じる
      • 内部的にはこのウィンドウの出現がクライアントを開始するトリガーになっている
      • このウィンドウを使いたい時は、この Start After Publish 設定を無効にする
  • Access 選択
    • invite, invite+ などのアクセスレベルを選択する
  • Start Published World ボタン
    • 手動でVRChat クライアントを開始する
    • Access 選択で public 以外を選んだ場合はログインしていることが必要。していない場合は VRChat SDK の Setting ウィンドウを開く
  • Open Manage Page ボタン
    • vrchat.com のにあるワールド管理ページを開く
  • Advanced チェックボックス
    • 詳細UIモードを有効にする

詳細UIモードでの機能詳細

advanced UI mode sample

  • World ID (read only)
    • 何か操作すると現在編集中のワールドの ID が自動的に表示される。編集は出来ない
    • コピー可能
  • Copy Launch Link ボタン
  • Start another world セクション
    • ID 欄に手で入力したワールドを取り扱う
    • 編集中とは別のワールドを比較のために参照したりするのに使う
  • World ID
    • ワールドを選択するために world ID を入力する
    • 「world ID」とは次のような形式の文字列である wrld_b51f016d-1073-4c75-930d-9f44222c7fc3
    • 余分な文字があっても許容する。それらは単に無視される。
      • 例えば、次のような形式の shared link そのものを入力できる https://vrchat.com/home/launch?worldId=wrld_b51f016d-1073-4c75-930d-9f44222c7fc3 余分な先頭部分を取り除く必要はない
  • Use SDK's 'Client Path' チェックボックス
    • 有効の場合: Installed Client Path で指定されるプログラムを使って開始する
      • これは VRChat SDK の Setting ウィンドウにあるもので、そこの Edit ボタンで変更できる。
      • もし Occurs クライアントしかインストールしていなくて(つまり Steam 版を入れてなくて) Installed Client Path にパスを指定していない(つまりデフォルトのままにしている)場合、 おそらく起動に失敗する。
        • この事態を取り扱うプログラムを書くための情報不足のため
        • 回避策:Installed Client Path に VRChat.exe がある場所を指定する
    • 無効の場合: launch link (vrchat://...) を開く
      • デフォルトでは、Windows{VRChat がインストールされているフォルダ}/launch.bat を走らせ、それが VRChat.exe を走らせる
  • Desktop mode チェックボックス
    • 有効の場合、VRChat をデスクトップモードで実行する
    • この選択は Use SDK's 'Client Path' が有効である場合にのみ機能する

謝辞

Thanks VRCPrefabs and iwashi farm people for testing and suggestions.

ライセンスなど