Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion content/docs/scripting/meta.nl.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "title": "Scripting", "icon": "Code", "pages": ["index", "scripting", "osc"] }
{ "title": "Scripting", "icon": "FolderOpen", "pages": ["index", "scripting", "osc"] }
41 changes: 41 additions & 0 deletions content/docs/scripting/osc.cn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ Basis 为需要接收 OSC 消息、订阅实时地址范围,或将数值重新
在 prop、avatar 和场景中的创作者 OSC 工作流里使用 `BasisOsc`。bridge 会将活动订阅和已发布的值反映到 OSC Query,而数值型已发布值也可以更新 Vixxy avatar 菜单变量。
</Callout>

## 内置端点

Basis 也暴露了一小组运行时 OSC 端点,它们位于创作者脚本 `BasisOsc` 作用域之外。这些路径都是绝对路径,并且当 OSC bridge 运行时会显示在 OSC Query 中。

### ChatBox 输入

`/chatbox/input` 允许外部 OSC 客户端驱动 Basis 聊天输入。

你可以发送聊天消息,或者用预填文本打开聊天输入框:

```text title="聊天输入"
/chatbox/input string message, optional bool shouldOpenKeyboard=false, optional bool playNotificationSound=false
```

- `message` 会在经过 Basis 聊天净化后发送。
- `shouldOpenKeyboard` 为 `true` 时,会用 `message` 打开 Basis 聊天输入框;否则会直接发送消息。
- `playNotificationSound` 控制外发聊天通知标志。

你也可以只发送本地玩家的临时输入状态:

```text title="输入状态"
/chatbox/input bool typing
```

出于 OSC 客户端兼容性考虑,字符串形式也接受字符串以及最多两个布尔参数,顺序不限。第一个布尔值映射到 `shouldOpenKeyboard`,第二个映射到 `playNotificationSound`。

空签名或无效签名会被忽略。无效签名会针对每种唯一参数签名记录一次日志。

<Callout type="info">
`/chatbox/input` 不在 `/avatar/parameters` 作用域下。请订阅或发送到绝对路径 `/chatbox/input`。
</Callout>

## 设置

1. 将 `BasisOsc` 组件添加到与脚本相同的 GameObject 上,或者添加到你可以引用的附近对象上。调用 `GetComponent<BasisOsc>()` 时,Cilbox 可以自动添加这个 shim。
Expand Down Expand Up @@ -46,6 +78,15 @@ public class OscConsumer : MonoBehaviour
Debug.LogError("OscConsumer requires a BasisOsc component.");
}
}

private void OnDestroy()
{
if (osc != null)
{
osc.ClearSubscriptions();
osc = null;
}
}
}
```

Expand Down
41 changes: 41 additions & 0 deletions content/docs/scripting/osc.de.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ Die Komponente ist scope-bewusst. Dieselbe relative Adresse kann sich unterschie
Verwenden Sie `BasisOsc` für Creator-OSC-Workflows in Props, Avataren und Szenen. Die Bridge spiegelt aktive Abonnements und veröffentlichte Werte in OSC Query, und numerisch veröffentlichte Werte können auch Vixxy-Avatar-Menüvariablen aktualisieren.
</Callout>

## Integrierte Endpunkte

Basis stellt außerdem eine kleine Menge an runtimeweiten OSC-Endpunkten außerhalb der `BasisOsc`-Scopes von Creator-Skripten bereit. Diese Pfade sind absolut und in OSC Query sichtbar, wenn die OSC-Bridge läuft.

### ChatBox-Eingabe

`/chatbox/input` erlaubt es einem externen OSC-Client, die Basis-Chat-Eingabe zu steuern.

Senden Sie eine Chat-Nachricht oder öffnen Sie den Chat-Composer mit vorausgefülltem Text:

```text title="Chat-Eingabe"
/chatbox/input string message, optional bool shouldOpenKeyboard=false, optional bool playNotificationSound=false
```

- `message` wird nach der Basis-Chat-Bereinigung gesendet.
- `shouldOpenKeyboard` öffnet den Basis-Chat-Composer mit `message`, wenn der Wert `true` ist; andernfalls wird die Nachricht gesendet.
- `playNotificationSound` steuert das ausgehende Chat-Benachrichtigungs-Flag.

Senden Sie nur den flüchtigen Schreibstatus des lokalen Spielers:

```text title="Schreibstatus"
/chatbox/input bool typing
```

Die String-Form akzeptiert aus Kompatibilitätsgründen auch die Zeichenkette und bis zu zwei boolesche Argumente in beliebiger Reihenfolge. Das erste boolesche Argument wird `shouldOpenKeyboard` zugeordnet, das zweite `playNotificationSound`.

Leere oder ungültige Signaturen werden ignoriert. Ungültige Signaturen werden einmal pro eindeutiger Argumentsignatur protokolliert.

<Callout type="info">
`/chatbox/input` liegt nicht im Scope von `/avatar/parameters`. Abonnieren oder senden Sie an den absoluten Pfad `/chatbox/input`.
</Callout>

## Einrichtung

1. Fügen Sie Ihrem Skript einen `BasisOsc`-Komponenten auf demselben GameObject hinzu oder auf einem nahegelegenen Objekt, auf das Sie verweisen können. Cilbox kann den Shim automatisch hinzufügen, wenn Sie `GetComponent<BasisOsc>()` aufrufen.
Expand Down Expand Up @@ -46,6 +78,15 @@ public class OscConsumer : MonoBehaviour
Debug.LogError("OscConsumer requires a BasisOsc component.");
}
}

private void OnDestroy()
{
if (osc != null)
{
osc.ClearSubscriptions();
osc = null;
}
}
}
```

