Hello i need help with with player data strings[] i need load data from PunRPC

Options
i need load body data and noot work online with RPC allBuffered pls help me thanks

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class BoyLoader : MonoBehaviour
{
public float[] BodyLoader;
public string[] SaveName;
public string MyNamePlayer;
public int[] NumberShape;

public SkinnedMeshRenderer body;
public PhotonView photonView;

public int BodyId;
public Mesh mesh;
private void Awake()
{
photonView = this.gameObject.GetComponent();
MyNamePlayer = PlayerPrefs.GetString("Player");
body = this.gameObject.transform.GetChild(0).GetChild(0).GetComponent();
mesh = body.sharedMesh;

for (int i = 0; i < mesh.blendShapeCount; i++)
{
SaveName[i] = mesh.GetBlendShapeName(i) + MyNamePlayer;
BodyLoader[i] = PlayerPrefs.GetFloat(SaveName[i]);
NumberShape[i] = 0 + i;

}
}
void Start()
{
BodyId = photonView.viewID;

for (int i = 0; i < mesh.blendShapeCount; i++)
{
photonView.RPC("SetBody", PhotonTargets.AllBuffered, this.BodyId, this.MyNamePlayer, this.SaveName[i], this.BodyLoader[i], this.NumberShape[i]);

}
}

[PunRPC]
private void SetBody( int BodyId, int[] BodyLoader, int[] NumberShape ,string MyNamePlayer, string[] SaveName)
{

body = PhotonView.Find(BodyId).gameObject.transform.GetChild(0).GetChild(0).GetComponent();
Mesh mesh = body.sharedMesh;

for (int i = 0; i < mesh.blendShapeCount; i++)
{

PhotonView.Find(BodyId).gameObject.GetComponent().MyNamePlayer = MyNamePlayer;
PhotonView.Find(BodyId).gameObject.GetComponent().SaveName[i] = SaveName[i];
PhotonView.Find(BodyId).gameObject.GetComponent().BodyLoader[i] = BodyLoader[i];
PhotonView.Find(BodyId).gameObject.GetComponent().NumberShape[i] = NumberShape[i];
PhotonView.Find(BodyId).gameObject.transform.GetChild(0).GetChild(0).GetComponent().SetBlendShapeWeight(NumberShape[i], BodyLoader[i]);

}
}
}






Comments