1.0.0 • Published 2 years ago

jp.suzuryg.local-switch-generator v1.0.0

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
-
Last release
2 years ago

GitHub release (latest by date)

LocalSwitchGenerator

This tool allows you to easily create local switch gimmicks in world production using the Cluster Creator Kit.

  • You can switch objects ON/OFF for each player
  • Timeline method is used, so it can be applied to any object.
    • When used on Item-type objects, behavior may change from other players

Requirements

  • Unity 2021.3 / Cluster Creator Kit v1.17.0

Installation

from disk

  1. Download and unzip the latest release
  2. Open the "Packages" window from the Unity menu Window > Package Manager
  3. From the "+" button at the top left of the window, select "Add package from disk" and open the package.json in the unzipped folder

scoped registries

  1. Open Packages/manifest.json and edit as follows:
{
  "scopedRegistries": [
    {
      "name": "suzuryg",
      "url": "https://registry.npmjs.com",
      "scopes": [ "jp.suzuryg" ]
    }
  ],
  "dependencies": {
    "jp.suzuryg.local-switch-generator": "1.0.0",
    ...

How to Use

Generate Local Switch

  1. Open the tool window from Unity menu Tools > LocalSwitchGenerator
  2. Set the object you want to switch ON/OFF in "Target Object" field
  3. Set the object you want to use as the ON/OFF button in "Button" field
  4. Press the "Generate" button to create the local switch gimmick
    • Item component and InteractItemTrigger component will be added to the button
    • A gimmick object named "Switch_XXX" (XXX is the name of the target object) will be created

Delete Local Switch

  1. Remove the Item component and InteractItemTrigger component from the button
  2. Delete the "Switch_XXX" object

References

Creating Timeline-Style Local Gimmicks in Cluster


LocalSwitchGenerator

Cluster Creator Kit を使用したワールド制作で、ローカルスイッチのギミックを簡単に作れるツールです。

  • プレイヤーごとにオブジェクトの ON / OFF を切り替えることができます
  • Timeline方式なので、すべてのオブジェクトに対して使用できます
    • Item系のオブジェクトに使用した際は他プレイヤー視点での挙動が変化する場合があります

要件

  • Unity 2021.3 / Cluster Creator Kit v1.17.0

インストール

from disk

  1. 最新の release からダウンロード、展開します
  2. Unity メニュー Window > Package Manager から "Packages" ウィンドウを開きます
  3. ウィンドウ内左上の "+" ボタンから "Add package from disk" を選択、展開したフォルダ内の package.json を開きます

scoped registries

  1. Packages/manifest.json を開き、以下のように編集します
{
  "scopedRegistries": [
    {
      "name": "suzuryg",
      "url": "https://registry.npmjs.com",
      "scopes": [ "jp.suzuryg" ]
    }
  ],
  "dependencies": {
    "jp.suzuryg.local-switch-generator": "1.0.0",
    ...

使い方

ローカルスイッチの生成

  1. Unity メニュー Tools > LocalSwitchGenerator から 本ツールのウィンドウ を開きます
  2. 「対象オブジェクト」に ON / OFF を切り替えたいオブジェクトをセットします
  3. 「ボタン」に ON / OFF を切り替えるボタンとするオブジェクトをセットします
  4. 「生成」ボタンを押すと、ローカルスイッチのギミックが生成されます
    • ボタンにItemコンポーネントとInteractItemTriggerコンポーネントが追加されます
    • 「Switch_XXX」(XXXは対象オブジェクトの名前)という名前のギミック用オブジェクトが生成されます

ローカルスイッチの削除

  1. ボタンからItemコンポーネントとInteractItemTriggerコンポーネントを削除します
  2. 「Switch_XXX」オブジェクトを削除します

参考文献

clusterで作るTimeline式ローカルギミック