Expand Down
41 changes: 41 additions & 0 deletions content/docs/scripting/osc.es.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ El componente es consciente del scope. La misma dirección relativa puede resolv
Use `BasisOsc` para flujos OSC orientados a creadores dentro de props, avatares y escenas. El puente refleja suscripciones activas y valores publicados en OSC Query, y los valores numéricos publicados también pueden actualizar variables de menú de avatar Vixxy.
</Callout>

## Endpoints integrados

Basis también expone un pequeño conjunto de endpoints OSC del runtime fuera de los scopes `BasisOsc` de los scripts de creadores. Estas rutas son absolutas y se muestran en OSC Query cuando el puente OSC está en ejecución.

### Entrada de ChatBox

`/chatbox/input` permite que un cliente OSC externo controle la entrada de chat de Basis.

Envíe un mensaje de chat o abra el compositor de chat con texto precargado:

```text title="Entrada de chat"
/chatbox/input string message, optional bool shouldOpenKeyboard=false, optional bool playNotificationSound=false
```

- `message` se envía después del saneamiento de chat de Basis.
- `shouldOpenKeyboard` abre el compositor de chat de Basis con `message` cuando es `true`; de lo contrario, se envía el mensaje.
- `playNotificationSound` controla el indicador de notificación de chat saliente.

Envíe solo el estado transitorio de escritura del jugador local:

```text title="Estado de escritura"
/chatbox/input bool typing
```

La forma de cadena también acepta la cadena y hasta dos argumentos booleanos en cualquier orden por compatibilidad con clientes OSC. El primer booleano se asigna a `shouldOpenKeyboard`; el segundo a `playNotificationSound`.

Las firmas vacías o inválidas se ignoran. Las firmas inválidas se registran una vez por cada firma de argumento única.

<Callout type="info">
`/chatbox/input` no está dentro del scope de `/avatar/parameters`. Suscríbase o envíe a la ruta absoluta `/chatbox/input`.
</Callout>

## Configuración

1. Añada un componente `BasisOsc` al mismo GameObject que su script, o a un objeto cercano que pueda referenciar. Cilbox puede agregar el shim automáticamente cuando llama a `GetComponent<BasisOsc>()`.
Expand Down Expand Up @@ -46,6 +78,15 @@ public class OscConsumer : MonoBehaviour
Debug.LogError("OscConsumer requires a BasisOsc component.");
}
}

private void OnDestroy()
{
if (osc != null)
{
osc.ClearSubscriptions();
osc = null;
}
}
}
```

Expand Down
41 changes: 41 additions & 0 deletions content/docs/scripting/osc.fr.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ Le composant tient compte du scope. La même adresse relative peut se résoudre
Utilisez `BasisOsc` pour les flux OSC destinés aux créateurs dans les props, avatars et scènes. Le pont reflète les abonnements actifs et les valeurs publiées dans OSC Query, et les valeurs numériques publiées peuvent aussi mettre à jour les variables de menu d'avatar Vixxy.
</Callout>

## Points de terminaison intégrés

Basis expose aussi un petit ensemble de points de terminaison OSC du runtime en dehors des scopes `BasisOsc` des scripts créateurs. Ces chemins sont absolus et visibles dans OSC Query lorsque le pont OSC est actif.

### Entrée ChatBox

`/chatbox/input` permet à un client OSC externe de piloter l'entrée de chat Basis.

Envoyez un message de chat, ou ouvrez le compositeur de chat avec un texte prérempli :

```text title="Entrée du chat"
/chatbox/input string message, optional bool shouldOpenKeyboard=false, optional bool playNotificationSound=false
```

- `message` est envoyé après la sanitation du chat Basis.
- `shouldOpenKeyboard` ouvre le compositeur de chat Basis avec `message` lorsqu'il vaut `true` ; sinon, le message est envoyé.
- `playNotificationSound` contrôle l'indicateur de notification de chat sortant.

Envoyez uniquement l'état transitoire de saisie du joueur local :

```text title="État de saisie"
/chatbox/input bool typing
```

La forme chaîne accepte aussi la chaîne et jusqu'à deux arguments booléens dans n'importe quel ordre pour la compatibilité avec les clients OSC. Le premier booléen correspond à `shouldOpenKeyboard` ; le second correspond à `playNotificationSound`.

Les signatures vides ou invalides sont ignorées. Les signatures invalides sont journalisées une fois par signature d'argument unique.

<Callout type="info">
`/chatbox/input` n'est pas scoped sous `/avatar/parameters`. Abonnez-vous ou envoyez vers le chemin absolu `/chatbox/input`.
</Callout>

## Configuration

1. Ajoutez un composant `BasisOsc` sur le même GameObject que votre script, ou sur un objet voisin que vous pouvez référencer. Cilbox peut ajouter le shim automatiquement lorsque vous appelez `GetComponent<BasisOsc>()`.
Expand Down Expand Up @@ -46,6 +78,15 @@ public class OscConsumer : MonoBehaviour
Debug.LogError("OscConsumer requires a BasisOsc component.");
}
}

private void OnDestroy()
{
if (osc != null)
{
osc.ClearSubscriptions();
osc = null;
}
}
}
```

