[Unity]NGUIã§Unityã®2Dã¹ãã©ã¤ããã¢ãã¡ã¼ã·ã§ã³ãã
NGUI 㧠Unity 4.3 ã® 2D ã¹ãã©ã¤ãã使ãæ¹æ³ã¯ [Unity]NGUIã§Unityã®2Dã¹ãã©ã¤ãã使ã ã«æ¸ãã¾ããã、ä»åã¯ãããã¢ãã¡ã¼ã·ã§ã³ãããæ¹æ³ã§ã。 NGUI ã®ãã¼ã¸ã§ã³ã¯ 3.0.6f6 以éãå¿
è¦ã§ã。 ã¾ãã¯ä¸è¨è¨äºãªã©ãåèã«、Unity 4.3 ã® 2D ã¹ãã©ã¤ã表示ã¨ã¢ãã¡ã¼ã·ã§ã³、NGUI 㧠Unity ã® 2D ã¹ãã©ã¤ã表示ãã§ããã¨ããã¾ã§æºåãã¦ãã ãã。 ãã¨ã¯ SpriteRenderer 㨠Animator ãã¢ã¿ãããã¦、æ°è¡ã®ã³ã¼ãã追å ããã°å®æã§ã。(空ã®ãªãã¸ã§ã¯ãã«ä¸ã®ã³ã¼ãã ãã¢ã¿ããããã°、å¿
è¦ãªã¹ã¯ãªããã¯å
¨ã¦ã¢ã¿ããããã¾ã。) ã³ã¼ãã¯ä»¥ä¸。( GitHub : unity-ngui/UI2DSpriteAnimation.cs ) using UnityEngine; using System; [RequireComponent(typeof(UI2DSprite))] [RequireComponent(typeof(SpriteRenderer))] [RequireComponent(typeof(Animator))] public class UI2DSpriteAnimation : MonoBehaviour { System.WeakReference spriteRenderer_ = new System.WeakReference(null); SpriteRenderer spriteRenderer { get { return (spriteRenderer_.Target ?? (spriteRenderer_.Target = GetComponent<SpriteRenderer>())) as SpriteRenderer; } } System.WeakReference ui2dSprite_ = new System.WeakReference(null); UI2DSprite ui2dSprite { get { return (ui2dSprite_.Target ?? (ui2dSprit...