Tag: Unity

  • Turning off Environment Lighting on Unity

    Turning off Environment Lighting on Unity

    How to void out environment light?

  • Adding a tooltip on Unity Editor

    Adding a tooltip on Unity Editor

    Summary Prerequisites Unity v2020.3.17f1 macOS Big Sur v11.6 Steps Adding TooltipAttribute to you code.An example is below: References Unity – Scripting API: TooltipAttribute

  • Disable the Spatial Awareness System of HoloLens with MRTK on Unity

    Disable the Spatial Awareness System of HoloLens with MRTK on Unity

    Summary If your app doesn’t need to use the Spatial Awareness System, you can also disable the System in Unity project. Prerequisites Unity v2020.3.16f1 MRTK v2.7 Steps Click MixedRealityToolkit in your Scene. If the scene doesn’t have an your MRTK, you must create profile withCopy & Customize. Go to Spatial Awareness System section of MixedRealityToolkit…

  • Using Bounds control of MRTK

    Using Bounds control of MRTK

    Summary MRTK provide manipulation behaviour as like bounding box. It’s Bounds Control. Scale Rotate Move Prerequisites Unity v2020.3.16f1 MRTK v2.7 macOS Big Sur v11.6 Steps Click Add Component. Type boundscontrol then click BoundsControlscript. Translation is disabled on default. Turn on Show Handle For Xor Show Handle For Yor Show Handle For Z if you need…

  • BlenderからUnityを意識したFBXを出力する

    BlenderからUnityを意識したFBXを出力する

    概要 BlenderとUnityは座標系が異なるため向きが合わないため、どこかでその差異を解消しなければなりません。今回はそれをBlenderで吸収する方法をご紹介します。 例 例えば、下図はBlenderでシーンファイルを新規に作成して Monkeyを設置したものです。ワールド空間の原点にMonkeyの中心点が位置しています。Location 0,0,0でRotation 0,0,0です。 これをFBXに出力します。 Scale 1.00 Apply Scalings: FBX Units Scale Forward: -Z Forward Up: Y Up 出力したFBXをUnityに読み込み、当該モデルを確認すると、RotationのXに-89.98と値が入っています。 この-89.98をゼロにするというのがこの記事の焦点です。 単純なケース Object Modeで対象のオブジェクトをX軸の正に90度回転します。 次にEdit Modeで対象のすべての頂点をX軸の負に90度回転します。 その状態でFBX形式で出力してUnityに読み込みます。 下図が読み込んだ結果です。冒頭で紹介した例とは違いRotationの値がゼロになっていることがわかります。 オプション – Z軸 UnityのZ軸の負の方向に正面を向けたい場合はBlenderの対象オブジェクトの頂点をEdit ModeでZ軸に180度回転します。 下図はその状態で出力したFBXファイルを読み込んだ結果です。 もっと複雑なケース 前述のケースは1つのオブジェクトでしたが、今度は複数のオブジェクトがある場合の対処法です。下図はMonkeyと台形のオブジェクトがあるシーンです。 各々のオブジェクトでX軸の正に90度回転すると下図のようになります。これは求める結果ではありません。 複数を選択してから回転します。 位置が原点から離れているため修正します。Emptyオブジェクトを作り、それの子どもとして猿と土台部分を関連づけ、親だけを操作して位置合わせをします。 土台部分の底面をEdit Modeで選択します。 Cursor to Selectedを選択します。 Plain Axesを選択してEmptyオブジェクトを作成します。 Emptyオブジェクトと猿と土台で親子関係を定義します。 次にCursorをワールド空間の原点に移動します。ビューポートでShift + Sを押してメニューを開きCursor to World Originを選択します。…

  • How to check MRTK version

    See Assets/MRTK/SDK/Version.txt

  • Using Input simulation service of MRTK on Unity Editor

    Summary MRTK v2.7 Cheat sheet Key Action W Move camera to forward S Move camera to backward D Move camera to right A Move camera to left Q Move camera to up E Move camera to down Space Active right hand (Left) Shift Active left hand Y Toggle visibility for right hand T Toggle visibility…

  • Setup a Unity project for HoloLens with Mixed Reality Feature Tool

    Setup a Unity project for HoloLens with Mixed Reality Feature Tool

    A HoloLens unity project has a hassle that build a environment in the first time. The Mixed Reality Feature Tool is a tool to mitigate it.

  • Setup Unity license

    Setup Unity license

    Summary This post describe Unity license activation. Prerequisites macOS Big Sur v11.5.1 Unity Hub v2.4.5 Setup Click gear icon. Click License Management. Click ACTIVATE NEW LICENSE. Select Unity Plus or Pro. Enter your Serial Numberof Unity. The Serial Number field of Unity Hub require the Serial Key displayed in id.unity.com. Finished. Where is Serial Key…

  • How to install NuGet packages in Unity

    How to install NuGet packages in Unity

    Unity is a very strange tool from .NET user’s view. It’s for Unity doesn’t provide the NuGet package manager as a first-party tool. Unity users should work with a third-party NuGet package manager. So, if you need it setup to your unity project. Introduction The procedure for installing NuGet Package Manager to Unity is as follows.…