| Send2DTexture_ExampleChangeSpriteTexture Method |
The function is called after the Texture2D is sent by all users. Note: All users must have this function defined for them
(just like with other callback functions except claim). Just because other users do not have the Texture2D being sent
does not mean they do not need this function. This function can be used to do whatever you want to do after the Texture2D
has been transferred. In this case, it is simply swapping the Texture2D out on the current sprite, changing the image
the sprite displays. This function can be named anything, but must be a static public void function.
Namespace:
SimpleDemos
Assembly:
Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax public static void ChangeSpriteTexture(
GameObject _myGameObject,
Texture2D _myTexture2D
)
Public Shared Sub ChangeSpriteTexture (
_myGameObject As GameObject,
_myTexture2D As Texture2D
)
public:
static void ChangeSpriteTexture(
GameObject^ _myGameObject,
Texture2D^ _myTexture2D
)
static member ChangeSpriteTexture :
_myGameObject : GameObject *
_myTexture2D : Texture2D -> unit
Parameters
- _myGameObject
- Type: GameObject
The GameObject that was used to send the Texture2D - _myTexture2D
- Type: Texture2D
The Texture2D that was sent
See Also