npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

com.hidano.scene-view-style-camera-controller

v1.3.0

Published

Provides Scene-view-like camera controls (orbit, pan, dolly, look-around, flythrough, FoV) in Game view for any Camera component.

Readme

Scene View Style Camera Controller

Unity の Game ビュー上で、任意の Camera を Scene ビューと同じ操作感で制御できるコンポーネントです。

Requirements

  • Unity 6000.0 (Unity 6) 以降
  • Input System パッケージ (com.unity.inputsystem) 1.4.0 以降

Installation

Unity Package Manager (Git URL)

  1. Window > Package Manager を開く
  2. 左上の + > Add package from git URL...
  3. 以下を入力:
    https://github.com/Hidano/SceneViewStyleCameraController.git?path=Assets/SceneViewStyleCameraController

npm レジストリ経由

Packages/manifest.json に以下を追加:

{
  "scopedRegistries": [
    {
      "name": "your-registry",
      "url": "https://your-registry-url",
      "scopes": ["com.hidano"]
    }
  ],
  "dependencies": {
    "com.hidano.scene-view-style-camera-controller": "1.0.0"
  }
}

Quick Start

Prefab を使う(推奨)

  1. Prefabs/SceneViewStyleCamera.prefab をシーンに配置
  2. 既存の Main Camera を削除(または無効化)
  3. Play モードで実行

Prefab には Camera / AudioListener / SceneViewStyleCameraController(デフォルト感度プリセット設定済み)が含まれており、シーンのカメラを置き換えるだけで使えます。

手動でセットアップする

  1. 任意の GameObject に SceneViewStyleCameraController コンポーネントを追加
  2. Inspector の Target Camera に操作したい Camera を割り当て
    • 未割り当ての場合は自動解決されます(下記 Inspector Parameters 参照)
  3. Play モードで実行

Controls

| 操作 | 入力 | |------|------| | オービット(注視点中心の回転) | Alt + 左ドラッグ | | パン(平行移動) | 中ボタンドラッグ | | ドリー(前後移動) | Alt + 右ドラッグ / ホイール(速度はピボット距離に比例。いずれもピボット固定でカメラのみ移動) | | ルックアラウンド(FPS 風見回し) | 右ドラッグ | | フライスルー(自由移動) | 右ドラッグ + W A S D Q E | | フライスルー加速 | 上記 + Shift | | FoV 変更(構図維持) | Shift + ホイール | | フォーカス(対象を画面中央にフレーミング) | F(エディタ再生中は Hierarchy で選択中のオブジェクト、未選択時・ビルド実行時は Focus Target) | | リセット(初期状態に復帰) | Ctrl + R |

Inspector Parameters

Target

| パラメータ | 説明 | |-----------|------| | Target Camera | 操作対象の Camera。未設定時は ①同じ GameObject 上の Camera(GetComponent)→ ②シーン内で depth が最大の Camera の順で自動解決する。それでも見つからない場合は警告ログを出力し入力を無視する |

Pivot

| パラメータ | デフォルト | 説明 | |-----------|-----------|------| | Default Pivot Target | なし | 初期注視点として使う Transform。設定するとカメラは有効化時にこの点を向き、その位置がピボット点(オービット中心)になる。未設定時はカメラ前方 × Initial Pivot Distance | | Initial Pivot Distance | 10 | 有効化時のピボット点(注視点)までの初期距離(Default Pivot Target 未設定時に使用) | | Min Pivot Distance | 0.1 | ドリー/FoV 操作でピボットに近づける最小距離 |

Focus

| パラメータ | デフォルト | 説明 | |-----------|-----------|------| | Focus Target | なし | F キー押下時のフォーカス対象。エディタ再生中は Hierarchy で選択中のシーンオブジェクトが優先され、未選択時(およびビルド実行時)にこの Transform が使われる | | Focus Animation Duration | 0.25 | フォーカス時の移動アニメーション時間(秒)。0 で即時移動 |

フォーカスは Scene ビューの Frame Selected(F キー)相当の動作です。対象の階層全体の Renderer バウンズ(無い場合は Collider、どちらも無い場合は位置中心の単位バウンズ)が画面に収まる距離まで、カメラの向きを保ったまま ease-out イージング付きでスムーズに移動し、ピボット点(オービット中心)をバウンズ中心へ移します。アニメーション中にドラッグやスクロールを行うとその場で中断して通常操作に移行できます。スクリプトからは Focus(Transform) で任意の対象へフォーカスでき、Focus(Transform, bool instant) で即時移動を強制できます。直交投影カメラでは orthographicSize が対象の収まるサイズに更新されます。

Sensitivity

感度は 2 つの方法で設定できます:

  • Sensitivity Preset: Create > SceneViewCamera > SensitivitySettings で ScriptableObject を作成し割り当て
  • Inline Sensitivity: コンポーネント上のインライン感度値。Enable チェックを入れると Preset の有無にかかわらずインライン値が優先して使用される(チェックなしの場合、インライン値は Preset 未設定時のフォールバックとして使用され、編集は不可)。Preset 設定時は Copy From Preset ボタンで Preset の値をインライン側へコピーできる。Play モード中のインライン値の変更も即時反映される

| パラメータ | デフォルト | 説明 | |-----------|-----------|------| | Orbit Sensitivity | 0.3 | オービット回転速度 | | Pan Sensitivity | 0.001 | パン移動速度 | | Dolly Drag Sensitivity | 0.005 | 右ドラッグでのドリー速度(ピボット距離 1m あたり) | | Dolly Scroll Sensitivity | 0.1 | ホイールでのドリー速度(ピボット距離 1m あたり) | | Look Around Sensitivity | 0.3 | ルックアラウンド回転速度 | | Fly Move Sensitivity | 5.0 | フライスルー移動速度 | | Fly Boost Multiplier | 5.0 | Shift 押下時の加速倍率 | | FoV Sensitivity | 2.0 | FoV 変更速度 |

感度を 0 に設定するとその操作系を無効化できます。

Notes

  • Time.timeScale が 0 でも Time.unscaledDeltaTime を使用するため正常に動作します
  • 対象カメラの transform と fieldOfView を直接書き換えるため、他のカメラ制御スクリプトとの併用時は競合にご注意ください
  • 直交投影カメラ (orthographic = true) では FoV 操作は無効化されます

License

MIT License - 詳細は LICENSE を参照してください。