我创建了一个 iOS 项目,其中包含了来自 Wikiitudes SDK 示例(选择 POI)的架构师世界。我完全遵循了 Wikitude 的设置指南。
我确保包含文件夹引用,以便可以在包中访问这些文件。我的世界加载和工作方式与 Wikitude 示例完全相同,只是在屏幕上看不到任何图像资源。背景图像、所选图像和我添加的任何其他图像。我检查了捆绑包中的图像,它们位于资产文件夹下。
我比较了这两个项目,它们完全相同。我无法确定差异。是否还需要做任何其他事情来确保包含图像?我已经尝试了一切。请帮忙!
这就是我初始化世界的方式
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
if ( [WTArchitectView isDeviceSupportedForARMode:WTARMode_Geo] ) { // 1
if ( !_architectView ) {
self.architectView = [[WTArchitectView alloc] initWithFrame:self.view.bounds];
[self.architectView initializeWithKey:@"tW3Ht861dC8lNC2/xnahrP7DRI7nqfXDGZfUvdeIGJsc64QLICf0leLIO50svo8me8yrGBcglCEHwAQEhqs8eOceTQ0iXJhF6Glf016W/tDsCSXMetFz4vdZIHzOdNOOBJEKuIEPYZgyffutNigYtdWpPzS33L1OQLoVkdQ3z/NTYWx0ZWRfX21xcPVHf8nkO6IcVarrd+BPN3s78E/Ac39sjGX90LKiVK47DeMMovn5X5X3vXIcwrxe3WRZqL6sczpdObKvll+Qwvpbrnej1ausee5uUCCXFC6oevbcnuWyqgYXzctjCjrJlcdfzL1EgPi9W4i87bnT1uf8IYISiPwBlK7vNvLpBIfryzyn9t4EKMGr5X0GTgXA11G5BJW2wkgukMSt7zp8fE1XurT/C97tTtN9P/w5lyWnpjm/1Qt8n409QxB09A9ZW2x9vcOoTzyCKQyTXduWyhW4hv6gXHZUU5A88PJBGtFpX63f40VURgi+6hMNy2Q4I57Ck0d+NTJHQnPbm2NoHKiAkFr5LS2A91lnhF3BI9Qx8YPpjStPNslW93NJPXOstmSFDLep9MpNx+tLzPMRBj5HLjSTPCzWZSQSuXSj31hc/nwoaVl+0MvQzNC1YQdS1QcjeQx5Ln6nFaW+eCmRHOOAZZQJUJeaVvLSMll+zaYwZ+WrIYDCMx/nCwjtQ7Y+Voj2sivGIxPNrcDUuWul6q2D3WJmUwjquibs2M97lLljwojpgLfRf8hWynpvnfliTgk2OZUT96+vcwLW3FHkCLFteuRQ2g==" motionManager:nil]; // 2
[self.architectView start];
[self.view addSubview:self.architectView]; //3
NSURL * worldURL = [[NSBundle mainBundle] URLForResource:@"index" withExtension:@"html" subdirectory:@"World2"];
[self.architectView loadArchitectWorldFromUrl:worldURL];
[self.architectView setShouldRotate:YES toInterfaceOrientation:[UIApplication sharedApplication].statusBarOrientation];
}
}
}
这就是我创建图像资源的方式
World.markerDrawable_idle = new AR.ImageResource("assets/marker_idle.png");
World.markerDrawable_selected = new AR.ImageResource("assets/image2.png");
World.markerDrawable_directionIndicator = new AR.ImageResource("assets/image3.png");