KITASENJU DESIGN BLOG

memo, html, javascript, unity

Entries from 2021-12-01 to 1 month

Clothシミュレーションを使う

Default cloth simulation in Unity 【Unity】Cloth コンポーネントを使って布の動きを表現する方法 | STYLY Cloth - Unity マニュアル マニアックな問題

Draw Cube with Line

関連:https://kitasenjudesign.hatenablog.com/entry/2021/11/13/133126 using System.Collections; using System.Collections.Generic; using UnityEngine; public class LineMesh : MonoBehaviour { [SerializeField] private MeshFilter _meshFilter; [S…

Unityのヒエラルキーで入れ子を全部オープンするショートカット

option(alt) + クリック shortcut ショートカット

Unityで影が出ない時

以下の四つ projectSettingのqualityがlowとかになっていないかチェック Sceneのウィンドウの上部で、ライトがオンになっているのをチェック DirectionalLightとかで、shadow castがオンになっているのをチェック 対象物のshadow caster recieverをチェック

Unity Default Panorama Texutre 2048

photoshopでマスク

フォトショがよくわからない。パスでマスクを作るときはこんな感じで良いのだろうか。 全然直感的でない。 マスクされたいレイヤーを選ぶ 右クリックからクリッピングマスクを作成 その下のレイヤーにマスクしたいパス?をかいておく

Simple FPS Counter

count frame every second. using System.Collections; using System.Collections.Generic; using UnityEngine; public class FPSCounter : MonoBehaviour { private int _counter=0; private float _time = 0; public int fps =0; public static int Fps=0;…

Unityで作ったアプリがAndroidで上部などに黒い帯が入る時

render outside safe areaにチェックを入れる

mac(のxcode)を軽くする

mac

150Gくらい軽くなった qiita.com

ARCoreで画像トラッキングを使うときのサイズ注意点

$ arcoreimg eval-img --input_image_path=hoge.png というのでチェックして0以上の数値が出ないと、apkコンパイル時にエラー 画像サイズや余白の調整でなんとかなることがあった

さくひんづくり

現状の問題点 具体例 仮説 仮説をもとにした作品

unityでfeedbackEffectを作る

feedbackするためには、現在のフレームframe(t)に過去フレームframe(t-1)を描画する必要がある。 frame(t) = effect( frame(t), frame(t-1) ); ① メインcameraのonRenderImageでrenderTextureAに描画(ノイズ等でずらしたり、位置を動かしたり)。これは描画…

1秒ごとにInstantiate

using System.Collections; using System.Collections.Generic; using UnityEngine; public class Rakka : MonoBehaviour { [SerializeField] private Ball[] _prefabs; private int _count=0; void Start() { _loop(); } private void _loop(){ int index =…

Inspector上のボタンを横に並べる

align buttons horizonally on Inspector 8個x3行、かいた for(int j=0;j<3;j++){ EditorGUILayout.BeginHorizontal(); for(int i=j*8;i<8*(j+1);i++){ if (GUILayout.Button(""+i,GUILayout.Width(30))){ exampleScript.SendMessage ("SetEffect", i, SendM…

unityで曜日・日付を使う

string[] youbiAry = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"}; string[] monthAry = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"}; var time = DateTime.Now; var hh = time.Hour.ToString("00"); va…

"FOOTER"