There are many characters in my game, and because of this I have so many textures. When a texture atlas (containing about 5 different image textures) is loaded, it increases memory usage and holds it there in that total. Thus, the more textures just keep that number up, and so on until the application works. I don’t need all the characters at once, how can I load character textures when I need them, and free others when I don’t, but I need to be able to get them back.
.
let sprite = SKSpriteNode(imageNamed: "Dog")
SpriteKit Dog, , .
Dog
, .
. , "" , .
30 , , 1... 10 11... 20 21... 30, 3 , :
SpriteKit .
Source: https://habr.com/ru/post/1650985/More articles:Installing Babel V6.x ES7 Async / Await on Node.js v6.2.0 using Nodemon - javascriptExcel Pivot depending on header values - excelRewrite a Java array based on the values of another array - javaкак спрайты начинают мигать? - swiftCloud Storage: setting service account credentials for boto python library - pythonR: How to replace space ('') in a string with * single * backslash and space ('\') - regexAWS api gateway and integration cognito - node.jsCould not find Eclispe pydev settings module - eclipseshell: What is the purpose of $ {var: -} when var is not specified or null? - linuxСбой веб-узлов с помощью "Недопустимые области действия: pages_messaging_subscriptions" - facebookAll Articles