Click or drag to resize

ASLObjectSendAndSetWorldScale Method

Send and set the world scale for this object for all users. To set world scale, the object must be de-parented and then have its scale set, then re-parented. It is not advised to use this function as its behavior, especially when the parent object is rotated, can cause strange, though correct, behavior.

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

Parameters

_scale
Type: SystemNullableVector3
The new world scale for 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 set (=) the world scale. Note that the object does not move to this scale until
        //it receives the packet from the server, even though it is the  caller of this function.
        gameobject.GetComponent<ASL.ASLObject>().SendAndSetWorldScale(new Vector3(.5, 2, .5));
    });
}
See Also