2019-12-25から1日間の記事一覧
概要 using UnityEngine; public interface ICharacter { } public struct Character : ICharacter { } public class Example : MonoBehaviour { private Character m_character = new Character(); private void Update() { Hoge1( m_character ); } privat…
概要 using System; using UnityEngine; public class Example : MonoBehaviour { private enum Type { GRASS, FIRE, WATER, } private void Update() { Hoge1( Type.FIRE ); } private void Hoge1( Enum value ) { } } System.Enum で引数を受け取ると GC A…
概要 using System.Linq; using UnityEngine; public class Example : MonoBehaviour { private static string [] m_list = { "フシギダネ", "フシギソウ", "フシギバナ", }; private void Update() { var name = "ピカチュウ"; // ここで return するので r…
概要 ラムダ式の => にカーソルを重ねるとキャプチャされている変数を確認できます 参考サイト様 https://www.slideshare.net/xin9le/dotnetperformancetips-170268354
概要 using System.Linq; using UnityEngine; public class Example : MonoBehaviour { private static string[] m_list = { "フシギダネ", "フシギソウ", "フシギバナ", }; private void Update() { var name = "ピカチュウ"; var result = m_list.Where( c…