[SOLVED]Send a variable to an object type variable by using Stream

if(transform.Find(“baseMale”).animation.IsPlaying(“basemeleeattack1”))
{
Debug.Log(“animation playing”);
stream.SendNext(“test”);//what should I send to target, target is an object variable
}

I’m working on Photon Unity Networking I want to send a variable to an object type variable by using stream and what should I send exactly I dont know I’m confused.

Here is the methods for sending and receiving data:

 public void SendNext(object obj)
    {
        if (!this.write)
        {
            Debug.LogError("Error: you cannot write/send to this stream that you are reading!");
            return;
        }

        this.data.Add(obj);
    }

public object ReceiveNext()
    {
        if (this.write)
        {
            Debug.LogError("Error: you cannot read this stream that you are writing!");
            return null;
        }

        object obj = this.data[this.currentItem];
		Debug.Log(obj);//I'm watching the values
        this.currentItem++;
        return obj;
    }

And here is some stream samples:

            stream.SendNext(transform.position);
            stream.SendNext(transform.rotation);
            stream.SendNext(rigidbody.velocity);

In this case it looks like you might want to send parts of the AnimationState, like time, to interested parties. But, really, the animation controller should be clever enough to decide what to do based on the velocity and other states. There are a ton of good sources out there for photon unity networking.

Also, maybe you could clarify exactly what you are trying to accomplish here?