Click or drag to resize

ASLObjectSendAndIncrementLocalPosition Method

Sends and adds to the local transform of this object for all users

Namespace:  ASL
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public void SendAndIncrementLocalPosition(
	Vector3? _localPosition,
	GameLiftManagerOpFunctionCallback callback = null
)

Parameters

_localPosition
Type: SystemNullableVector3
The value to be added to the local position of this object
callback (Optional)
Type: ASLGameLiftManagerOpFunctionCallback
The optional callback function for OpFunction
Examples
void SomeFunction()
{
     //Claim the object first
    gameobject.GetComponent<ASL.ASLObject>().SendAndSetClaim(() =>
    {
        //Send and then increment (+=) the local position. Note that the object does not move to this position until
        //it receives the packet from the server, even though it is the  caller of this function.
        gameobject.GetComponent<ASL.ASLObject>().SendAndIncrementLocalPosition(new Vector3(1, 2, 5));
    });
}
See Also