Edit

Share via


SKSpriteNode.FromTexture Method

Definition

Overloads

FromTexture(SKTexture)

Creates a new sprite node from the specified texture.

FromTexture(SKTexture, CGSize)

Creates a new sprite node from the specified texture and resizes it to the specified size.

FromTexture(SKTexture)

Creates a new sprite node from the specified texture.

[Foundation.Export("spriteNodeWithTexture:")]
public static SpriteKit.SKSpriteNode FromTexture (SpriteKit.SKTexture texture);
static member FromTexture : SpriteKit.SKTexture -> SpriteKit.SKSpriteNode

Parameters

texture
SKTexture

To be added.

This parameter can be null.

Returns

Attributes

Applies to

FromTexture(SKTexture, CGSize)

Creates a new sprite node from the specified texture and resizes it to the specified size.

[Foundation.Export("spriteNodeWithTexture:size:")]
public static SpriteKit.SKSpriteNode FromTexture (SpriteKit.SKTexture texture, CoreGraphics.CGSize size);
static member FromTexture : SpriteKit.SKTexture * CoreGraphics.CGSize -> SpriteKit.SKSpriteNode

Parameters

texture
SKTexture

To be added.

This parameter can be null.

size
CGSize

Returns

Attributes

Applies to