간단한 애니메이션으로 노드를 만들려고합니다. 따라서 각 개별 프레임을 .png 파일로 만든 애니메이션을 모든 폴더에 붙였습니다. 그것을 stoneanimation2.atlas라고 명명했다.TextureAtlas 도구가 읽지 않습니다. 텍스처 아틀라스 - SpriteKit 텍스처 아틀라스 생성기 오류
이것은 내가 노력 코드는 다음과 같습니다
SKTextureAtlas *atlas = [SKTextureAtlas atlasNamed:@"stoneanimation2"];
SKTexture *stone2 = [atlas textureNamed:@"stone2.png"];
SKTexture *stone3 = [atlas textureNamed:@"stone3.png"];
SKTexture *stone4 = [atlas textureNamed:@"stone4.png"];
SKTexture *stone5 = [atlas textureNamed:@"stone5.png"];
SKTexture *stone6 = [atlas textureNamed:@"stone6.png"];
SKTexture *stone7 = [atlas textureNamed:@"stone7.png"];
SKTexture *stone8 = [atlas textureNamed:@"stone8.png"];
SKTexture *stone9 = [atlas textureNamed:@"stone9.png"];
SKTexture *stone10 = [atlas textureNamed:@"stone10.png"];
SKTexture *stone11 = [atlas textureNamed:@"stone11.png"];
SKTexture *stone12 = [atlas textureNamed:@"stone12.png"];
SKTexture *stone13 = [atlas textureNamed:@"stone13.png"];
SKTexture *stone14 = [atlas textureNamed:@"stone14.png"];
SKTexture *stone15 = [atlas textureNamed:@"stone15.png"];
SKTexture *stone16 = [atlas textureNamed:@"stone16.png"];
SKTexture *stone17 = [atlas textureNamed:@"stone17.png"];
SKTexture *stone18 = [atlas textureNamed:@"stone18.png"];
SKTexture *stone20 = [atlas textureNamed:@"stone20.png"];
SKTexture *stone21 = [atlas textureNamed:@"stone21.png"];
SKTexture *stone22 = [atlas textureNamed:@"stone22.png"];
SKTexture *stone23 = [atlas textureNamed:@"stone23.png"];
SKTexture *stone24 = [atlas textureNamed:@"stone24.png"];
SKTexture *stone25 = [atlas textureNamed:@"stone25.png"];
SKTexture *stone26 = [atlas textureNamed:@"stone26.png"];
SKTexture *stone27 = [atlas textureNamed:@"stone27.png"];
SKTexture *stone28 = [atlas textureNamed:@"stone28.png"];
NSArray *atlasTexture = @[stone2,stone3,stone4,stone5,stone6,stone7,stone8,stone9,stone10,stone11,stone12,stone13,stone14,stone15,stone16,stone17,stone18,stone20,stone21,stone22,stone23,stone24,stone25,stone26,stone27,stone28];
stoneAnimation = [SKAction animateWithTextures:atlasTexture timePerFrame:.01];
그것은 내가 약 10 프레임을했을 때, 이전했다. 그러나 나는 더 추가하기로 결정하고, 엑스 코드는 "SpriteKit 텍스처 아틀라스 발전기 오류"이 오류 메시지가 말한다 때문에, 그것은 아틀라스 자체에 뭔가를 엉망 생각 :
Command /Applications/Xcode.app/Contents/Developer/Tools/../usr/bin/TextureAtlas failed with exit code 11
나는 완전히 새로운 만들 때마다 아틀라스, 또는 그냥 이름 바꾸기, 그 작동하는지 확인하려면, 나는 같은 오류가 발생합니다. 또한 빌드 설정에서 "Enable Atlas Generator"를 "YES"로 설정했습니다. 그리고 나는 IOS 시뮬레이터를 재설정하려고 시도했다. 그리고 내가 생각할 수있는 모든 것들! 도와주세요!
내 코드와는 아무 상관이 없었 : 바로 텍스처 아틀라스를 클릭하고 추가를 클릭 한해야했다 모두. 그것은 내 코드와 관련이 없습니다. – user3386154
동일한 오류가 있습니다. 어떻게 해결할 수 있는지 말해주세요. – User1234
텍스처 맵을 제대로 가져 오지 못했습니다. 올바르게 가져 오기 전에 변경했기 때문에 생각했습니다. 그래서? 프로젝트 네비게이터의 텍스처 맵에 의해. 어떤 코드도 변경할 필요가 없었습니다. 제가 한 것은 텍스처 맵을 마우스 오른쪽 버튼으로 클릭하고 클릭 : 소스 컨트롤> 선택한 파일 추가입니다. – user3386154