Expand Down
41 changes: 41 additions & 0 deletions content/docs/scripting/osc.it.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ Il componente è scope-aware. Lo stesso indirizzo relativo può risolversi in mo
Usa `BasisOsc` per i flussi OSC rivolti ai creator dentro prop, avatar e scene. Il bridge riflette le iscrizioni attive e i valori pubblicati in OSC Query, e i valori numerici pubblicati possono anche aggiornare le variabili del menu avatar Vixxy.
</Callout>

## Endpoint integrati

Basis espone anche un piccolo insieme di endpoint OSC di runtime al di fuori degli scope `BasisOsc` degli script creator. Questi percorsi sono assoluti e visibili in OSC Query quando il bridge OSC è in esecuzione.

### Input ChatBox

`/chatbox/input` consente a un client OSC esterno di pilotare l'input della chat di Basis.

Invia un messaggio di chat oppure apri il compositore della chat con testo precompilato:

```text title="Input chat"
/chatbox/input string message, optional bool shouldOpenKeyboard=false, optional bool playNotificationSound=false
```

- `message` viene inviato dopo la sanitizzazione della chat Basis.
- `shouldOpenKeyboard` apre il compositore della chat Basis con `message` quando vale `true`; altrimenti il messaggio viene inviato.
- `playNotificationSound` controlla il flag di notifica chat in uscita.

Invia solo lo stato transitorio di digitazione del giocatore locale:

```text title="Stato di digitazione"
/chatbox/input bool typing
```

La forma stringa accetta anche la stringa e fino a due argomenti booleani in qualsiasi ordine per compatibilità con i client OSC. Il primo booleano corrisponde a `shouldOpenKeyboard`; il secondo corrisponde a `playNotificationSound`.

Le firme vuote o non valide vengono ignorate. Le firme non valide vengono registrate una volta per ogni firma di argomento univoca.

<Callout type="info">
`/chatbox/input` non è sotto lo scope di `/avatar/parameters`. Iscriviti o invia al percorso assoluto `/chatbox/input`.
</Callout>

## Configurazione

1. Aggiungi un componente `BasisOsc` allo stesso GameObject del tuo script, oppure a un oggetto vicino che puoi referenziare. Cilbox può aggiungere automaticamente lo shim quando chiami `GetComponent<BasisOsc>()`.
Expand Down Expand Up @@ -46,6 +78,15 @@ public class OscConsumer : MonoBehaviour
Debug.LogError("OscConsumer requires a BasisOsc component.");
}
}

