I think there is a problem bacause UnityInitApplicationNoGraphics(UnityDataBundleDir()) is nil, so can I know how put the value instead of nil?
UnityInitApplicationNoGraphics(UnityDataBundleDir());
[self selectRenderingAPI];
[UnityRenderingView InitializeForAPI: self.renderingAPI];
static NSString* bundleIdWithData = nil;
extern "C" void UnitySetDataBundleDirWithBundleId(const char* bundleId)
{
if (bundleId) bundleIdWithData = [NSString stringWithUTF8String: bundleId];
else bundleIdWithData = nil;
}
extern "C" const char* UnityDataBundleDir()
{
static const char* dir = NULL;
if (dir == NULL)
{
if (bundleIdWithData == nil)
dir = AllocCString([[NSBundle mainBundle] bundlePath]);
else
dir = AllocCString([[NSBundle bundleWithIdentifier: bundleIdWithData] bundlePath]);
}
return dir;
},I think there is a problem bacause UnityInitApplicationNoGraphics(UnityDataBundleDir()) is nil, so can I know how put the value instead of nil?
UnityInitApplicationNoGraphics(UnityDataBundleDir());
[self selectRenderingAPI];
[UnityRenderingView InitializeForAPI: self.renderingAPI];
static NSString* bundleIdWithData = nil;
extern "C" void UnitySetDataBundleDirWithBundleId(const char* bundleId)
{
if (bundleId) bundleIdWithData = [NSString stringWithUTF8String: bundleId];
else bundleIdWithData = nil;
}
extern "C" const char* UnityDataBundleDir()
{
static const char* dir = NULL;
if (dir == NULL)
{
if (bundleIdWithData == nil)
dir = AllocCString([[NSBundle mainBundle] bundlePath]);
else
dir = AllocCString([[NSBundle bundleWithIdentifier: bundleIdWithData] bundlePath]);
}
return dir;
}
↧