ãUnity9ãUNETã§ãªã³ã©ã¤ã³éå§æã®ãã¬ã¤ã¤ã¼çæä½ç½®ãå¤æ´ãããUNET2-2ã
Unity5.1.1p3 Personal(2015å¹´7æ)
前回の続きã§ãã
ä»åã¯Mainã·ã¼ã³ã«å ¥ã£ãæã«ããã¬ã¤ã¤ã¼çæä½ç½®ãã©ã³ãã ã«ããå¦çã追å ãã¾ãã
â»â»â»æ³¨æâ»â»â»
Unityã®ãã¼ã¸ã§ã³ã5.1.1f1ããåã®ãã®ã ã¨ãã·ã¼ã³éé·ç§»ãããæã«ãStartServer Listen failedãã¨ããã¨ã©ã¼ãçºçãããã¨ãããã¾ãã
公式サイトからパッチããã¦ã³ãã¼ãããææ°ã®ç¶æ
ã«ãããã¨ããªã¹ã¹ã¡ãã¾ãã
UNET Part 2 - Rotation Syncing - YouTube
ãç®æ¨ããªã³ã©ã¤ã³éå§æã®ãã¬ã¤ã¤ã¼çæä½ç½®ãå¤æ´ãã
â Spawn Positionã®ä½æ
Playerãçæããå ´æã表ãSpawn Positionãªãã¸ã§ã¯ããä½æãã¾ãã
ã¾ãã¯Mainã·ã¼ã³ã«ã¦ç©ºãªãã¸ã§ã¯ããçæãã¦ãååãSpawn Positionã«ãã¦ä¸ããã
Spawn Positionã®Transformã«ã¦Resetãè¡ããPosition x y zã0 0 0ã«ãã¾ãã
Reset
次ã«ããã²ã¨ã¤ç©ºãªãã¸ã§ã¯ããSpawnããä½æããAdd ComponentããNetwork > NetworkStartPositionãåãä»ããSpawn Positionã®åãªãã¸ã§ã¯ãã«ãã¾ãã
次ã«Spawnãªãã¸ã§ã¯ãã4ã¤ã«ã³ãã¼ãã¾ãã
次ã«Position x zã¨Rotation yã®å¤ãå¤æ´ãã¦ã4ã¤ã®Spawnããããããã©ãã©ã®ä½ç½®ã«é ç½®ãã¦ä¸ããã
Spawnããã©ãããã
â¡ãã¬ã¤ã¤ã¼çæãã¹ã
ããã§ã¯Menuã·ã¼ã³ã«æ»ã£ã¦ã²ã¼ã ãå®è¡ãã¦ã¿ã¾ãããããã®åã«ãNetworkManagerã®Offlineã·ã¼ã³ã«æå®ããã¯ãã®Menuã·ã¼ã³ãæ¶ãã¦ãªãã確èªããæ¶ãã¦ãããå度æå®ãã¦ããã¦ä¸ããã
NetworkManagerã®Offlineã·ã¼ã³ãæ¶ãã¦ãªãã確èª
ããã§ã¯Menuã·ã¼ã³ããMainã·ã¼ã³ã¸é·ç§»ãã¦ã¿ã¾ãããã
ãã°ã¤ã³ãç´ããã³ã«
çæä½ç½®ãå¤ãã
ãã¡ããã¯ã©ã¤ã¢ã³ãå´ã§ãåæ§ã®çµæãå¾ããã¾ãã
LAN Clientã§æ¥ç¶
ãã¹ãã¨ã¯å¥ã®ä½ç½®ã§çæ(åãä½ç½®ã®å ´åããã)
â¢ã¹ãã©ãã·ã¥ã¹ã¯ãªã¼ã³ãé表示ã«ãã(Proçã®ã¿)
æå¾ã«ãªãããã¹ãã©ãã·ã¥ã¹ã¯ãªã¼ã³ãæ¶ãæ¹æ³ãåç»ã«è¼ã£ã¦ããã®ã§ãæ²è¼ãã¾ãã
ã¹ãã©ãã·ã¥ã¹ã¯ãªã¼ã³ã¨ã¯Unityã§ã²ã¼ã ãä½ã£ãæã«ä¸çªæåã«åºã¦ãããMade With Unityãã¨æ¸ãããã¤ã¡ã¼ã¸ç»åã®ãã¨ã§ãã
ãããªãã¤
ããã¯Edit > Project Settings > Playerã¨é²ã¿ã
Inspectorãã¥ã¼ã®Splash Imageãã¯ãªãã¯ããã¨ã§ã¦ãã¾ããããåã¯Proçã§ã¯ãªãã®ã§æ¶ããã¨ãã§ãã¾ããã
ä¸ã®ä¸éãªããã§
ã¨ããããå¾ãã®è£éã¨ããã¬ã¤ã¤ã¼ã®çæä½ç½®ãã©ã³ãã ã«ããã¨ããã¾ã§ã¯ã§ãã¾ããã
ä»åã¯ããã¾ã§ã§ãã
ãããã¨ããããã¾ããã
ãUnity9ãUNETã§ãã«ããã¬ã¤ã¤ã¼ãªãªã³ã©ã¤ã³ã²ã¼ã éçºãUNET1ã
ãUnity9ãUNETã§ãã¬ã¤ã¤ã¼ã®åããè£éãããªããããªåããå®ç¾ãããUNET1-2ã
ãUnity9ãUNETã§ãããã¯ã¼ã¯è¶ãã«å¾ã(Rotation)ãåæããããUNET2ã
ãUnity9ãUNETã§ãªã³ã©ã¤ã³éå§æã®ãã¬ã¤ã¤ã¼çæä½ç½®ãå¤æ´ãããUNET2-2ã
ãUnity9ãUNETã®ãããã¯ã¼ã¯ãã©ãã£ãã¯ã軽æ¸ããå¹çåãããUNET3ã
ãUnity9ãUNETã®latency(é
延æé)ãæ¹åãããUNET4ã
ãUnity9ãUNETã®latency(é
延æé)ã表示ãã¦ãã¡ãã£ã¨ã ãæ¹åãããUNET4-2ã
ãUnity9ãUNETã®SyncVarã®hookã®ä½¿ç¨ä¾ã¨ãåæ代ã®åææ¹æ³ãUNET5ã
ãUnity9ãUNETã使ã£ã¦RotationãåæããããUNET6ã
ãUnity9ãUNETã§åãã¬ã¤ã¤ã¼ã«PlayerIDãè¨å®ãããUNET7ã
ãUnity9ãUNETã§æµãã¬ã¤ã¤ã¼ã«ãã¡ã¼ã¸ãä¸ããï¼ãUNET8ã
ãUnity9ãUNETã§HPãç»é¢ã«è¡¨ç¤ºããPlayerã¸ãã¡ã¼ã¸ãä¸ãããUNET9ã
ãUnity9ãUNETã§HPã0以ä¸ã«ãªã£ãæãPlayerãç ´å£ããï¼ãUNET10ã
ãUnity9ãUNETã§æ»ãã Playerãçãè¿ãããï¼ãUNET11ã
ãUnity9ãUNETã§ã¾ã³ãAIãåºç¾ãããï¼ãUNET12ã
ãUnity9ãUNETã§ã¾ã³ãçææã«ã¦ãã¼ã¯ãªIDãä»ããï¼ãUNET13ã
ãUnity9ãUNETã§ã¾ã³ããæã¤ï¼ãUNET14ã
ãUnity9ãUNETã§ã¾ã³ãã«æ»æãããï¼ãUNET15ã
ãUnity9ãUNETã§ã¾ã³ãã®åããã¹ã ã¼ãºã«ã·ã³ã¯ããããï¼ãUNET16ã
ãUnity9ãUNETã§ã¾ã³ãçºçå°ç¹ãå¢ãããUNET17ã
ãUnity9ãUNETã§çºçãããã°ãåãé¤ããUNET18ã
ãUnity9ãUnity MultiPlayerã使ã£ã¦ãããã¯ã¼ã¯è¶ãã«ãããã¡ã¤ãã³ã°ï¼ãUNET19ã
ãUnity9ãGUIãæ¹åãã¦ãNetwork Managerãè¦ãããããï¼ãUNET20ã
ãUnity9ã表示ããGUI(Network Manager)ãæ©è½ãããï¼ãUNET20-2ã
ãUnity9ãUNETã§Animationãåæãããï¼ãUNET21ã