KITASENJU DESIGN BLOG

memo, html, javascript, unity

Entries from 2021-04-01 to 1 month

イベント書く delegate

c#

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; // コールバックテスト public class MyCallbackTest : MonoBehaviour { // スタート時に呼ばれる void Start () { MyProcess myProcess = new …

aaa

www.macrumors.com iOS14のAppTrackingTransparencyに対応するためにやったこと

ar image trackerの画像を変える

forum.unity.com

iPhoneの解像度アスペクト比比較

iOS

iPhoneX 2436x1125 1:1125/2436=1:0.46182266009 iPhone12 pro 2532x1170 1:1170/2532=1:0.46208530805 iPhoneXより、微妙に縦長だけど、99.956%同じ 2,3pxのちがい? iPhone11 pro max 1,242 x 2,688 1:1242/2688 = 1:0.46205357142 同じく微妙な差

Date を 00:00 mmss表示

c#

var t = Mathf.Floor(Time.realtimeSinceStartup-_startTime); var min = Mathf.Floor( t / 60 ); var sec = t % 60; _timeText.text = "" + min.ToString("00") + ":" + sec.ToString("00");

ARFoundation + Canvas(ScreenSpaceCamera)

canvasがunity editor上より大きくなったり、位置が少しずれたりします。 The canvas may be larger than in the unity editor, or slightly out of position.

c4dで角丸のプレーンを作る

1 プレーンを作る 2 頂点モードで4つの角の頂点を選ぶ 3 右クリックからベベルツールを選ぶ 4 ドラッグするとかウィンドウから数値を入力する

AssetのPathを得る

#if UNITY_EDITOR Debug.Log( "JsonPath " + UnityEditor.AssetDatabase.GetAssetPath(textAsset) ); #endif

日付の文字列を作る

System.DateTime.Now.ToString("yyMMdd_HHmmss");

.pcache parser

simple point cache file(.pcache) parser using UnityEngine; using System; public class PCacheParser { public static Vector3[] Parse(string text, int elements){ string str = text; string[] splitStr = {"end_header"}; string[] ary = str.Split(…

pcache baker

visual effect graph をpackage managerで入れる。 Window>VisualEffects>Utilities から Point cache bake tool でpcacheファイルを作る using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using System…

depth shader

デプス使う nn-hokuson.hatenablog.com light11.hatenadiary.com 頂点使う styly.cc

"FOOTER"