Method TryGetRegion
TryGetRegion(int, out TextureRegion?)
Gets the Texture
Parameters
index
intThe index of the Texture
Region element to locate.region
TextureRegion When this method returns true, contains the Texture
Region located; otherwise, null.
Returns
- bool
true if a Texture
Region element was located; otherwise, false. This method returns false if the index specified is less than zero or is greater than or equal to the total number of TextureRegion elements in this TextureAtlas .
TryGetRegion(string, out TextureRegion?)
Gets the Texture
Parameters
name
stringThe name of the Texture
Region element to locate.region
TextureRegion When this method returns true, contains the Texture
Region located; otherwise, null.
Returns
- bool
true if a Texture
Region element was located; otherwise, false. This method returns false if this TextureAtlas does not contain a TextureRegion element with the specified name.