2014-08-01ãã1ã¶æéã®è¨äºä¸è¦§
https://atnd.org/events/53795 20140829 第24å Unity åå¼·ä¼ - Unity meets SpriteStudio from Tetsuya Mori Unityã®ãã¹ãã¨ãã§ã¯ãã§éã¶ï¼ from Yamato Honda
// å¾æ¥ // é åã§ã³ã³ãã¼ãã³ãã®ä¸è¦§ãåå¾ BoxCollider[] array; array = GetComponents<BoxCollider>(); array = GetComponentsInChildren<BoxCollider>(); // æ°è¦ // List ã§ã³ã³ãã¼ãã³ãã®ä¸è¦§ãåå¾ var list = new List<BoxCollider>(); GetComponents<BoxCollider>( list ); GetComponentsInChildren<BoxCollider></boxcollider></boxcollider></boxcollider></boxcollider></boxcollider>â¦
Unity 4.6 ãã Collider ã® Inspector ä¸ã«ãEdit Colliderãã¨ãããã¿ã³ã追å ããã¾ãã ãã®ãã¿ã³ãæ¼ãã¨ãScene ãã¥ã¼ã§ Collider ã®ãµã¤ãºã調æ´ã§ããããã«ãªãã¾ã
Unity 4.5 ã® GameObject ã¡ãã¥ã¼ Unity 4.6 ã® GameObject ã¡ãã¥ã¼ Unity 4.5 ã® Hierarchy ã® Create ã¡ãã¥ã¼ Unity 4.6 ã® Hierarchy ã® Create ã¡ãã¥ã¼ Unity 4.5 ã® Hierarchy ã® Context ã¡ãã¥ã¼ Unity 4.6 ã® Hierarchy ã® Context ã¡ãã¥ã¼ 主â¦
// ã¯ã¼ã«ã座æ¨ç³»ã®ä½ç½®æ å ±ãä¿æãã transform.parent = parent; transform.SetParent( parent ); transform.SetParent( parent, true ); // ã¯ã¼ã«ã座æ¨ç³»ã®ä½ç½®æ å ±ã親ãªãã¸ã§ã¯ãã®ãã¼ã«ã«åº§æ¨ç³»ã«å¤æãã transform.SetParent( parent, false )â¦
Unity 2022.1a - Unity using UnityEngine; using System.Collections; public class Example : MonoBehaviour { private void OnTransformParentChanged() { Debug.Log( "OnTransformParentChanged" ); } } Unity 4.6 ã§ãOnTransformParentChangedãã¨ããâ¦
/// <summary> /// ã¹ã³ã¢ã管çããã¯ã©ã¹ /// </summary> public sealed class Score { private int mValue; /// <summary> /// å¤ãåå¾ã¾ãã¯è¨å®ãã¾ã /// </summary> public int Value { get { return mValue; } set { mValue = value; // å¤ãå¤æ´ãããæã«ã¤ãã³ããå®è¡ãã¾ã if ( mChaâ¦
ä¸è¨ã®ããã« Unity ã® Inspector ãã¥ã¼ã«ãã«ãããã¯ã¹ã表示ã§ãã DecoratorDrawerãä½æãã¾ãã ä¸è¨ã® HelpBoxAttribute.cs ã Unity ããã¸ã§ã¯ãã«è¿½å ã㦠ä¸è¨ã®ãããªã¹ã¯ãªãããæ¸ããã¨ã§ Inspector ãã¥ã¼ã«ãã«ãããã¯ã¹ã表示ã§ããããâ¦
æ¦è¦ MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it. Your script should either check if it is null or you should not destroy the object. ãã§ã«åé¤ãããã²ã¼ã ãªãã¸ã§ã¯â¦
http://hideapp.cocolog-nifty.com/blog/2012/12/unity-tipsunity.html ä¸è¨ã®ãµã¤ããè¦ã¦ãã¢ãã«ã®ã¢ãã¡ã¼ã·ã§ã³ã®ç¨®é¡ãè¨å®ããã¨ãã« Legacyã¨Genericã§ã©ã¡ãã®æ¹ãè² è·ã軽ãã®ãæ°ã«ãªã£ãã®ã§èª¿ã¹ã¦ã¿ã¾ãã æ¤è¨¼çµæ â»30FPSãä¸éã«è¨å®ãã¦ã1â¦
é¢é£è¨äº
Hierarchy ãã¥ã¼ã§ãªãã¸ã§ã¯ããé¸æãã¦ãã Inspector ãã¥ã¼ã®å·¦ä¸ã®ç®±ã®ç»åãã¿ãããã㨠ãSelect Iconãã¨ããå°ã¦ã£ã³ãã¦ã表示ããã¾ã ããã§ããããã®ã¢ã¤ã³ã³ãé¸æãããã ãOther...ããã¿ã³ãæ¼ãã¦ãã¯ã¹ãã£ãé¸æãã㨠Scene ãã¥â¦
é¢é£è¨äº
Quick Disable Quick Disable 㯠Hierarchy ãã¥ã¼ã« ãªãã¸ã§ã¯ãã®ã¢ã¯ãã£ããåãæ¿ãããã¿ã³ã表示ããã¢ã»ããã§ã Quick Disable ãã¤ã³ãã¼ãããå¾ã« Hierarchy ãã¥ã¼ã§ Ctrl + Shift ãã¼ãæ¼ãç¶ãã㨠é¸æãããªãã¸ã§ã¯ãã®ã¢ã¯ãã£ããåãâ¦
ãå®´ãå®è£ æã«å¾ãããUnityããã°ã©ã ãã¦ã㦠from Ryohei Tokimura MonoBehaviour ãç¶æ¿ããã¯ã©ã¹ã§ transform ã rigidbody ã使ç¨ããã¨ãã®æ³¨æã¨ã㦠transform ã rigidbody ã¯å é¨ã§æ¯å GetComponent ãã¦ããããã§ã ãããªãã¨ããããã®ãâ¦
æ¦è¦ [Flags] private enum JobType // ã¸ã§ãã®ç¨®é¡ { NONE = 1 << 0, // ç¡å¹ SOLDIER = 1 << 1, // çå½å µå£« SORCERER = 1 << 2, // éæ³ä½¿ã HUNTER = 1 << 3, // ç©äºº MERCENARY = 1 << 4, // åå µ } private void Awake() { var jobs = JobType.SOLDIEâ¦
é¢é£è¨äº
ã¯ããã« ãUnity ã¢ã»ããçå¤ã®ã¢ããã³ãã«ã¬ã³ãã¼ 2014 Summerï¼ãã® 8/8 åãæ å½ããã¦ããã ã baba_s ã§ãããããããé¡ããã¾ãï¼ æ¨æ¥ã¯æ¤¿ãã¾ã«ãããã²ã¼ã ããããè¤æ°æ¿ãã¦ãã¬ã¤ããããã§ãã æ¬æ¥ã¯ãEditor Console Proãã¨ããã¢ã»ãâ¦
æ¦è¦ Hierarchy ã§ã²ã¼ã ãªãã¸ã§ã¯ããé¸æã㦠Inspector ã® Tag ã§ãEditorOnlyããè¨å®ãã㨠Unity ã¨ãã£ã¿ä¸ã§ã®ã¿åå¨ããã²ã¼ã ãªãã¸ã§ã¯ãã«ãªãã¾ã ã¢ã¿ããããã¹ã¯ãªãããåããªããªãã¾ã
ã½ã¼ã¹ã³ã¼ã using UnityEngine; /// <summary> /// GameObject åã®æ¡å¼µã¡ã½ããã管çããã¯ã©ã¹ /// </summary> public static class GameObjectExtensions { /// <summary> /// ã«ã¼ãã¨ãªããªãã¸ã§ã¯ããè¿ãã¾ã /// </summary> public static GameObject GetRoot(this GameObject self) { â¦
ã½ã¼ã¹ã³ã¼ã using UnityEngine; /// <summary> /// GameObject åã®æ¡å¼µã¡ã½ããã管çããã¯ã©ã¹ /// </summary> public static class GameObjectExtensions { /// <summary> /// ãã¼ã«ã«åº§æ¨ãç¶æãã¦è¦ªãªãã¸ã§ã¯ããè¨å®ãã¾ã /// </summary> public static void SafeSetParent(this GameOâ¦
Unity 㯠Hierarchy ãã¥ã¼ã§å³ã¯ãªãã¯ãããæã«è¡¨ç¤ºãããã¡ãã¥ã¼ãã«ã¹ã¿ãã¤ãºã§ããªãã§ãã ç¬èªã«ä½æããã¡ãã¥ã¼ã表示ããããã¨ã¯å¯è½ã§ã 試ãã« Hierarchy ãã¥ã¼ã§ Ctrl + Shift + ã¯ãªãã¯ãããæã« ç¬èªã«ä½æããã¡ãã¥ã¼ã表示ããã¹ã¯â¦
é¢é£è¨äº
ã¯ããã« ä¾ãã°ãããã®ãªãã¸ã§ã¯ãã Hierarchy ã«åå¨ããå ´åã« UIRoot ãã Button ã¨ããååã®åãªãã¸ã§ã¯ããæ¤ç´¢ããå ´åã 次ã®ããã«å¦çãæ¸ãã¾ãã using UnityEngine; public class UIRoot : MonoBehaviour { private void Awake() { Transâ¦