C# Class SKTextureUtil, SpriteKit

Show file Open project: prime31/SpriteKit Class Usage Examples

Public Properties

Property Type Description
atlasPadding int
defaultAnimationsPath string
defaultAtlasResourcesPath string
defaultPath string
defaultResourcesPath string
defaultShader string
defaultSpriteSheetPath string
isCurrentlyRefreshingSourceImages bool

Public Methods

Method Description
createSpriteSheet ( string name, string sourceFolder, bool generateSdTexture, int cameraOrthoSize, int targetScreenHeight ) : SKSpriteSheet,
getAllSpriteAnimations ( ) : List
getAllSpriteSheets ( ) : List
makePathRelativeToProject ( string path ) : string
rebuildAtlas ( Texture2D textures, string filename, bool generateSdAtlas ) : Rect[]
refreshSourceImages ( this sheet ) : void
saveAtlasPng ( string path, string name, Texture2D tex ) : void
textureInfoForSourceImage ( this sheet, string sourceImageName ) : SKTextureInfo,

Private Methods

Method Description
resizeTexture ( string pathToImage, int width, int height, string outputFilename ) : Texture2D

Method Details

createSpriteSheet() public static method

public static createSpriteSheet ( string name, string sourceFolder, bool generateSdTexture, int cameraOrthoSize, int targetScreenHeight ) : SKSpriteSheet,
name string
sourceFolder string
generateSdTexture bool
cameraOrthoSize int
targetScreenHeight int
return SKSpriteSheet,

getAllSpriteAnimations() public static method

public static getAllSpriteAnimations ( ) : List
return List

getAllSpriteSheets() public static method

public static getAllSpriteSheets ( ) : List
return List

makePathRelativeToProject() public static method

public static makePathRelativeToProject ( string path ) : string
path string
return string

rebuildAtlas() public static method

public static rebuildAtlas ( Texture2D textures, string filename, bool generateSdAtlas ) : Rect[]
textures UnityEngine.Texture2D
filename string
generateSdAtlas bool
return Rect[]

refreshSourceImages() public static method

public static refreshSourceImages ( this sheet ) : void
sheet this
return void

saveAtlasPng() public static method

public static saveAtlasPng ( string path, string name, Texture2D tex ) : void
path string
name string
tex UnityEngine.Texture2D
return void

textureInfoForSourceImage() public static method

public static textureInfoForSourceImage ( this sheet, string sourceImageName ) : SKTextureInfo,
sheet this
sourceImageName string
return SKTextureInfo,

Property Details

atlasPadding public static property

public static int atlasPadding
return int

defaultAnimationsPath public static property

public static string defaultAnimationsPath
return string

defaultAtlasResourcesPath public static property

public static string defaultAtlasResourcesPath
return string

defaultPath public static property

public static string defaultPath
return string

defaultResourcesPath public static property

public static string defaultResourcesPath
return string

defaultShader public static property

public static string defaultShader
return string

defaultSpriteSheetPath public static property

public static string defaultSpriteSheetPath
return string

isCurrentlyRefreshingSourceImages public static property

public static bool isCurrentlyRefreshingSourceImages
return bool