private void OnDestroy()
{
if (osc != null)
{
osc.ClearSubscriptions();
osc = null;
}
}
}
```

Expand Down
41 changes: 41 additions & 0 deletions content/docs/scripting/osc.ja.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ Basis には、OSC メッセージを受信したり、ライブのアドレス
プロップ、アバター、シーン内のクリエイター向け OSC ワークフローには `BasisOsc` を使ってください。ブリッジはアクティブな購読と公開された値を OSC Query に反映し、数値として公開された値は Vixxy のアバターメニュー変数も更新できます。
</Callout>

## 組み込みエンドポイント

Basis は、クリエイタースクリプトの `BasisOsc` スコープ外でも使える少数のランタイム OSC エンドポイントを公開しています。これらのパスは絶対パスであり、OSC ブリッジが動作しているときは OSC Query から確認できます。

### ChatBox 入力

`/chatbox/input` を使うと、外部 OSC クライアントから Basis のチャット入力を操作できます。

チャットメッセージを送信するか、あらかじめテキストが入った状態でチャットコンポーザーを開きます。

```text title="チャット入力"
/chatbox/input string message, optional bool shouldOpenKeyboard=false, optional bool playNotificationSound=false
```

- `message` は Basis のチャットサニタイズ後に送信されます。
- `shouldOpenKeyboard` が `true` のときは `message` を入れた状態で Basis チャットコンポーザーを開き、それ以外ではメッセージを送信します。
- `playNotificationSound` は送信チャット通知フラグを制御します。

ローカルプレイヤーの一時的な入力中状態だけを送信することもできます。

```text title="入力中状態"
/chatbox/input bool typing
```

OSC クライアント互換性のため、文字列形式では文字列に加えて最大 2 つのブール引数を任意の順序で受け付けます。最初のブール値は `shouldOpenKeyboard`、2 番目は `playNotificationSound` に対応します。

空または無効なシグネチャは無視されます。無効なシグネチャは、引数シグネチャごとに一度だけログ出力されます。

<Callout type="info">
`/chatbox/input` は `/avatar/parameters` のスコープ下ではありません。購読や送信には絶対パス `/chatbox/input` を使ってください。
</Callout>

## セットアップ

1. スクリプトと同じ GameObject に `BasisOsc` コンポーネントを追加するか、参照可能な近くのオブジェクトに追加します。`GetComponent<BasisOsc>()` を呼ぶと、Cilbox がシムを自動追加できます。
Expand Down Expand Up @@ -46,6 +78,15 @@ public class OscConsumer : MonoBehaviour
Debug.LogError("OscConsumer requires a BasisOsc component.");
}
}

private void OnDestroy()
{
if (osc != null)
{
osc.ClearSubscriptions();
osc = null;
}
}
}
```

Expand Down
41 changes: 41 additions & 0 deletions content/docs/scripting/osc.ko.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,38 @@ Basis에는 OSC 메시지를 수신하고, 실시간 주소 범위에 구독하
prop, avatar, scene 내부의 크리에이터용 OSC 워크플로에는 `BasisOsc`를 사용하세요. 브리지는 활성 구독과 게시된 값을 OSC Query에 반영하며, 숫자 값으로 게시된 내용은 Vixxy 아바타 메뉴 변수도 갱신할 수 있습니다.
</Callout>

## 내장 엔드포인트

Basis는 크리에이터 스크립트의 `BasisOsc` scope 밖에서도 사용할 수 있는 소수의 runtime OSC 엔드포인트를 제공합니다. 이 경로들은 절대 경로이며 OSC 브리지가 실행 중일 때 OSC Query에 표시됩니다.

### ChatBox 입력

`/chatbox/input`은 외부 OSC 클라이언트가 Basis 채팅 입력을 제어할 수 있게 합니다.

채팅 메시지를 보내거나, 미리 채워진 텍스트로 채팅 작성기를 열 수 있습니다.

```text title="채팅 입력"
/chatbox/input string message, optional bool shouldOpenKeyboard=false, optional bool playNotificationSound=false
```

- `message`는 Basis 채팅 정리 과정을 거친 뒤 전송됩니다.
- `shouldOpenKeyboard`가 `true`이면 `message`가 들어간 상태로 Basis 채팅 작성기를 열고, 그렇지 않으면 메시지를 전송합니다.
- `playNotificationSound`는 나가는 채팅 알림 플래그를 제어합니다.

로컬 플레이어의 일시적인 입력 중 상태만 보낼 수도 있습니다.

```text title="입력 중 상태"
/chatbox/input bool typing
```

OSC 클라이언트 호환성을 위해 문자열 형식은 문자열과 최대 두 개의 불리언 인자를 어떤 순서로든 허용합니다. 첫 번째 불리언은 `shouldOpenKeyboard`, 두 번째는 `playNotificationSound`에 매핑됩니다.

비어 있거나 잘못된 시그니처는 무시됩니다. 잘못된 시그니처는 고유한 인자 시그니처마다 한 번만 로그됩니다.

<Callout type="info">
`/chatbox/input`은 `/avatar/parameters` scope 아래에 있지 않습니다. 구독하거나 보낼 때는 절대 경로 `/chatbox/input`을 사용하세요.
</Callout>

## 설정

1. 스크립트와 같은 GameObject에 `BasisOsc` 컴포넌트를 추가하거나, 참조할 수 있는 근처 객체에 추가합니다. `GetComponent<BasisOsc>()`를 호출하면 Cilbox가 shim을 자동으로 추가할 수 있습니다.
Expand Down Expand Up @@ -46,6 +78,15 @@ public class OscConsumer : MonoBehaviour
Debug.LogError("OscConsumer requires a BasisOsc component.");
}
}

private void OnDestroy()
{
if (osc != null)
{
osc.ClearSubscriptions();
osc = null;
}
}
}
```

Expand Down
Loading