http://wiki.nonip.net/index.php?title=Unity/photon/pun2/rpc&feed=atom&action=history
Unity/photon/pun2/rpc - 変更履歴
2024-03-29T12:18:11Z
このウィキのこのページに関する変更履歴
MediaWiki 1.24.2
http://wiki.nonip.net/index.php?title=Unity/photon/pun2/rpc&diff=13587&oldid=prev
2021年8月11日 (水) 09:09にAdminによる
2021-08-11T09:09:16Z
<p></p>
<table class='diff diff-contentalign-left'>
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">←前の版</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">2021年8月11日 (水) 09:09時点における版</td>
</tr><tr><td colspan="2" class="diff-lineno">行11:</td>
<td colspan="2" class="diff-lineno">行11:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div> }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div> }</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div> void Start() {</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div> void Start() {</div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><del style="font-weight: bold; text-decoration: none;"> // int ownerID = photonView.ownerId;</del></div></td><td colspan="2"> </td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div> }</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div> }</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div> void Update() {</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div> void Update() {</div></td></tr>
</table>
Admin
http://wiki.nonip.net/index.php?title=Unity/photon/pun2/rpc&diff=13586&oldid=prev
Admin: ページの作成:「RpcViewScene.cs <pre> using UnityEngine; using Photon.Pun; public class RpcViewScene : MonoBehaviour { PhotonView photonView = null; void Awake() { photonView...」
2021-08-11T08:56:36Z
<p>ページの作成:「RpcViewScene.cs <pre> using UnityEngine; using Photon.Pun; public class RpcViewScene : MonoBehaviour { PhotonView photonView = null; void Awake() { photonView...」</p>
<p><b>新規ページ</b></p><div>RpcViewScene.cs<br />
<pre><br />
using UnityEngine;<br />
using Photon.Pun;<br />
<br />
public class RpcViewScene : MonoBehaviour<br />
{<br />
PhotonView photonView = null;<br />
void Awake() {<br />
photonView = GetComponent<PhotonView>();<br />
}<br />
void Start() {<br />
// int ownerID = photonView.ownerId;<br />
}<br />
void Update() {<br />
if (Input.GetKeyDown (KeyCode.Space)) {<br />
SpaceKey ();<br />
}<br />
if (Input.GetKeyDown (KeyCode.LeftArrow)) {<br />
LeftArrowKey ();<br />
}<br />
}<br />
void SpaceKey()<br />
{<br />
photonView.RPC("CustomMethod", RpcTarget.All);<br />
}<br />
[PunRPC]<br />
private void CustomMethod() {<br />
Debug.Log ("CustomMethod");<br />
}<br />
void LeftArrowKey() {<br />
object[] args = new object[]{<br />
"hoge",<br />
new string[] {"taro", "jiro", "saburo"}<br />
};<br />
photonView.RPC("Custom2Method", RpcTarget.All, args);<br />
}<br />
[PunRPC]<br />
private void Custom2Method(string str, string[] names) {<br />
Debug.Log ("CustomMethod " + str);<br />
foreach (string name in names) {<br />
Debug.Log ("CustomMethod name=" + name);<br />
}<br />
}<br />
}<br />
</pre></div>
Admin