ºÇ½ª¹¹¿·¡§ orika_ex_miyako 2020ǯ08·î15Æü(ÅÚ) 22:34:43ÍúÎò
¡¡°Ê²¼¤Î£²¤Ä¤Î¥¯¥é¥¹¤¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¤È¤¡¢¤³¤Î¥¯¥é¥¹¤ÏÊÌ¡¹¤Î¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈA¤ÈB¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¤È¤·¤Þ¤¹¡£
Test_1¤Î¥¯¥é¥¹¤«¤éTest_2¤ÎSetup´Ø¿ô¤ò¸Æ¤Ó½Ð¤·¤¿¤¤¾ì¹ç¡¢Test_1¤ÎStartÆâ¤Ë¤É¤Î¤è¤¦¤Ê½èÍý¤òÄɲ乤ì¤Ð¤è¤¤¤Ç¤·¤ç¤¦¤«¡£
¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈA¤Ë¤ÏTest_1¡¢¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈB¤Ë¤ÏTest_2¥¯¥é¥¹¤¬¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
¡¡
using System.Collections; using UnityEngine; public class Test_1 : MonoBehaviour { private void Start(){ } }
using System.Collections; using UnityEngine; public class Test_2 : MonoBehaviour { public void Setup(){ } }
¡¡¾åµ¤ÎÌäÂê¤ÈƱ¤¸¤¯¡¢Test_1¡¢Test_2¥¯¥é¥¹¤¬¤¢¤ê¡¢¤½¤ì¤¾¤ì¥²¡¼¥à¥ª¥Ö¥¸¥§¥¯¥ÈA,B¤Ë¥¢¥¿¥Ã¥Á¤µ¤ì¤Æ¤¤¤ë¤È¤·¤Þ¤¹¡£
¤³¤Î¤È¤
¡Test_1¤ÎÊÑ¿ônumber¤ÎÃͤòTest_2¤ÎSetup´Ø¿ô¤ËÅϤ·¤Æ¡¢Test_2¤ÎcountÊÑ¿ô¤ËÂåÆþ¤¹¤ë¤Ë¤Ï¤É¤Î¤è¤¦¤Ê½èÍý¤òTest_1¤ÎStart¤Ë²Ã¤¨¤ì¤Ð¤è¤¤¤Ç¤·¤ç¤¦¤«¡£
¢Test_2¤ÎSetup´Ø¿ô¤ò¤É¤Î¤è¤¦¤Ë½¤Àµ¤¹¤ì¤Ð¡¢Test_1¤Înumber¤ÎÃͤò¼õ¤±¼è¤ì¤ë¤Ç¤·¤ç¤¦¤«¡£
using System.Collections; using UnityEngine; public class Test_1 : MonoBehaviour { ¡¡¡¡int number = 10; ¡¡¡¡¡¡ private void Start(){ } }
using System.Collections; using UnityEngine; public class Test_2 : MonoBehaviour { int count = 0; private void Setup(){ } }
- ¥«¥Æ¥´¥ê¡§
- ¿Ê³Ø/¥¹¥¯¡¼¥ë
- Áí¹ç
¥³¥á¥ó¥È¤ò¤«¤¯